locked
Reporting with RDLC - Main dataset to sub report. RRS feed

  • Question

  • User-384047847 posted

    Hey all,

     

    Is it possible to pass the main dataset to a subreport knowing that the dataset is an object type ?

     

    Kind regards,

    Tuesday, January 3, 2012 8:41 AM

All replies

  • User-1528094326 posted

    Yes you can by subscribing to the LocalReport.SubreportProcessing event. There you can pass it to the sub report and anything else you want by doing e.DataSources.Add();

    Keep in mind though, if you are using a single dataset then typically you do not need to use sub reports. In fact 95% of the time you would never want to use sub reports if you are able to consolidate everything into a single dataset. You might have a look at this and see if it will suit your needs, because if you can eliminate sub reports and perform everything on a single report it greatly enhances performance.

    http://gotreportviewer.com/masterdetail/index.html

    Tuesday, January 3, 2012 10:36 AM
  • User-804859193 posted

    I am facing one issue with the gotreportviewer.com example.

    If Order detail rows are many there may be multiple pages for each Sales Order.

    The second page does not show the Order detail records' header.

    And also I want to repeat the Order Number on each page.

    Can it be done by tweaking the gotreportview.com example?

    Saturday, April 26, 2014 5:53 AM