Greetings,
I am trying to get a working sample through an asp.net webforms project. I have worked through the quickstart tutorials and have a working sample report (Report1.cs) that shows data in the Preview and Html Preview window as expected. However when I attempt to load the report through an asp.net webform web page I can't seem to get any results to appear. So far I've added the ReportViewer control to the page:
I've added the web.config settings:
I've added the code to the page load method:
The site compiles and runs, however when the page executes, I'm getting what appears to be a blank or empty ReportViewer control. I see no difference If I comment out the parameter list in the codebehind, or if I delete all code from the codebehind. I've tried calling DataBind() and RefreshReport() but no changes. What am I missing?
Thanks,
Rick
I am trying to get a working sample through an asp.net webforms project. I have worked through the quickstart tutorials and have a working sample report (Report1.cs) that shows data in the Preview and Html Preview window as expected. However when I attempt to load the report through an asp.net webform web page I can't seem to get any results to appear. So far I've added the ReportViewer control to the page:
<
telerik:ReportViewer
id
=
"ReportViewer1"
runat
=
"server"
></
telerik:ReportViewer
>
I've added the web.config settings:
<
system.web
>
...
<
httpHandlers
>
<
add
path
=
"Telerik.ReportViewer.axd"
verb
=
"*"
type
=
"Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
/>
</
httpHandlers
>
</
system.web
>
<
system.webServer
>
<
handlers
>
<
add
name
=
"Telerik.ReportViewer.axd_*"
path
=
"Telerik.ReportViewer.axd"
verb
=
"*"
type
=
"Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
preCondition
=
"integratedMode"
/>
</
handlers
>
<
validation
validateIntegratedModeConfiguration
=
"false"
/>
</
system.webServer
>
I've added the code to the page load method:
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
InstanceReportSource reportSource =
new
InstanceReportSource();
reportSource.ReportDocument =
new
Report1();
reportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@batchType"
,
"Open"
));
reportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@fromDate"
, DateTime.Parse(
"9/1/2013"
)));
reportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@toDate"
, DateTime.Parse(
"9/10/2013"
)));
reportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@entityId"
, 0));
reportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@entityType"
,
""
));
reportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@userId"
, 1));
ReportViewer1.ReportSource = reportSource;
//ReportViewer1.RefreshReport();
}
}
The site compiles and runs, however when the page executes, I'm getting what appears to be a blank or empty ReportViewer control. I see no difference If I comment out the parameter list in the codebehind, or if I delete all code from the codebehind. I've tried calling DataBind() and RefreshReport() but no changes. What am I missing?
Thanks,
Rick