Report Generator

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Report Generator

Post by esgici »

Hi Sudip

I don't sure, because not tried :(

Please try this :

Code: Select all

...
			FONTCOLOR	{ iif(Qty >= 0, { 0, 0, 0 },{ 0 , 0, 255} }
...
Regards.

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Report Generator

Post by Roberto Lopez »

sudip wrote:Hello Master Roberto,
Thanks a lot. It works :D
<...>
Only one point I have noticed. For groups if I use GROUPFOOTER, I have to specify BEGIN GROUPHEADER ... END GROUPHEADER, otherwise it will give runtime error. :)
I'll check it.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Report Generator

Post by Roberto Lopez »

esgici wrote:Hi Sudip

I don't sure, because not tried :(

Please try this :

Code: Select all

...
			FONTCOLOR	{ iif(Qty >= 0, { 0, 0, 0 },{ 0 , 0, 255} }
...
Regards.

--

Esgici
This should work.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Report Generator

Post by sudip »

Hello Master Roberto, Esgici,

I changed only following codes:

Code: Select all

				BEGIN TEXT
					EXPRESSION	mSubQty
					ROW		4	
					COL		55	
					WIDTH		20	
					HEIGHT		10	
					FONTNAME	'Helvetica'
					FONTSIZE	9	
					FONTBOLD	.F.
					FONTITALIC	.t.
					FONTUNDERLINE	.F.
					FONTSTRIKEOUT	.F.
					//FONTCOLOR	{ 0 , 0 , 0 }
					FONTCOLOR   { iif(mSubQty >= 0, { 0, 0, 0 },{ 0 , 0, 255} }					
					ALIGNMENT	Right 
				END TEXT
I got following compiling error:

Code: Select all

hbmk2: Processing: FCRXtra.hbc                                                 
hbmk2: Compiling Harbour sources...                                            
Harbour 2.0.0beta3 (Rev. 12765)
Copyright (c) 1999-2009, http://www.harbour-project.org/
StkBal.rmg(433) Error E0030  Syntax error "syntax error at '}'"
D:/FCRXtra/fcrxtra.prg(158) Error E0030  Syntax error "syntax error at 'ENDIF'"
D:/FCRXtra/fcrxtra.prg(166) Error E0017  Unclosed control structure 'IF'
3 errors

No code generated.
hbmk2: Error: Running Harbour compiler (embedded). 1                           
(C:\hmg300\harbour\bin\harbour.exe) -n2 D:/FCRXtra/fcrxtra.prg /q -o.hbmk\win\mingw\ -iC:/hmg300/harbour/include -iC:/hmg300//include -iD:/FCRXtra -iD:/FCRXtra/
Thanks in advance.

With best regards.

Sudip
With best regards,
Sudip
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Report Generator

Post by esgici »

Hello Brother Sudip

FONTCOLOR { iif(mSubQty >= 0, { 0, 0, 0 },{ 0 , 0, 255} ) }

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Report Generator

Post by sudip »

Sorry brother :( It's a careless mistake :oops:
But now I got runtime error:
Date:07/11/2009 Time: 18:15:04
Error BASE/1076 Argument error: >=

Called from CALCULATESTOCK(433)
Called from (b)MAIN(164)
Called from _DOCONTROLEVENTPROCEDURE(4740)
Called from EVENTS(1364)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4382)
Called from DOMETHOD(7260)
Called from MAIN(20)
Thanks in advance.
With best regards.
Sudip
With best regards,
Sudip
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Report Generator

Post by esgici »

sudip wrote:..now I got runtime error:
Hi Sudip

Did you check VALTYPE of mSubQty ?

It must be numeric.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Report Generator

Post by Roberto Lopez »

sudip wrote:Hello Master Roberto, Esgici,

I changed only following codes:

Code: Select all

				BEGIN TEXT
					EXPRESSION	mSubQty
					ROW		4	
					COL		55	
					WIDTH		20	
					HEIGHT		10	
					FONTNAME	'Helvetica'
					FONTSIZE	9	
					FONTBOLD	.F.
					FONTITALIC	.t.
					FONTUNDERLINE	.F.
					FONTSTRIKEOUT	.F.
					//FONTCOLOR	{ 0 , 0 , 0 }
					FONTCOLOR   { iif(mSubQty >= 0, { 0, 0, 0 },{ 0 , 0, 255} }					
					ALIGNMENT	Right 
				END TEXT
I got following compiling error:

Code: Select all

hbmk2: Processing: FCRXtra.hbc                                                 
hbmk2: Compiling Harbour sources...                                            
Harbour 2.0.0beta3 (Rev. 12765)
Copyright (c) 1999-2009, http://www.harbour-project.org/
StkBal.rmg(433) Error E0030  Syntax error "syntax error at '}'"
D:/FCRXtra/fcrxtra.prg(158) Error E0030  Syntax error "syntax error at 'ENDIF'"
D:/FCRXtra/fcrxtra.prg(166) Error E0017  Unclosed control structure 'IF'
3 errors

No code generated.
hbmk2: Error: Running Harbour compiler (embedded). 1                           
(C:\hmg300\harbour\bin\harbour.exe) -n2 D:/FCRXtra/fcrxtra.prg /q -o.hbmk\win\mingw\ -iC:/hmg300/harbour/include -iC:/hmg300//include -iD:/FCRXtra -iD:/FCRXtra/
Thanks in advance.

With best regards.

Sudip
FONTCOLOR expects a three element numeric array. You are not specifying that.

iif returns an array according comparission result, but all the iif is enclosed with {}...

Why do you do that?
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Report Generator

Post by Roberto Lopez »

Roberto Lopez wrote:
FONTCOLOR expects a three element numeric array. You are not specifying that.

iif returns an array according comparission result, but all the iif is enclosed with {}...

Why do you do that?
Anyway... if you want to specify a code block, perhaps you should do the following: { || iif( expression , truereturnvalue , falsereturnvalue )}
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply