Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to Add a Field based on a Subquery Post Reply Post New Topic
Author Message
Chris.Thornburg
Newbie
Newbie


Joined: 27 Apr 2011
Online Status: Offline
Posts: 3
Quote Chris.Thornburg Replybullet Topic: How to Add a Field based on a Subquery
     Posted: 16 May 2011 at 6:21am
Hello...

I need a add a column to my report that uses a subquery (I think ).

the field I want to add will be the result of a case statement that looks at child records and then returns a string.

I'm a little rusty in Crystal so is this a sub report or a sub query?

I SQL I could just add a subquery in a crosstab fashion.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 18 May 2011 at 3:31am
Since I collect all data via stored procs, I am not sure how a sub query would work in CR.  It's been years since I tried to manipulate the CR query...so it would seem more of a subreport situation...
 
but if you are comfortable with SQL, why not get the data via a stored proc, then you could select all the data that you want in one pass and it would be just reading the data from the stored proc and formatting rather than hitting the database again.
 
HTH
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