This is a migrated thread and some comments may be shown as answers.

Change value on load report

2 Answers 105 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Flávio
Top achievements
Rank 1
Flávio asked on 14 Jun 2011, 07:55 PM
Hi,

   I am creating a report where I need to change a value int to string.
Example:
     When status is 1, I want to load "Android" instead of 1.

Thanks Attention!



2 Answers, 1 is accepted

Sort by
0
Accepted
Bekir
Top achievements
Rank 1
answered on 15 Jun 2011, 09:45 AM
use iif function
http://www.telerik.com/help/reporting/expressions-functions.html

if you have just two status (1,2) you can do
IIf(Fields.status= 1,"Android","Symbian")
it means:
if(status==1)
"Android"
else
"Symbian"

or
if there are more than two statuses (like 2,3..) you can insert here another "IIf" function.
IIf(Fields.status= 1,"Android",IIf(Fields.status= 2,"Symbian","unknown"))
it means:
if(status==1)
"Android"
else if(status==2)
"Symbian"
else
"unknown"
0
Flávio
Top achievements
Rank 1
answered on 16 Jun 2011, 07:13 PM
Hi, 

 I could solve this problem! I created a function in csharp and called on the Expression.

Thanks Attention!
Tags
General Discussions
Asked by
Flávio
Top achievements
Rank 1
Answers by
Bekir
Top achievements
Rank 1
Flávio
Top achievements
Rank 1
Share this question
or