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

Data not showing up in report (asp.net webforms)

2 Answers 186 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 09 Sep 2013, 09:16 PM
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:

<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

2 Answers, 1 is accepted

Sort by
0
Rick
Top achievements
Rank 1
answered on 10 Sep 2013, 06:40 PM
Apparently the report will not load data when viewed through Chrome, however without changing any code, when viewed in IE9 the report is loaded as expected.

Any idea what is causing this behavior?  Is it a trial version limitation or something?
0
Stef
Telerik team
answered on 12 Sep 2013, 05:35 PM
Hi Rick,

The issue is not reproducible at our side. Before running your application under Chrome please try to clear the browser's cache.

In addition you may find helpful the following articles:

If you need further help, please post a download link to a sample project illustrating the issue, or open a support ticket and send us there your files.

Regards,
Stef
Telerik

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

Tags
General Discussions
Asked by
Rick
Top achievements
Rank 1
Answers by
Rick
Top achievements
Rank 1
Stef
Telerik team
Share this question
or