• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Crystal report for previous entry

I am trying to right a report from an existing one that tells me whether an ordered has been previously placed with a particular partno.

So the main report will then only display parts that have never been ordered before(first time orders).

Any suggestions will be greatly appreciated.

0
schraudog
Asked:
schraudog
  • 14
  • 10
1 Solution
 
mlmccCommented:
Is this just for display or are there summaries that need to be calculated?

I assume you are concerned with a particular customer has ordered before
One way
Group the report by customer
Group by the part ID or number

In the GROUP SELECT EXPERT
REPORT --> SELECT EPERT --> GROUP SELECTION
Count({PartNumberField}) = 1

mlmcc
0
 
schraudogAuthor Commented:
I have Crystal reports 11.0 and can not find where to put:

In the GROUP SELECT EXPERT
REPORT --> SELECT EPERT --> GROUP SELECTION
Count({PartNumberField}) = 1

0
 
schraudogAuthor Commented:
I am actually trying to find out if a particular part has ever been ordered. So if never been ordered I want to see it on the report.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
schraudogAuthor Commented:
The report will only have first time orders.
0
 
mlmccCommented:
Do you mean by any customer or is that by a given customer?

Do you want to see

Customer 1
   Part 1
   Part 3

Customer 2
   Part 2
   Part 3

ETC

or
Part 3

mlmcc
0
 
schraudogAuthor Commented:
No. I want to see.

OrderNo, PartNo (If first time ordered) "Never ordered" else "Order History).
0
 
mlmccCommented:
Again is this by customer? A given order?

Is this what you want to see

Customer1
   Order5
      Part1     -  Never Ordered Before by Customer1
      Part2     -  Ordered in Order4, Order3
      Part5     -  Ordered in Order2, Order1
      Part8     -  Never ordered before by customer 1

Customer2
   Order8
      Part3     -  Never Ordered Before by Customer2
      Part5     -  Ordered in Order6, Order3
      Part9     -  Never Ordered Before by Customer2
      Part18   -  Ordered in Order2, Order5

The result you want and the table information you have will drive how the report is built and which tables are used and how they are linked together.

mlmcc

0
 
schraudogAuthor Commented:

No, its not by customer. Its by Part. I just want a report that shows whether or not that part has ever been ordered.

0
 
mlmccCommented:
Then why did you state in your last comment about using an order number?

If you just want to list parts that have never been ordered
Add the part table
Add the order history/details table
Link on the part number field
Right click the link
Click CHANGE LINK
Set it as LEFT OUTER JOIN
Insert a group on the PartNumber
Suppress the detail section
Suppress the group footer
In the Section Expert
Select the group header
CLick the FORMULA BUTTON to the right of SUPPRESS
Not IsNull({OrderDetails.OrderDate})

That should show you all the parts that have never been ordered.

mlmcc
0
 
schraudogAuthor Commented:
Getting closer, the reports seem to be hiding orders with history. So if the part is in an order that is currently active, it is coming up on the report. I want to make sure that the parts displayed have no history.
0
 
mlmccCommented:
Do you have 2 detail tables?

mlmcc
0
 
schraudogAuthor Commented:
No just one order history table.
0
 
schraudogAuthor Commented:
Is there a way to suppress a part from a main report if the subreport is blank?
0
 
mlmccCommented:
What subreport?

mlmcc
0
 
schraudogAuthor Commented:
I am trying a different method. Created a subreport that will suppress if no previous order history. However, I would also like to suppress parts that have no previous order history (subreport).
0
 
mlmccCommented:
What was wrong with my method?

mlmcc
0
 
schraudogAuthor Commented:
I was thrown a curveball. I was asked to use an existing document that has orders with certain parts shipped on a monthly basis. From this report, the user wants to know if this is the first time "a part" has been ordered. Hence my subreport.
0
 
mlmccCommented:
Try the method in the subreport

mlmcc
0
 
schraudogAuthor Commented:
No working for me. Any other suggestions.
0
 
mlmccCommented:
Can you upload the report?

mlmcc
0
 
schraudogAuthor Commented:

I would rather not. Is there a way to exclude data from a main report if the subreport is blank or null?

I have the first report that has calculations, etc. So, if the partno has no prior order history the subreport will be blank. I would like to exclude that part number from the main report along with its numbers which add to the calculations.

Any suggestions?
0
 
mlmccCommented:
>>Is there a way to suppress a part from a main report if the subreport is blank?
You can suppress records based on the subreport however if you are using summaries the values will still be included in the report.

>>I have the first report that has calculations, etc. So, if the partno has no prior order history the subreport will be blank. I would like to exclude that part number from the main report along with its numbers which add to the calculations.

I am now confused.  You originally wanted to see if a part has never been ordered (subreport will be blank).  Now it seems you want to exclude those records from the report.

mlmcc
0
 
schraudogAuthor Commented:

mlmcc,

I am all set. I had to take a different approach and use SQL to set the crystal report up. I appreciate all your help.
0
 
schraudogAuthor Commented:
I was able to figure out the problem.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 14
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now