Two master data bands under one group header?
I have a working report that uses a group header, a master data band connected to a dataset and a group footer.
The group header has a condition that breaks on changes in a certain ID in the dataset.
The master data band correctly shows the data grouped by the ID.
Now I want to add a second band of data, positioned after the last master data row of each group is displayed and before the group footer is displayed.
This band will use a different dataset but one that also includes the same ID as that used for the group header.
How can this be done?
ie I have something like this
etc
and I would like to get
The group header has a condition that breaks on changes in a certain ID in the dataset.
The master data band correctly shows the data grouped by the ID.
Now I want to add a second band of data, positioned after the last master data row of each group is displayed and before the group footer is displayed.
This band will use a different dataset but one that also includes the same ID as that used for the group header.
How can this be done?
ie I have something like this
<--- Group header for id 1
data a for id 1
data b for id 1
data c for id 1
<--- Group footer for id 1
<--- Group header for id 2
data a for id 2
data b for id 2
data c for id 2
<--- Group footer for id 2
etc
and I would like to get
<--- Group header for id 1
data a for id 1
data b for id 1
data c for id 1
different data p for id 1
different data q for id 1
different data r for id 1
different data s for id 1
<--- Group footer for id 1
<--- Group header for id 2
data a for id 2
data b for id 2
data c for id 2
different data p for id 2
different data q for id 2
different data r for id 2
different data s for id 2
<--- Group footer for id 2
Comments
Use a subreport in an unattached child band for the second master
write code to display the child in the obp event of the group footer.
engine.showband(childbandname)
Thanks gordk,
That printed the data in the right place but displayed all the data from the second dataset at once after every group in the first dataset, regardless of the group being shown in the main report.
It didn't seem to matter if the subreport had its own group header or not or, if it did have one, whether the group condition was set to a change in the ID in dataset1 or dataset2 I still got a similar result.
How can I tell the subreport to only display the data where the ID is the same as that for the group in the main report ?
in tht subreport obp event of masterdata set the visible property
ie masterdata2.visible := dataset."fieldname" := variable name;
Ah, that makes sense. Thanks gordk
Hi! Can you please help me to write the right code?
My code looks now like:
I have a problem with this line: