Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal Report HELP Urgent! Post Reply Post New Topic
Author Message
abauman
Newbie
Newbie


Joined: 23 Aug 2011
Location: United States
Online Status: Offline
Posts: 7
Quote abauman Replybullet Topic: Crystal Report HELP Urgent!
    Posted: 24 Aug 2011 at 5:23am

I have a crystal report that is showing me too many details.

 

I have it linked with a sub report. I only want it to show me data when the subreport is showing data.

 

In the section expert i should be able to write a formula to say if subreport (Sales Field)> then 0  then show details else suppress main report detail.

 

 

Currently my report looks something  like this below:

 

Main Report                                                                SubRerport

ItemNum Sales SlsPerson                           ItemNum Return $ Sls Person

1234        100     Adam

1234        100     Adam

4321        200     Adam                                4321         -200        Adam

 

 

 

What I am trying to do is suppress the first 2 rows of data and only have it show when data is coming from the subreport.

 

Do I need to create a shared variable? Do I need to create a parameter? How do I suppress these details?

 

Please let me know.

Thanks

IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 24 Aug 2011 at 8:21am

i would actually make the sub report my main report and the main report  my sub, then join them on the item number and it will only show what is retrieved in the main)sub)

or you can use a shared variable

SHARED VARIABLES

 

Shared variables are used to pass values from sub report to the main report.

(if you want  to summarize totals from a sub report with totals from the main report, you would use the following formulas to pass the value from the sub report to main report.

 

SUB REPORT                                        whileprintingrecords;

                                                                                SHARED Numbervar  X := x + {field};

 

MAIN                                                                     whileprintingrecords;

                                                                                SHARED Numbervar  X;

                                                                                X

 

Shared variables can not be suppressed. I make the font white and the field very small.

They must be placed below the subreport to retrieve the value.

sharona
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 24 Aug 2011 at 8:22am
then use the shared variable to supress in the section expert.
the main report data that is being surpressed needs to be below the sub report.
sharona
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.016 seconds.