Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Limiting Field Occurrence Post Reply Post New Topic
Author Message
customreport
Newbie
Newbie


Joined: 26 Jan 2011
Location: United States
Online Status: Offline
Posts: 28
Quote customreport Replybullet Topic: Limiting Field Occurrence
     Posted: 04 Mar 2011 at 2:37am
I have a sales order report that has several fields.  The primary field is the sales order # and there are records like item name, qnty, amount, status, sales person.....  One of the tables is a custom fields table that shows the status.  That same field that the status is in there is another record associated with the sales order.  Because of this my sales orders are repeating when there are two records in the cf_field associated with the sales order.  How do I limit the occurrance of that filed?  I only need the status field, but sometimes the order has no status field so I would need an isnull, and sometimes it only has the other record "rep group" associated with it.  I don't care if it shows the rep group or not, but I need it to show the status when there is one.  If I use a select formula to eliminate the rep group records some sales orders won't show up that don't have a status and do have a rep group.  Help Please!
customreport
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 04 Mar 2011 at 5:22am
A quick and dirty way to eliminate any extra occurrences would be to just suppress any duplicates.

It will still retrieve all of the data, but your report will only show what you want to see.
IP IP Logged
customreport
Newbie
Newbie


Joined: 26 Jan 2011
Location: United States
Online Status: Offline
Posts: 28
Quote customreport Replybullet Posted: 04 Mar 2011 at 5:39am
I'm grouping the report by date"daily" and my data is in the detail section because a single sales order can have multiple items and I need the items listed.  I have something like this;
 
order.id-doc_num-customer.name-status-item-rep-qty-amt-po#-fob-ship_via-date
order.id-doc_num-customer.name-status-item-rep-qty-amt-po#-fob-ship_via-date
order.id-doc_num-customer.name-status-item-rep-qty-amt-po#-fob-ship_via-date
order.id-doc_num-customer.name-status-item-rep-qty-amt-po#-fob-ship_via-date
        Total amount                                                   $
where the status is the cf.field.  I need it like that because it lists all of the open order items for production, but now that the cf.field has rep group, say there is 4 lines with items like the above example, there will be 8 lines when the order has a status and a rep group and now the number of items for production is doubled and the amount is doubled.
 
P.S. rep in the report is sales person, not rep group.  the rep group is included in the status field
customreport
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 04 Mar 2011 at 7:09am
Is it possible to order the details so that all of the duplicate records appear together? The issue arises due to the nature of table joins so I would assume that the problem is contained within each individual order as opposed to spanning across multiple orders.

If so, then I would try to order the details so that you could suppress duplicate fields that you do not want. They will show up as a blank line which would look ugly but at least you don't see them!
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