Get the text of selected variable

Stimulsoft Reports.WEB discussion
Post Reply
mattc76
Posts: 4
Joined: Tue Jul 31, 2012 3:08 pm

Get the text of selected variable

Post by mattc76 »

Hi,

I have a variable populated by data columns I am able to retrieve the Key but also need to retrieve the text(value).

Is this possible?

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

Re: Get the text of selected variable

Post by HighAley »

Hello.

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
If it possible send us an example of problem.

Thank you.
mattc76
Posts: 4
Joined: Tue Jul 31, 2012 3:08 pm

Re: Get the text of selected variable

Post by mattc76 »

No problem.

I have created a variable which is populated by a data source.
screenshot1.jpg
screenshot1.jpg (58.09 KiB) Viewed 3047 times
On the preview screen the variable generates a dropdown list
screenshot2.jpg
screenshot2.jpg (9.78 KiB) Viewed 3047 times
When the user selects an item in the dropdown I would like to return the text of the selected value as well as the key. (i.e. when "Test" is selected in screenshot above return key = 2 AND text = "Test". This is so I can display the selected value on the report as in the example below.
screenshot3.jpg
screenshot3.jpg (22.23 KiB) Viewed 3047 times
Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Get the text of selected variable

Post by HighAley »

Hello.

It's impossible to get value from variable but you could get it using variable. If you set the filter of band to Sites.SiteId = SiteId then you get the Name.

Thank you.
mattc76
Posts: 4
Joined: Tue Jul 31, 2012 3:08 pm

Re: Get the text of selected variable

Post by mattc76 »

Ok thanks I have used your workaround and it works.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Get the text of selected variable

Post by HighAley »

Hello.

We are always glad to help you.

Thank you.
Post Reply