Subreport relation to masterdata
I have a scenario where a band (masterdata) contains a subband (in addition to several regular detail data bands).
I have thus created a subreport within the masterdata band, which itself contains another masterdata band (trying with a detailband resulted in an error; i.e. that there was no masterdata band on the page which the subreport refers to), but this is not in my best interest, because the data table the subreport's own masterdata band refers to is indexed by the key of the master-masterdata band.
But because there is no relation between these two bands (the master-masterdata and the subreport-masterdata), each time the subreport appears, it displays the entire table, because it is not indexed/detailed by the key.
How do I do that?
I have thus created a subreport within the masterdata band, which itself contains another masterdata band (trying with a detailband resulted in an error; i.e. that there was no masterdata band on the page which the subreport refers to), but this is not in my best interest, because the data table the subreport's own masterdata band refers to is indexed by the key of the master-masterdata band.
But because there is no relation between these two bands (the master-masterdata and the subreport-masterdata), each time the subreport appears, it displays the entire table, because it is not indexed/detailed by the key.
How do I do that?
Comments
Yes, they both have a field called 'siSite'.
obp event? So in the masterband I set the visibility of the subrep's masterdata? But how do I make sure that it is only for the same field?
write code in the obpevent of the subreps masterdataband
if (<dataset1name."siSite"> = <dataset2name."siSite">) then subrepmasterdatabandname = true esle subrepmasterdatabandname = false