Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 create rdlc at run time in
Posted by Shefali Singal on  5/11/2009 11:56:38 PM Category: ADO.NET
Add to my favorites
Email to friend
I want to create rdlc report at run time. I don't want to fix the columns b'coz every time ,y query has been changed.................
And also i wan to set the report layout at runtime..........
How is it possible............
plz help me !!!!!!!!
Its urgent!!!!

Thanx in advance............

Post Your Reply Post New Question

 Viewer's Reply
Cannot Create RDLC at run time
Answered By Moderator1 on 5/12/2009 11:31:59 PM

Actually to load a RDLC report, you might need a DataSet, which contains atleast one DataTable. for this datatable, you must pre-define some columns and its position in the report. So there is no possiblity to create a RDLC report at run time. Not even possible by any other reporting tool, I think.
it IS possible
Answered By Michael on 7/14/2009 10:29:51 AM
It is possible to create rdlc report at run time:
Here is Tutorial from MSDN:

Or you can use this Open source project to get full control of your reports:
Create New page for each person's record in report.rdlc
Answered By Muhammad Hamid on 5/27/2014 3:03:45 AM
I am working on reports and i have to print each person data on a separate page I have writen a code in that gets each person data from database and sets DataSet but when i set ReportDataSource with that DataSet it shows only last record replacing all the previous rather than adding new page to show 2nd record and so on.. Can anyone please guide me to have each record on separate page in report.
Public Sub CustomReportShow(ByVal dset As DataSet)

ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet1", dset.Tables(0)))
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet2", dset.Tables(1)))
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet3", dset.Tables(2)))
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet4", dset.Tables(3)))
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet5", dset.Tables(4)))
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet6", dset.Tables(5)))
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet7", dset.Tables(6)))
ReportViewer1.LocalReport.ReportPath = "Report.rdlc"
End Sub


Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Simply SQL - Free 111 Page Preview!
Simply JavaScript - Free 150 Page Preview!
The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition - Free 207 Page Preview!