views:

21

answers:

1

I want to change text of text object in crystal report (.rpt file). The datasource for the report is a datatable which consists of a column named sale, if it is '0' then I want to display the text of text object as 'sale' and if it is '1' then I want to display the text of text object as 'lease'. Please help me to add formula and based upon the result of formula I have to change the text of text object being displayed.

+2  A: 
if {table.sale} = 0 then "sale"
else if {table.sale} = 1 then "lease"

Put that formula in your report where you want the text to display. That's it.

Ryan