none
Nested Subreports RRS feed

  • Question

  • Hi,

    I have 3 reports. The main report(main report 1), a sub report(sub report 1) in the main report and another sub report(sub report 2) that is set in the sub report 1.

    In order to fill the datasource of the 2 sub reports i'am using the event: "SubreportProcessing". The problem is that the event is being fired only once, and the report path of the evnt is the first sub report.

    The code is this:

    if (e.ReportPath == "Report1")

    {

        e.DataSources.Add(new ReportDataSource("ReportDetails1", dt));

    }

    else 

    {

        e.DataSources.Add(new ReportDataSource("ReportDetails2", dt));

    }


    Can someone help me pls pls..

    Wednesday, November 19, 2008 12:26 PM

Answers

  •  I'm not sure because i didn't try but i found the error. Th error was because i had a wrong parameter, that's why the event was not being fired for the second sub report.

    Thanks for your reply and for trying to help :)
    • Marked as answer by sgrech Thursday, November 20, 2008 7:58 AM
    • Marked as answer by sgrech Thursday, November 20, 2008 7:58 AM
    • Unmarked as answer by sgrech Thursday, November 20, 2008 7:58 AM
    • Marked as answer by sgrech Thursday, November 20, 2008 7:58 AM
    • Unmarked as answer by sgrech Thursday, November 20, 2008 10:01 AM
    • Marked as answer by sgrech Thursday, November 20, 2008 10:01 AM
    Thursday, November 20, 2008 7:57 AM

All replies

  • Most likely an error is happening in your subreport causing it not to bother trying to render the sub-subreport. Does the report run fine when you only have the one subreport?
    Nick Allen, Microsoft SQL Server Reporting Services. This posting is provided "AS IS" with no warranties and confers no rights.
    Thursday, November 20, 2008 6:28 AM
  •  I'm not sure because i didn't try but i found the error. Th error was because i had a wrong parameter, that's why the event was not being fired for the second sub report.

    Thanks for your reply and for trying to help :)
    • Marked as answer by sgrech Thursday, November 20, 2008 7:58 AM
    • Marked as answer by sgrech Thursday, November 20, 2008 7:58 AM
    • Unmarked as answer by sgrech Thursday, November 20, 2008 7:58 AM
    • Marked as answer by sgrech Thursday, November 20, 2008 7:58 AM
    • Unmarked as answer by sgrech Thursday, November 20, 2008 10:01 AM
    • Marked as answer by sgrech Thursday, November 20, 2008 10:01 AM
    Thursday, November 20, 2008 7:57 AM
  • Hello,
    I have a VC# webpage on which I have a reportviewer control. I have 2-level nesting of reports i.e. Report A having REport B as subreport, whereas Report B has Report C as subreport.

    I used Sql Server Business Intelligence Development Studio to create and link these as rdl. I then converted them to rdlc and brought them to the C# website. Also, in my webpage I have the SubReportProcessing event initialized in Page_Init. However I am not getting this to fire for the second level subreport.

    I have gone through all the posts but could not find definitive solution.

    Please help??
    Tuesday, July 28, 2009 10:31 AM