Formula Question

Stimulsoft Reports.NET discussion
Post Reply
Ajax
Posts: 26
Joined: Wed Mar 12, 2008 11:41 pm

Formula Question

Post 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.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Formula Question

Post 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.
Ajax
Posts: 26
Joined: Wed Mar 12, 2008 11:41 pm

Formula Question

Post 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.!
Post Reply