ReportViewer: Passing Parameters to Sub Reports in RDLC

Microsoft ReportViewer is the best alternative to Crystal Reports. In fact it is very easy to create RDLC report compare to crystal reports.

Here are some of the features in this source code:

  1. Add subreport in addition to main report. Also called Parent and Child report.
  2. Pass parameter from main report to subreport.
  3. Use ID or the primary key of the main report to Fill DataSet of Subreport to speed up loading its loading time.
  4. Load report programmatically.

Note: I am using VB.NET 2010 and MS Access database for this project.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Submitted byAnonymous (not verified)on Wed, 06/22/2011 - 00:59

very good mr.
Submitted byAnonymous (not verified)on Fri, 10/28/2011 - 23:49

Very good code and example!! Tks for sharing your solution, you made my day! (was looking how to do that for a few days now.... not a lot of complete and working examples available...) Frank =o)
Submitted bySarif Hidayat (not verified)on Sun, 01/22/2012 - 22:58

i need help,......... ! how to create subreport and load report programmatically in mysql ?

Can you send me another example? subreport with parameter in 2012 vb.net?
Submitted byravishankar (not verified)on Mon, 04/14/2014 - 15:31

Dear sir, thanks a lot for your article. i also created one sample but e.Parameters[0].Values[0] in SubreportProcessingEventHandler is not updating the values. i am unable to fix it . please any help

Add new comment