Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Add field to report Post Reply Post New Topic
Author Message
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Topic: Add field to report
    Posted: 15 Oct 2009 at 5:12pm

CR v10 Pro.

I've added a field {tblSOPartsUsed.PricebookFeatures} to a report and listed it under GH2B which correlates to {tblSOPartsUsed.KeyID} with the goal of it displaying "pricebook feature" information, which it is doing but it is also displaying several duplicate lines on most parts in the report. The commonality of all pricebook feature information that needs to be displayed is they should start with "Cable" from the {tblPriceBook.ItemID} field.
 
I noticed the fields that are duplicating are items which contain assemblies and the number of duplicate entries is always the same on the order I'm testing. The assemblies are printing in the details section. GH1 is {tblOrder.OrderNumber}, if that matters.
 
Example of Desired Output:
Part:            Desc:         Part Num:      Qty:
Widget A      Widg A      001A              1
Widget B      Widg B      012B              10
Cable               2 Labor (this and 2 items below are features)
                        1 Jack             
                        1 CAT5 Cable                        
Widget C      Widg C      023C              6
 
Example of Current Output:
Part:            Desc:         Part Num:      Qty:
Widget A      Widg A      001A              1
Widget B      Widg B      012B              10
Widget B      Widg B      012B              10
Widget B      Widg B      012B              10
Cable               2 Labor (this and 2 items below are features)
                        1 Jack             
                        1 CAT5 Cable                        
Widget C      Widg C      023C              6
Widget C      Widg C      023C              6
Widget C      Widg C      023C              6
 
Any ideas on how I can fix this troublesome problem?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 16 Oct 2009 at 6:31am
DBlank's classic answer is go into each field and on the Common tab of formatting is to check suppress duplicates.  Then go to the section expert and for the section check suppress if blank, that should get rid of your duplicates, as far as displaying is concerned. 
 
If you use Sum or Count or any other aggregate, the number will be off, as they will count the suppressed recotds as.  DBlank's answer is running totals, while mine is shared variables.  They both accomplish the same this, as they do the aggregate but only for certain condtions.
 
HTH
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 16 Oct 2009 at 9:38am
lockwelle,
Awesome, thanks for the input that seems to have done the trick!
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.000 seconds.