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