I don't sure, because not tried
Please try this :
Code: Select all
...
FONTCOLOR { iif(Qty >= 0, { 0, 0, 0 },{ 0 , 0, 255} }
...--
Esgici
Moderator: Rathinagiri
Code: Select all
...
FONTCOLOR { iif(Qty >= 0, { 0, 0, 0 },{ 0 , 0, 255} }
...I'll check it.sudip wrote:Hello Master Roberto,
Thanks a lot. It works
<...>
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.![]()
This should work.esgici wrote:Hi Sudip
I don't sure, because not tried
Please try this :Regards.Code: Select all
... FONTCOLOR { iif(Qty >= 0, { 0, 0, 0 },{ 0 , 0, 255} } ...
--
Esgici
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 TEXTCode: 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.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)
Hi Sudipsudip wrote:..now I got runtime error:
FONTCOLOR expects a three element numeric array. You are not specifying that.sudip wrote:Hello Master Roberto, Esgici,
I changed only following codes:I got following compiling error: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 TEXTThanks in advance.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/
With best regards.
Sudip
Anyway... if you want to specify a code block, perhaps you should do the following: { || iif( expression , truereturnvalue , falsereturnvalue )}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?