Report using parameterized stored procedure not showing data

2 posts, 0 answers
  1. Swapnil
    Swapnil avatar
    4 posts
    Member since:
    Aug 2014

    Posted 02 Oct 2014 Link to this post

    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......










  2. Swapnil
    Swapnil avatar
    4 posts
    Member since:
    Aug 2014

    Posted 06 Oct 2014 Link to this post

    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.
Back to Top