How to create a report variable list from a data source

Stimulsoft Reports.WEB discussion
Post Reply
jaimefuhr
Posts: 12
Joined: Wed Sep 15, 2021 5:10 pm

How to create a report variable list from a data source

Post by jaimefuhr »

I have a data source that fetches a list of locations, which returns locationID and locationName.

I am attempting to set up a Report Variable that uses this data source to give the report user a list of locations to choose from. This is working, however the drop-down is showing the locationID and not the name. After selecting a locationID, the name will appear as the selected value.

How do I get the name to show in the list? I need to pass the locationID to the query, not the name.

Report Variable
Screenshot 2025-04-14 172322.png
Screenshot 2025-04-14 172322.png (27.93 KiB) Viewed 2299 times
The locationID is appearing in the list, when it should be the locationName
Screenshot 2025-04-14 172336.png
Screenshot 2025-04-14 172336.png (4.51 KiB) Viewed 2299 times
After selecting a record, the name of the location appears
Screenshot 2025-04-14 172342.png
Screenshot 2025-04-14 172342.png (4.63 KiB) Viewed 2299 times
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: How to create a report variable list from a data source

Post by Lech Kulikowski »

Hello,

Please try to check the last version.

Thank you.
jaimefuhr
Posts: 12
Joined: Wed Sep 15, 2021 5:10 pm

Re: How to create a report variable list from a data source

Post by jaimefuhr »

Thanks, the latest version has fixed that issue.

Is there a way to add an item to the list? For example, I want to add a key/value pair "All Locations" with a value of 0.

If the user selects a location, the default empty line can no longer be selected.
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: How to create a report variable list from a data source

Post by Lech Kulikowski »

Hello,

You can add an additional variable for this:
https://demo.stimulsoft.com/#Net/Parame ... ingCountry

Thank you.
Post Reply