Create Report

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
Tristan
Posts: 40
Joined: Sun Jul 19, 2009 2:15 pm

Create Report

Post by Tristan »

Hi All :) ......

I want make some report and print to windows printer, how to make it ? Is there report generator for HMG ?

Regards,
Tristan
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Create Report

Post by mol »

Hi Tristan!
look at your folder c:\hmhide\samples\report
and c:\hmg\samples\report*
Tristan
Posts: 40
Joined: Sun Jul 19, 2009 2:15 pm

Re: Create Report

Post by Tristan »

There are no c:\hmg\samples\report directory. Where I can find it ?
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Create Report

Post by mol »

What version of hmg are you using?
In my (2.9.4) there are:
c:\hmg\samples\report.advanced
c:\hmg\samples\report.basic1
c:\hmg\samples\report.basic2
c:\hmg\samples\report.basic3
Tristan
Posts: 40
Joined: Sun Jul 19, 2009 2:15 pm

Re: Create Report

Post by Tristan »

Hi thanks :D !

I just upgrade to 2.9.4.

How to format '999,999.99' using HMG Report Writer ?

Regards,
Tristan
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Create Report

Post by mol »

Sorry, I don't use reports.
Maybe another one will help you...

Marek
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Create Report

Post by Rathinagiri »

I think, you can use the transform function in expression statement.

Code: Select all

			BEGIN TEXT
				EXPRESSION	transform(Test->Amount,"99,999,999.99")
				ROW		2	
				COL		140	
				WIDTH		60	
				HEIGHT		10	
				FONTNAME	'Arial'
				FONTSIZE	9	
				FONTBOLD	.F.
				FONTITALIC	.F.
				FONTUNDERLINE	.F.
				FONTSTRIKEOUT	.F.
				FONTCOLOR	{ 0 , 0 , 0 }
				ALIGNMENT	Right
			END TEXT
Also please see the Report.Basic.3 folder repdemo.rpt

Code: Select all

DEFINE REPORT TEMPLATE
	TITLE 'INFORME DE CAJA|' + wempresa 
	HEADERS {'',' ',' ',' '} ,  {'USUARIO','TIEMPO','FECHA','VALOR'} 
	FIELDS {'usuario','tiempo','fecha','valor'} 
	WIDTHS {15,15,15,14} 
	TOTALS {.F.,.F.,.F.,.T.} 
	NFORMATS { , , ,'999,999,999.99'} 
	WORKAREA mtiempo 
	LPP 50 
	CPL 80 
	LMARGIN 2 
        PAPERSIZE DMPAPER_LEGAL
	PREVIEW  
	SELECT  
	IMAGE {'rosa.jpg',10,10,20,20 }
	GROUPED BY 'USUARIO' 
	HEADRGRP 'Usuario:' 
END REPORT
As you can see, we may use Nformats.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Tristan
Posts: 40
Joined: Sun Jul 19, 2009 2:15 pm

Re: Create Report

Post by Tristan »

Hi, thanks it works :D

Please attach file, is there example to make report like this.

Regards,
Tristan
Attachments
report.JPG
report.JPG (34.26 KiB) Viewed 6218 times
Post Reply