Skip Page thru RAP
Hi,
In a report where the Detail.Visible property is controlled in the
DetailBeforePrint event,
we have to hide the groups that have no detail. We've added a string list
that's filled with Detail.Count in the firstPass per group, and then in the
second pass we hide the group header etc. if the
StringList[Group1.BreakNo]=0. The problem is that it still prints an empty
page, and we couldn't find any property to hide the page completely, setting
Group1.NewPage to False, fills the page with the data of the next visible
group, and the next visible group is printed multiple times (once for each
skipped group.
TIA
Jack
In a report where the Detail.Visible property is controlled in the
DetailBeforePrint event,
we have to hide the groups that have no detail. We've added a string list
that's filled with Detail.Count in the firstPass per group, and then in the
second pass we hide the group header etc. if the
StringList[Group1.BreakNo]=0. The problem is that it still prints an empty
page, and we couldn't find any property to hide the page completely, setting
Group1.NewPage to False, fills the page with the data of the next visible
group, and the next visible group is printed multiple times (once for each
skipped group.
TIA
Jack
This discussion has been closed.
Comments
Try creating a summary query that contains the GroupID's that have detail or
contains the GroupID's plus a count of the detail records. Connect the main
report to the summary data and use a subreport to print the detail data.
You are encountering a timing issue. The pagination for the report is
determined during the first pass.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
1. Group.NewPage should be set prior to calling report.Print and should not
be modified. This property determines whether each group starts on a new
page.
2. To control whether a group breaks, you can use the
TppGroup.OnGetBreakValue event or assign the group to a TppVariable and use
the TppVariable.OnGetText event.
3. To suppress a groupheader/groupfooter try using the
GroupHeaderBand.BeforePrint event to set the GroupHeaderBand.Visible and
GroupFooterBand.Visible properties to True/False.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com