Page 1 of 1

Changing the value in datasource????

Posted: Tue Nov 04, 2008 7:50 am
by abhi0410
Hi...

In my datasource, in one column the data is returened is True or false and according to that i have to print yes or no.....

How to do???

i knw i have to use the event called before print but how to do????

i mean what code to write exactly to change the text????

in report the text is printed as True or false....

Please suggest soon...

Thanks...

Changing the value in datasource????

Posted: Tue Nov 04, 2008 8:54 am
by Brendan
You can use the Text Format property of the text component to format the values of your boolean column

Image

Changing the value in datasource????

Posted: Tue Nov 04, 2008 11:23 am
by abhi0410
thanks...its working...
but i have another question....If it was not boolean and some word like 'xyz' and 'abc' and 'klm'......if i am getting these word in datasource...

n then i want to display some word against these word.....like instead of 'xyz' i want to display 'red' and yellow instead of 'abc'...

then how to do???? can't this done in beforeprint event with the help of 'if' statment?????


Changing the value in datasource????

Posted: Thu Nov 06, 2008 7:00 pm
by Vital
Hello,

You can use ternary operation in expression:

{MyDataSource.Value == true ? "Value1" : "Value2"}

Thank you.

Re: Changing the value in datasource????

Posted: Sat Oct 17, 2020 6:39 pm
by cjemina
Hello,


How to implement this using Javascript?

Re: Changing the value in datasource????

Posted: Sat Oct 17, 2020 8:02 pm
by Lech Kulikowski
Hello,

Please check the following article:
https://stimulsoft.zendesk.com/hc/en-us ... cript-code

Thank you.