Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: to print or not to print Post Reply Post New Topic
Author Message
j_man
Newbie
Newbie


Joined: 10 Jul 2012
Online Status: Offline
Posts: 2
Quote j_man Replybullet Topic: to print or not to print
    Posted: 10 Jul 2012 at 3:24am

Crystal 11 question, thinking that this should be simple but no luck so far.

Created a report where the detail line has 1 field that is a sub report. Sometimes this sub report field has a value and sometimes it is blank. When the value is blank I do not want to print that detail line.

I have created a shared value in the sub report and I am able to pass that value back to the main report. I created a copy of my sub report and placed it in the section “Detail A”. This allows me to obtain the shared value I need to determine if I want to print the Detail B line. I have the original sub report along with the rest of my desired detail line placed in “Detail B”. I am able to test the shared value to see if I want to print and do get the Detail B line to print as desired.

Now the problem, how can I get the Detail A line to not print? When I want to print the Detail B line, Detail A line prints and when I do not want to print the Detail B line Detail A line prints. This causes some large unwanted gaps on my report. I have the contents of Detail A whiten out so all I get is a blank line.

It is my understanding that I cannot suppress Detail A because I would not be able to obtain the shared value obtained from the sub report in it that I need to determine if I want to print Detail B.

Any thoughts?

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Jul 2012 at 3:42am
supressed subreports do not execute
to get around that
supress all fields in the subreport
set the subreport to supress when blank
set the detail section to be supressed when blank


Edited by DBlank - 10 Jul 2012 at 5:14am
IP IP Logged
j_man
Newbie
Newbie


Joined: 10 Jul 2012
Online Status: Offline
Posts: 2
Quote j_man Replybullet Posted: 10 Jul 2012 at 5:10am
That did it - thanks!
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.015 seconds.