Variable - Show Item Value Not Key

Stimulsoft Reports.WEB discussion
Post Reply
hoopega
Posts: 3
Joined: Tue Mar 07, 2017 2:43 am

Variable - Show Item Value Not Key

Post by hoopega »

How do can I show a Variable Items Value rather than the Key.

In the Expression Editor of a text component I have the expression {Expired} where Expired is the name of the Variable.

The Variable is set up As String Value with Items

Key 1
Value Show All

Key 0
Value Show Expired in Date Range Only

The Report is returning 1 OR 0 but I want it to return Show All OR Show Expired in Date Range Only dependent on the user selected variable.

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Variable - Show Item Value Not Key

Post by HighAley »

Hello.

You could try to use next expression:

Code: Select all

{Expired==1?"Show All":"Show Expired in Date Range Only"}
Thank you.
hoopega
Posts: 3
Joined: Tue Mar 07, 2017 2:43 am

Re: Variable - Show Item Value Not Key

Post by hoopega »

Great thanks - That Works
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Variable - Show Item Value Not Key

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.
Post Reply