Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Distinct fields 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: Distinct fields
     Posted: 09 Mar 2011 at 9:13am

Is there a formula to only allow one distinct field record per order?  I have a sales order report that repeats the sales order number per item on the order.  I need it to do this, but one of my fields is a custom field that can be null or have one or two records associated with the sales order.  This is causing my report to repeat records for each item like it's supposed to  and then start repeating again for the same order when the order has both of the records associated with it.  I want to tell the report to only allow distinct record either null or one of the two records.  If anyone can answer this question I will be very grateful.Dead 

customreport
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 09 Mar 2011 at 9:33am
You can choose to either write a suppression formula to hide records that you don't want to see, or you can write a record select formula to not even retrieve those.
IP IP Logged
customreport
Newbie
Newbie


Joined: 26 Jan 2011
Location: United States
Online Status: Offline
Posts: 28
Quote customreport Replybullet Posted: 09 Mar 2011 at 9:42am

I don't need a suppress formula.  I need possibly a select formula combined with an if then statement that says something like; if sales order has two distinct field records allow only one.  I don't know if there is a formula that can do something like that, but I need the field record to repeat like the other items, but all the other fields only have one record in the field per sales order.  This particular field has two records to each order sometimes and sometimes it has none, sometimes it has one.  Somehow I need to tell it that if there are two distinctly different field records only allow 1 of them.

customreport
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