Subreports

Posted by: johnr on 30 April 2018, 10:59 am EST

    • Post Options:
    • Link

    Posted 30 April 2018, 10:59 am EST

    trying to get a subreport to display correct information for each new record processed in the main report’s textbox.

    in vb.net code i pass a dataset and set the the .DataSource and .DataMember for both the main report and its embedded subreport, as follows:

       Dim rpt As Object
       Dim rptType As New EngrossedBills  (main report)
    
    rpt = rptType
        rpt.SubReport1.Report = New EngBillAmendmentsSubRpt  (subreport)
    
        rpt.SubReport1.Report.DataSource = myDS2
        rpt.SubReport1.Report.DataMember = myDS2.Tables(0).TableName
        rpt.DataSource = myDS
        rpt.DataMember = myDS.Tables(0).TableName
    

    Question - How can i make the subreport1’s information to change for each detail record ? Having trouble ‘linking’ the main report and its subreport similar to how cyrsatal reports handled.

  • Posted 1 May 2018, 1:24 am EST

    Hello,

    You can refer the following walkthrough link to achieve your requirement:

    http://help.grapecity.com/activereports/webhelp/AR12/webframe.html#arWLKScriptForSubreports.html

    Hope it helps.

    Thanks,

    Mohit

  • Posted 1 May 2018, 10:21 am EST

    Thank You Mohit.

    i was able to resolve with use of Parameters, as follows:

    Main Report, GroupFooter1_Format:

    Me.SubReport1.Report.Parameters(0).Value = txtEEDocId.Text

    Me.SubReport2.Report.Parameters(0).Value = txtEEDocId.Text

    SubReport, Detail_Format:

    If Me.Fields(“EEDocumentId”).Value = Me.Parameters(0).Value Then …

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels