Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Supress Sub Report Post Reply Post New Topic
Author Message
Grifter
Newbie
Newbie


Joined: 02 Jun 2009
Online Status: Offline
Posts: 32
Quote Grifter Replybullet Topic: Supress Sub Report
     Posted: 28 May 2010 at 2:43am
Hi

I have a report with three sub reports. Each sub report is split into two sections, with each section taking data from a different query. These two queries are linked into one procedure and when the report runs on VB it takes the data from the procedure; query 1 for the top section and query 2 for the bottom section.

Two of the sub reports have conditions on the bottom section and if either of these conditions is true/false I want to suppress the whole sub report. Trouble is the top section in the sub report will still have data because the first query in the procedure still returns data no matter what but not the second query, the second query is the query with the restriction.

Not sure if there is a way to do this in CR?

Thanks for any suggestions.

g
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 28 May 2010 at 3:16am
why not update your procedure or have your app check the data, and populate a flag in both sets that tells the subreport not to print.
IP IP Logged
Grifter
Newbie
Newbie


Joined: 02 Jun 2009
Online Status: Offline
Posts: 32
Quote Grifter Replybullet Posted: 28 May 2010 at 3:54am
Hi

I actually managed to get this working. I thought it would have been trouble doing it as the report had two section but suppressing sub report works fine.

Thanks for info anyway.

G
IP IP Logged
Grifter
Newbie
Newbie


Joined: 02 Jun 2009
Online Status: Offline
Posts: 32
Quote Grifter Replybullet Posted: 31 May 2010 at 4:59am
Ok I had to change the report to include 2 more sub reports and again have a problem where 2 of the sub reports pages still show blank. How can I supress the blank pages as well?

I have a main report with 4 sub reports, each with a condition that displays appropriate data, if the records returned have one but not the other type of data then it suppresses 2 of the 4 reports but leaves the blank pages. If I go into section expert and suppress everything in main report it cuts down to 3 pages but there is nothing left to suppress.

I have 4 groups, and a report in each group. I am not using report/page headers or footers so i have supressed these as well, only the groups are showing.




Edited by Grifter - 31 May 2010 at 5:03am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum