Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Counting releases Post Reply Post New Topic
Author Message
khyulitz10
Newbie
Newbie


Joined: 11 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 24
Quote khyulitz10 Replybullet Topic: Counting releases
     Posted: 11 Aug 2011 at 4:07am
Hi,
 
I'm a newbie using crystal reports and I need help creating a formula that will show all the releases orders when there is more than one of them. The task is asking me to add a new group and will need to create a conditional count formula for it. Basically, I have created a customer order report where there are OrderNum, OrderLine, PartNum, Calc_LineDesc, OrderQty, Unit Price etc..I've made 2 groups, one for customer_id and the other one is for OrderLine. I've also created a subreport for all the order releases in a particular order and put this under the Calc_Linedesc which only shows the OrderRelNum, ReqDate and SellingReqQty.
 
1: I need to only show releases when there is more than one of them
2: I need to stop details in "section b" from showing AT ALL, if there is only one release.
 
The problem is I don't know how to start and where to go.
 
The hint says that in order to do it I need an additional group added for OrderLine and then the conditional count formula.
 
Please help, this just an excercise for me but I'm struggling already.
 
Thanks in advance!!Smile
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: 11 Aug 2011 at 5:48am
create a count formula.
do a conditional supression in the section expert
if {@count}<=1 then true
then in the subreport do the same but reverse the logic
sharona
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 11 Aug 2011 at 6:58am
[soapbox]
You don't have to do the whole if/then statement.  You can do this with just:
 
 
This formula evaluates to True or False so you don't have to include the extra processing overhead of the If statement.
[/soapbox]
 
-Dell
IP IP Logged
khyulitz10
Newbie
Newbie


Joined: 11 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 24
Quote khyulitz10 Replybullet Posted: 12 Aug 2011 at 5:00am

Thanks sharona and hilfySmile

So here it goes..
 
I've created a COUNT formula as you suggested:
 
Count({OrderRel.OrderRelNum},{OrderDtl.OrderNum})
 
then clicked on Section Expert, highlighted the OrderNum group, ticked the "Suppress (No Drill-Down)" and put this formula in..
 
if {@Count}<=1 then true
 
(also tried hilfy's suggestion too)
 
Seemed to be all working because I didn't get any errors except for having duplicate records in my report ConfusedAll I can see is the total number of records (e.g. 1,3 etc) and it's not showing the OrderRelNum, ReqDate and SellingReqQty anymore. What have I done wrong?
 
I'm getting excited to see the results..please help me out again,.
 
thank you!!!!Wink
 


Edited by khyulitz10 - 12 Aug 2011 at 5:02am
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: 12 Aug 2011 at 5:40am

make sure you have data in the report that has more than one release

supression is sort of backward try to reverse it
sharona
IP IP Logged
khyulitz10
Newbie
Newbie


Joined: 11 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 24
Quote khyulitz10 Replybullet Posted: 16 Aug 2011 at 5:18am
got it all working!!
 
Thanks for your help Wink
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