none
Multiple RDLC files in a ReportViewer RRS feed

  • Question

  • Hello everyone,

    I see a few questions on this matter, however my need is a little different.  I have a rdlc report that is a one page report.  We need to run these reports in batches.  So for a given range a report should generated.  We would like to concatenate these reports into one ReportViewer control rather creating a instance each report.  How, if possible, can this be achieved?

    Thanks in advance!

    Friday, February 4, 2011 3:45 PM

Answers

  • Since yours is a one-page report, this method can work:

    Create a parent report that contains your report as the subreport, and pass the range you need to the subreport as report parameters. You would display multipage parent report, which will render as many pages of the subreport as values in your range.

    See the "SupplyingData" sample in the http://code.msdn.microsoft.com/reportviewer download. There it shows you how to use subreports.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    • Marked as answer by mcovey27 Thursday, February 17, 2011 3:46 PM
    Friday, February 4, 2011 4:48 PM
    Moderator

All replies

  • Since yours is a one-page report, this method can work:

    Create a parent report that contains your report as the subreport, and pass the range you need to the subreport as report parameters. You would display multipage parent report, which will render as many pages of the subreport as values in your range.

    See the "SupplyingData" sample in the http://code.msdn.microsoft.com/reportviewer download. There it shows you how to use subreports.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    • Marked as answer by mcovey27 Thursday, February 17, 2011 3:46 PM
    Friday, February 4, 2011 4:48 PM
    Moderator
  • Thanks so much, cephalin!  This is just what I was looking for.
    Thursday, February 17, 2011 3:47 PM