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

Blank report with valid dataview

1 Answer 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Koren
Top achievements
Rank 1
Koren asked on 29 Mar 2013, 03:05 AM
I am creating a new report (first one in this web site) and can't seem to get the details to display in the report.  The viewer displays correctly but empty in Interactive View.  If I switch to Print Preview, I see my page headers and page footer but no detail records.  I have checked the dataview before assigning it to the datasource and it has 10 records so I am at a loss why it won't bind the details.  I get no error on the report.

I am running the report in asp.net 2.0. I added Telerik to the web.config. The detail section has a lot of fields on it which appears to be displaying close to what I need in the preview mode (I'll play with it once I can actually see some data!)

What am I missing??!?!

Here is the code to set up the report from my asp.net page and class library:
Library.Quote_Report _report = new Library.Quote_Report();
Telerik.Reporting.ObjectDataSource objectDataSource = new Telerik.Reporting.ObjectDataSource;
objectDataSource.DataSource = rptDV;
_report.DataSource = objectDataSource;
pnlTReport.Controls.Add(Globals.SetupReportViewer(_report));
 
public static Telerik.ReportViewer.WebForms.ReportViewer SetupReportViewer(IReportDocument report)
{
Telerik.Reporting.InstanceReportSource _instanceReportSource = new InstanceReportSource();
_instanceReportSource.ReportDocument = report;
Telerik.ReportViewer.WebForms.ReportViewer _reportViewer = new Telerik.ReportViewer.WebForms.ReportViewer();
_reportViewer.ID = "tlrReportViewer";
_reportViewer.Width = Unit.Percentage(100);
_reportViewer.Height = Unit.Pixel(500);
_reportViewer.ReportSource = _instanceReportSource;
 
return _reportViewer;
}

1 Answer, 1 is accepted

Sort by
0
Koren
Top achievements
Rank 1
answered on 31 Mar 2013, 04:40 PM
Just in case anyone else runs into this problem.  I was disposing the dataview at the end of the logic to display the report.  Once I removed that dispose, my details started showing on the report.
Tags
General Discussions
Asked by
Koren
Top achievements
Rank 1
Answers by
Koren
Top achievements
Rank 1
Share this question
or