Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Displaying empty records Post Reply Post New Topic
Author Message
cyber-guys
Groupie
Groupie


Joined: 02 May 2008
Online Status: Offline
Posts: 42
Quote cyber-guys Replybullet Topic: Displaying empty records
     Posted: 08 Jan 2010 at 5:34am
I have an inventory report that summarizes daily sales by inventory item and displays current inventory for each - my problem is that if there are no sales for an item, that item is not selected resulting in that item not being displayed.  I would like to display all items so that inventory would show regardless of sales.
 
the tables are tickets, ticketdetails & inventory - the table links are ticketID between tickets & ticketdetails and materialID between inventory & ticketdetails.
 
I'm selecting all tickets for currentdate with status paid.
 
Thanks in advance,
Cyber-guys
IP IP Logged
tconway
Newbie
Newbie
Avatar

Joined: 25 Dec 2007
Location: United States
Online Status: Offline
Posts: 20
Quote tconway Replybullet Posted: 08 Jan 2010 at 6:08am
What if you reversed the order of your tables. Have your inventory as the first table and do left joins to your ticket tables. That should do it.

Tim
IP IP Logged
cyber-guys
Groupie
Groupie


Joined: 02 May 2008
Online Status: Offline
Posts: 42
Quote cyber-guys Replybullet Posted: 08 Jan 2010 at 6:34am
Didn't help - at one time I had a version that did work - I'm not sure what I did to mess it up.  I think I'll start over from scratch - the original report was for sales only, the inventory was added later
 
Thanks,
Cyber-guys
IP IP Logged
cyber-guys
Groupie
Groupie


Joined: 02 May 2008
Online Status: Offline
Posts: 42
Quote cyber-guys Replybullet Posted: 08 Jan 2010 at 9:24am
I did it over with no luck -
 
I think if I can get the original sales report to display for all inventory items I can add the inventory totals after - so here's where I'm at -
tickets linked to ticketdetails by ticketID grouped by materialID
 
record select is date equal currentdate, status equal 'paid'
 
can I use a for loop to select for all values of materialID (1-63) and use if isnull to display empty records?
 
If so, would anyone have any sample code???
Or any other ideas for that matter??
 
Thanks in advance,
Cyber-guys
 
IP IP Logged
Deanna
Newbie
Newbie
Avatar

Joined: 18 Feb 2010
Location: United States
Online Status: Offline
Posts: 9
Quote Deanna Replybullet Posted: 18 Feb 2010 at 9:54am
Did you ever get your 0 line items to show? I have the same issue. I have 11 elements that I need to report data and they want the non data items to show up. I recall having to do this before but can't remember what I had to do to get it to work.
 
Any help would be appreciated.
 
Thank you!
Deanna
Deanna
IP IP Logged
cyber-guys
Groupie
Groupie


Joined: 02 May 2008
Online Status: Offline
Posts: 42
Quote cyber-guys Replybullet Posted: 18 Feb 2010 at 10:35am
No I haven't - my efforts have been redirected to other projects temporarily so I haven't had the chance to dig deeper - like I said before, I did have it working at one time but I managed to lose it all - I was able to create a simplified report that essentially listed all of the inventory and then tried to insert a subreport that displayed the sales # for that item & it sort of worked - I think that will end up being the end solution if I ever get back to it - let me know how you do.
 
Thanks
Cyber-guys
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