Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Using nested queries in Crystal report Post Reply Post New Topic
Author Message
Jeen
Newbie
Newbie


Joined: 23 May 2011
Location: Belgium
Online Status: Offline
Posts: 1
Quote Jeen Replybullet Topic: Using nested queries in Crystal report
     Posted: 23 May 2011 at 5:35am
Dear,
 
I want to use nested queries in Crystal reporting and I don't know how to do.
 
Assume that I have 3 tables : 1 table with outstanding PO header information, 1 table with the PO item information and the stock@location table.
I link the required ID's and I make a left outer join between PO item partid and partID from the stock@location table. Now I want to make sure that I have all my PO's (outstanding PO via filter ordered - delivered) and in case that I have stock I want to know where this stock is.
 
So I need a pre selection to filter out all the locations with no stock in my third table before I link this table with the PO tables.
 
Can I do this in crystal reporting or do I have to make a new table in my database that makes this filter stock locations > 0 as a seperate table or view and use this as third table (I don't prefer this option)
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 23 May 2011 at 7:13am
you can do a nested query in a stored procedure and use that as a dataset.
in crystal the only way to do this is creating a subrepor, but your data wont be filtered out until after the report is run.
easiest way is a stored proc.
sharona
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