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

Report using parameterized stored procedure not showing data

1 Answer 371 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Swapnil
Top achievements
Rank 1
Swapnil asked on 02 Oct 2014, 09:26 AM
Hi! I am new to telerik reporting and creating simple report using stored procedure which takes one parameter. I am designing my report in standalone report designer using sqldatasource and using generated .trdx file in my ASP.Net MVC application in VS 2012. I already tried to create simple report using sql query/ stored procedure without parameter as shown in your article, this works great but when I am trying to use stored procedure with parameter it's not working. Report content like header and other static information is displaying in report but data coming from stored procedure is not displaying. There is no issue in Stored Procedure as I checked it's working in Sql server. I am using following code to pass parameter

@{
        var DataSource = new UriReportSource() { Uri = ViewBag.TemplateName };
       DataSource.Parameters.Add(new Telerik.Reporting.Parameter("SiteID", 1));        
    }

    @(Html.TelerikReporting().ReportViewer()    
       .Id("reportViewer1")
       .ServiceUrl("/api/reports/")
       .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate-8.1.14.804.html")
       .ReportSource(DataSource)
       .ViewMode(ViewModes.INTERACTIVE)
       .ScaleMode(ScaleModes.SPECIFIC)
       .Scale(1.0)
       .PersistSession(false)
       ) 

This is working code and works with sql query/stored procedure without parameter but not working when I use stored procedure with parameter. 

Thanks......










1 Answer, 1 is accepted

Sort by
0
Swapnil
Top achievements
Rank 1
answered on 06 Oct 2014, 12:30 PM
I got this issue while searching. As per this issue there is problem in Newtonsoft.Json DLL file so I try to get latest from nuget. When I update this DLL to latest my problem solved and parameter passed properly to my calling stored procedure.
Tags
General Discussions
Asked by
Swapnil
Top achievements
Rank 1
Answers by
Swapnil
Top achievements
Rank 1
Share this question
or