Crystal Reports
In crystal reports, we keep page break after a group but if there exists many groups in the report, then keeping the page break after each group results in a blank page if the group changes.
i.e if there are groups 1,2,3 and we have kept a page break in the Group footer, then after change of group3 value, the page break is added. But if there arises a scenario where there are multiple values in group2, there would be a blank page if we put a page break, since the group3 would change but even group2 would also change. Adding the condition 'not onlastrecord' does not handle this, since it is not the last page.
The scenarios is shown in the figure below:
GH1
GH2
GH3
GF3
page break
GH3
GF3
page break
GF2 (this is the place where there would be a blank page)
page break
GH2
GH3
GF3
page break
GH3
.....
To take care of this, we can add a condition to compare the current group value with the next group value as
NOT onlastrecord and (GF2.value) = Next(GF.value)
eg. NOT onlastrecord and {Fun_Trust_Withdrawal_Rpt_SP;1.group2} = next({Fun_Trust_Withdrawal_Rpt_SP;1.group2})
NEXT function gets the next record value in crystal report.
i.e if there are groups 1,2,3 and we have kept a page break in the Group footer, then after change of group3 value, the page break is added. But if there arises a scenario where there are multiple values in group2, there would be a blank page if we put a page break, since the group3 would change but even group2 would also change. Adding the condition 'not onlastrecord' does not handle this, since it is not the last page.
The scenarios is shown in the figure below:
GH1
GH2
GH3
GF3
page break
GH3
GF3
page break
GF2 (this is the place where there would be a blank page)
page break
GH2
GH3
GF3
page break
GH3
.....
To take care of this, we can add a condition to compare the current group value with the next group value as
NOT onlastrecord and (GF2.value) = Next(GF.value)
eg. NOT onlastrecord and {Fun_Trust_Withdrawal_Rpt_SP;1.group2} = next({Fun_Trust_Withdrawal_Rpt_SP;1.group2})
NEXT function gets the next record value in crystal report.