Page 1 of 1

Formula Question

Posted: Sun Jul 06, 2008 6:28 am
by Ajax
I need to make a formula,I added a calculated field,

----------------------------------------------------------------
stringvar Remarks := '';

if {Table.Field1} then
Remarks := Remarks +' ' + 'Remark1'+' |';

if ({Table.Field2}>0) then
Remarks := Remarks + ' '+ 'Remark2'

Print Remarks

----------------------------------------------------------------

How can I do this in Stimulsoft Reports.Net???

Thanks in advance.

Formula Question

Posted: Sun Jul 06, 2008 8:32 am
by Brendan
Is your calculated field based on a per row basis or is it something you need to print at the end of a report?

If it's on a per row basis you can add a Calculated Column to your datasource in StimulReports. Call it Remarks of type string and use the following expression

Code: Select all

(Table.Field1 ? " " + "Remark1" + " |" : String.Empty) + (Table.Field2 > 0 ? " " + "Remark2" : String.Empty)

If it's a running value based on the entire datasource then you can use the BeforePrintEvent of the Databand with a variable and calculate the running value.

Formula Question

Posted: Sun Jul 06, 2008 9:39 am
by Ajax
It is per row, I need to check something like the per row value one field and show remark for user to understand the meaning,
thanks 4 reply i will check you solution out.!