This is a migrated thread and some comments may be shown as answers.

Table Valued Parameters Working with Reports, but is there a better way?

1 Answer 197 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Theo
Top achievements
Rank 2
Theo asked on 24 Apr 2014, 09:23 PM
I feel like I went backward on this one... Anyone using SQL Server Table Valued Parameters (TVP) in a stored procedure and then using the results in a Telerik report? (Nice Code Project TVP and C# discussion in case you're not familiar http://www.codeproject.com/Articles/39161/C-and-Table-Value-Parameters)

For a 'normal' report, you create a report and a datasource and some parameters (single values or multiple values) using the excellent interface and hey presto! everything works out of the box.

Telerik reporting does not support TVP though, so you go back, strip out report's datasource and nice built-in parameter UI you had in there and

1) create a routine to make DataTable(s) from a RadComboBox(es) for the TVP
2) create a routine using SqlConnection, SqlCommand, SqlDataAdapters and the TVP DataTable(s) above to return another DataTable from your stored procedure
3) instantiate your report from your class library and hand it the DataTable above as the record source
4) if you're in ASP.NET, hand the loaded up Report to the ReportViewer.

It's what's going on behind the scenes, I guess, but it feels kludgy.

We have a fairly large library of stored procedures that use TVP and rewriting them all as VIEWs with IN clauses is not really an option. I'm worried about performance and size limitations as the above downloads ALL of the data into the DataTable and ... and does what with it?

Again, the above is working. Anyone else have a technique for working with Reports and TVP?

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 29 Apr 2014, 11:22 AM
Hello Theo,

Table valued parameters are currently not supported. We have discussed this topic and a possible approach to handle such scenario in the Passing Table Valued Parameters to Telerik Report forum thread.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Theo
Top achievements
Rank 2
Answers by
Nasko
Telerik team
Share this question
or