[Report Designer Standalone] [Question]: Parameter Values blank when assigned to a SQLDataSource on report run?

1 Answer 98 Views
DataSource SQL DataSources Expressions Interactivity Report Designer - Web Report Designer (standalone) Report Parameters
Austin
Top achievements
Rank 2
Iron
Iron
Iron
Austin asked on 13 Jan 2023, 08:22 PM

Good Afternoon Telerik,

 

Currently, I have 1 report where I am searching for all the machines in the database using a parameter querying Machine OS(with values in it like Android, IPhone, Windows 10, Windows 8, etc..). It is located in a table called Assets. Here is a sample query of what I am querying. When I run the table with the only sql datasource it returns my selection on the preview data. However, when I run it on the Telerik server the parameter field on the right hand side is completely blank with no values.

SELECT

at.machine name, at.machineos

FROM assets at

WHERE at.machineos IN (:MachineOS)

 

However, when I add a new SQLDataSource with the same information above and attach the datasource under the parameter to that. It displays the values and correctly queries the data. How can I get it to retrieve the values of the first datasource without making another datasource with the same exact query?

 

(I should also mention, the database is running on a oracle server)

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 18 Jan 2023, 12:30 PM

Hello Austin,

If I understood correctly, you would like to have the Machine OS values listed under the Report Parameter AvailableValues.

If so, you need to have a SqlDataSource that doesn't perform filtering, so that it may extract all of the values. Then, in the Table DataSource, you would be able to filter by the selected values.

Generally, when there is no filtering by the ReportParameter, you may use the same SqlDataSource for both the Report Parameter and the Table. If you have filtering by the selected values in the Report Parameter though, you need to introduce an additional SqlDataSource for the parameter that is not filtered. The reason is that otherwise, there will be a circular dependency in the Report Parameter. On the one hand, the available values will depend on the selected parameter value, and on the other, the latter will depend on the available values.

Regards,
Todor
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
DataSource SQL DataSources Expressions Interactivity Report Designer - Web Report Designer (standalone) Report Parameters
Asked by
Austin
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Todor
Telerik team
Share this question
or