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

Dynamic ReportViewer

1 Answer 177 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 03 Jun 2008, 11:42 PM
With the new Reporting for 2008,  it seems that the original steps don't work.
Create a ClassLibrary,  Create a DataSet or TableAdapter and point the
report's DataSource to the DataSet or Data Adapter,  and then Point the
ReportViewer's Report to the report.

MyReport r1 = new MyReport(); // from the class library
dt = ta._Get(...)
ds.Tables.Add(dt);
r1.DataSource = ds;
ReportViewer1.Report = r1;

This used to work.   NOW with the new Reporting 2008  this doesn't work anymore.

What should I do?

Thanks,
David

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 04 Jun 2008, 02:51 PM
Hi David,

The code you've pasted looks correct - can you explain what is not working? I've just tested creating a simple report programmatically and did not encounter any problems? What I notice is that you are missing a call to the RefreshReport() method which would automatically show the report. Otherwise the ReportViewer will show empty until you click "Refresh" button manually.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or