Crystal Report Question
I am working on a Crystal Report and if the address which is in a subreport is duplicate I need the information to print on the same page if it’s different I need it to print on a separate page....Please Help!
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amira BedhiafiPosted Mar 17, 2025, 9:59 AM
First you need to make sure that the data in the subreport is sorted by the address field. This will group duplicate addresses together.
Right-click the subreport → Change Subreport Links → Sort the data by the address field.
In the subreport, create a group based on the address field.
Right-click the subreport → Insert → Group → Choose the address field as the grouping field.
In the subreport, go to the Group Expert (or right-click the group header/footer and select Group Expert).
Select the group and click Options.
Check the option New Page After to force a new page after each group (i.e., after each unique address).
To avoid printing duplicate addresses multiple times, suppress the address field in the details section if it is the same as the previous record.
Right-click the address field in the details section → Format Field → Go to the Common tab → Check Suppress if Duplicate.
To ensure the subreport fits on the same page when addresses are duplicates, set the subreport to Grow and Shrink.
Right-click the subreport → Format Subreport → Go to the Layout tab → Check Can Grow.