Print Page | Close Window

conditional suppression in subreport

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=784
Printed Date: 04 May 2025 at 8:52pm


Topic: conditional suppression in subreport
Posted By: bobsn
Subject: conditional suppression in subreport
Date Posted: 05 Jun 2007 at 8:27am

Hello all,
  I have a main report with a certain grouping order. There is a sub report which contains fixed data around 300 rows(comes from a table in the database). Now there is the same grouping order in sub report too. I would like the subreport to display only one row which pertains to the group match in main and subreport.

Eg: If the Rep ID (group 1) in the main report matches with the Rep ID in the sub report, show that particular row in the subreport and suppress the rest of the 299 rows.

Is this possible?

 




Replies:
Posted By: BrianBischof
Date Posted: 05 Jun 2007 at 10:43am
That's easy to do. On the main report, in design mode, right-click on the subreport and choose Change Subreport Links. Then in the Report Links dialog box, pick the field from each report that they will be linked on. When you are done, CR will filter out the data in the subreport so that it matches the group in the main report.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: bobsn
Date Posted: 05 Jun 2007 at 11:52am
Originally posted by BrianBischof

That's easy to do. On the main report, in design mode, right-click on the subreport and choose Change Subreport Links. Then in the Report Links dialog box, pick the field from each report that they will be linked on. When you are done, CR will filter out the data in the subreport so that it matches the group in the main report.
 
I tried doing that. It didnt work out before too.
 
The subreport comes out empty wherever it has been put.
 
i cant understand why its doing that


Posted By: BrianBischof
Date Posted: 05 Jun 2007 at 1:50pm
I would create a second detail section and put the subreport in the second one. That way you know that the main detail has already printed. If still nothing prints, I would check that the subreport is actually getting the correct data passed to it. Put the parameter field in the header so you can see what data is being passed. On the other hand, if the subreport isn't printing at all, then something else is going wrong. Can you double click on the subreport to open it in a new window? I had this problem once and I installed SP3 for CR and then it started working fine. So you might want to download the latest service pack if your problem is similar to what I had happen.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window