Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Suppress issue/question Post Reply Post New Topic
Author Message
MHank
Newbie
Newbie


Joined: 28 May 2010
Location: United States
Online Status: Offline
Posts: 2
Quote MHank Replybullet Topic: Suppress issue/question
     Posted: 28 May 2010 at 6:36am

I'm a novice to Crystal and have version XI. Any help is greatly appreciated. Here is the problem I've encountered:

I need to suppress the MAIN report's Detail Section.  When I suppress or hide the Detail section , then it seems to disable
the running of the sub report SubReportReplate. When this happens, then I can't get the ReplateDownTime value I need to use in another subreport. Please see code below. I also tried just suppressing the subreport alone and that disables the subreport processing also. Once again ReplateDownTime doesn't get calculated.

If I don't suppress or hide MAIN Report Detail Section, then everything is great except I have all this detail output from
the the sub report that I don't want to see.

I thought suppress just hid the data display, but was still got executed.

How do I disable the Main details section but still get the ReplateDownTime value I need?


SUBREPORT  SubReportReplate:

 Details Section:

  Formula ReplateSum:  (suppressed)
   Shared NumberVar ReplateDownTime;
   If  (<condition>)
   Then
    ReplateDownTime := ReplateDownTime + {<database value>}
   Else
    ReplateDownTime
  End Formula

 Report Footer:

  Formula ReplateDisplay: 
   Shared NumberVar ReplateDownTime;
   ReplateDownTime
  End Formula

MAIN REPORT:

 Details Section:

  Formula ReplateInit:
   Shared NumberVar ReplateDownTime := 0
  End Formula

  Call SubReportReplate

 Group Footer:

  Formula ReplateVariableDisplay:
   Shared NumberVar ReplateDownTime;
   ReplateDownTime
  End Formula



Edited by MHank - 28 May 2010 at 6:39am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Jun 2010 at 3:28am
have you tried placing the subreport in its own detail section?  I've had vary degrees of success with this approach.  I believe that this is approach that Brian Bischof recommended, but I don't remember the details/provisos.
 
Perhaps someone else remembers.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Jun 2010 at 3:49am
If you just suppress the section that the sub report is in the sub report will not run at all.
If you suppress all the fields in the sub report and then suppress the section that subreport is in only as 'Suppress Blank section' then it still runs and suppress in the main report and will return your values.


Edited by DBlank - 01 Jun 2010 at 3:51am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 02 Jun 2010 at 3:09am
Thanks, DBlank...  I knew that there was a trick, but I use subreports so rarely...
IP IP Logged
MHank
Newbie
Newbie


Joined: 28 May 2010
Location: United States
Online Status: Offline
Posts: 2
Quote MHank Replybullet Posted: 02 Jun 2010 at 9:13am

It worked, thanks for your help.

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