Not able to create data source of stored procedure that is returning multiple table

1 Answer 54 Views
DataSource Object Report Designer (standalone) Report Viewer - Blazor
Jayesh
Top achievements
Rank 1
Jayesh asked on 02 Aug 2023, 08:00 AM
Hi All,

I am facing an issue with creating data source for store procedure which is returning multiple table in response,
not able to retrive all tables, currently I am getting only first table .

please suggest any method to solve this.

thanks in advance
Jayesh Idnani

1 Answer, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 07 Aug 2023, 07:15 AM

Hello Jayesh,

Indeed, the SqlDataSource component will only load the first result set if more than one is returned from the stored procedure (see Selecting Data with the SqlDataSource).

If dividing your existing stored procedure into separate ones for each result set is not an option, I can suggest the following workaround.

Use the ObjectDataSource component to read the data into a DataSet and set the DataSource and DataMember properties of the object data source accordingly (the DataMember property is the property you can use to indicate which table to bind to). Take a look at the Binding ObjectDataSource to a DataSet article for more information.

Note that in order to use your object data source in the Standalone Report Designer, you would need to extend the configuration of the designer with your custom assembly. The same applies if you need to use the object data source in your web application.

I hope this helps.

Best Regards,
Momchil
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Tags
DataSource Object Report Designer (standalone) Report Viewer - Blazor
Asked by
Jayesh
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or