Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Select and item within an order Post Reply Post New Topic
Author Message
pbeesley
Newbie
Newbie


Joined: 17 Dec 2009
Online Status: Offline
Posts: 2
Quote pbeesley Replybullet Topic: Select and item within an order
    Posted: 17 Dec 2009 at 1:56pm
If I had a single table of items ordered (items), and there was a column with the order id that the items belonged to (grouped by) how would I select all orders that contained a certain "key" item? In other words I would only want to select orders that contain the "key" item but the order would display all the items with in that order, not just the "key" item.
An example would be I want to select all grocery orders (and all the items within) where the person bought "apples".

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Dec 2009 at 6:57pm
One way strictly using crystal would be (using your food example):
group on grocery order
create a formula field to flag 'apple records'... if table.field = 'apples' then 1 else 0
use insert summary function to sum that formula at the grocery order level
Use the select expert on groups to select groups where the SUM is > 0


Edited by DBlank - 17 Dec 2009 at 6:58pm
IP IP Logged
pbeesley
Newbie
Newbie


Joined: 17 Dec 2009
Online Status: Offline
Posts: 2
Quote pbeesley Replybullet Posted: 18 Dec 2009 at 12:49pm
That's it, thanks.
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.032 seconds.