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

passing Table Valued Parameters toTelerik Report

6 Answers 461 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mohamed
Top achievements
Rank 1
Mohamed asked on 31 Dec 2012, 09:30 AM
How passing Table Valued Parameters toTelerik Report That using SQL DataSource

6 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 02 Jan 2013, 03:01 PM
Hello Mohamed,

To pass parameters to your data source you will need to use Report Parameters.
When having a stored procedure or select statement with parameters to set your SqlDataSource, you can assign these SQL parameters to report parameters of corresponding type. Thus when you create a ReportSource for your viewer you can set values for these report parameters.
For more details, please check the following article: Using Parameters with the SqlDataSource component and How to: Set ReportSource for Report Viewers.

I hope this helps.

Greetings,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
priya
Top achievements
Rank 1
answered on 13 May 2013, 05:42 PM
I have the same problem. I need to pass table-value parameters to a stored proc .
Stored proc
EXECUTE dbo.ReportIncident 
     @AlarmTypes = @AlarmTypeTable, 
    @ResponseTypes = @ResponseTypeTable, 
 @GuardResponse = 0 


Can u pls let me know how do i pass the @AlarmTypes  value from telerik reporting using the sqldatasource.
0
Stef
Telerik team
answered on 16 May 2013, 03:57 PM
Hello,

Apologies for the inconvenience. This scenario is currently not supported, so what we can suggest is to use ObjectDataSource component to wrap the result from executing a command as the following for instance:
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "TVPProc";
 
SqlParameter parameter = new SqlParameter();
parameter.ParameterName = "@TVP";
parameter.SqlDbType = System.Data.SqlDbType.Structured;
parameter.Value = table;
command.Parameters.Add(parameter);

Let us know if you need any further help.

Regards,
Stef
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Hans
Top achievements
Rank 2
answered on 30 Mar 2015, 06:30 PM
Just wondering if this is supported in the meantime?
0
Stef
Telerik team
answered on 31 Mar 2015, 05:58 AM
Hi Hans,

The scenario is not supported. Please use the suggested workaround.

Thank you for your understanding.

Regards,
Stef
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Milen | Product Manager @DX
Telerik team
answered on 08 Apr 2016, 06:05 AM
Hi,

The data table as SqlDataSource parameter scenario was reviewed. Using a complex data structure as a parameter of a stored procedure is applicable in order to insert or update data on the server, which is outside of the reporting solution scope. Such an implementation would also require complex parameter editor controls for all supported report viewer controls which does not have clear UX approach.

That explained, this scenario will not be supported in the product. Such a custom data retrieval scenario should be implemented using the ObjectDataSource as explained in an earlier post.

Thank you for understanding.

Regards,
Milen
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Mohamed
Top achievements
Rank 1
Answers by
Stef
Telerik team
priya
Top achievements
Rank 1
Hans
Top achievements
Rank 2
Milen | Product Manager @DX
Telerik team
Share this question
or