Adding a Sub Report control, you can embed existing reports into various sections of other reports. You can create side-by-side reports by placing two sub reports by each other or add multiple sub report sunder each other. These sub report would be placed on the Detail band.
The following steps show you how to add a sub report .
Open the report in the designer.
Click n the TOOLBOX tab on the lower left
Drag the "Subreport" control into the details band.
A dialog will open to select the sub report from a list of reports already designed.
The Sub Report Bridge form will open. On this form you need to select the field from both reports which connect the two together. An example would be from a contact report bridged into an opportunity report would be "Contact = Contact"
Using the drop downs select the bridged fields and click OK.
Tech Note: These steps will append a script into the report which is used when the sub report is printed for each row of the top level report. The code will look like this:
'----------------------------------------------------------------------------------------)
' Build the relation between the two reports
'----------------------------------------------------------------------------------------)
Private Sub subreport1_BeforePrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Dim relationValue as string = me.GetCurrentRow().Row.Item("REPORTFIELD").tostring() CType(sender, XRSubreport).ReportSource.FilterString = "SUBREPORTFIELD = '" + relationValue + "'"
End Sub
The SUBREPORTFIELD will be the field from the "Current report field' drop down. The REPORTFIELD will be the field from the "Subreport field' drop down.
Advanced feature:
Double clicking on the sub report control will open the sub report in its own report designer surface.