...
To add a SubReport to any report drag this control onto the screen in the band that we would like to see it in. Keep in mind that where we drop the SubReport will detremine how many times it is repeated. Dropping a report on the detail line of a period report, for example, will print that report for each row of the period. If we use a period column in our report join the SubReports will filter accordingly. Dropping it on the report header or footer will print it once for the whole report, etc.
We'll go over this in a bit more detail in the examples below.
...
I did not have to assign the flock on the SubReport, because the master's flock list and wizard selections will be passed to the SubReport every time- unless the user set the "Is Independent SubReport" option to "true", in which case this step would be skipped, and the SubReport will run using its own wizard settings.
...
When the list of flocks in the sub will differ from the master, we will set the SubReport's "Is Independent SubReport" property to "True". we will then setup that wizard to return the types of flocks that we will want to see, independent from the master wizard.
...
With these steps completed, we can run our report. We will see that the layer flocks that became the destination of pullet flocks appear in the sub!
ADD Script to find Parameter Filter.
Add Label and Before Print Script on Label
Private Sub label6_BeforePrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs)
Dim label as XRLabel = sender
sender.Text = Me.FilterString
End Sub