Causing Subreports to print depending on pagenumber
Hi,
I have a situation where I want certain subreports to only print depending
on the current page number.
I tried adding this code to the ONPrint event, but it made the subreport
invisible to the whole report, if the total reports pagecount was greater
than 1.
ppSubReport1.Visible := PackInstDetR.PageNo < 2;
(I'm assuming that it was visible the first time round, but when the report
created the second page, and it retriggered, it made invisible the
subreport, even back on the 1st page).
What is the correct way to accomplish this please?
Thanks & Regards
Adam Hair.
I have a situation where I want certain subreports to only print depending
on the current page number.
I tried adding this code to the ONPrint event, but it made the subreport
invisible to the whole report, if the total reports pagecount was greater
than 1.
ppSubReport1.Visible := PackInstDetR.PageNo < 2;
(I'm assuming that it was visible the first time round, but when the report
created the second page, and it retriggered, it made invisible the
subreport, even back on the 1st page).
What is the correct way to accomplish this please?
Thanks & Regards
Adam Hair.
This discussion has been closed.
Comments
Try using the Band.BeforePrint event of the band that the subreport is in.
Try placing a break poing on the line to be sure it is getting fired and
that the visibility of the subreport is properly being changed for a given
page.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
That seems to have fixed the problem. Thank you.
Regards
Adam.