Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sub Queries Post Reply Post New Topic
Author Message
vijayk
Groupie
Groupie


Joined: 14 Mar 2007
Location: United States
Online Status: Offline
Posts: 53
Quote vijayk Replybullet Topic: Sub Queries
    Posted: 29 Mar 2007 at 1:01pm
I am expereinced BzO user & new to crytsal. How can we create sub queries in Crystal..?
 
Thanks
Vijay
IP IP Logged
dhakshu
Newbie
Newbie
Avatar

Joined: 01 Mar 2007
Location: Singapore
Online Status: Offline
Posts: 21
Quote dhakshu Replybullet Posted: 30 Mar 2007 at 1:01am
Hi Vijay!
 
Create a view to include sub queries and attach it to crystal report using
database expert.
   to create a view use:
CREATE VIEW view_name AS
 SELECT ..(your select statment)
 
Hope this helps!
 
Regards,
Dhakshesh
 
 
Dhakshu
IP IP Logged
vijayk
Groupie
Groupie


Joined: 14 Mar 2007
Location: United States
Online Status: Offline
Posts: 53
Quote vijayk Replybullet Posted: 07 Apr 2007 at 10:46pm
Thanks..! I have another question..Can we reference parameter fields in SQL expression..?
 
Thanks
Vijay
IP IP Logged
dhakshu
Newbie
Newbie
Avatar

Joined: 01 Mar 2007
Location: Singapore
Online Status: Offline
Posts: 21
Quote dhakshu Replybullet Posted: 08 Apr 2007 at 6:34pm
 
 
Hi!
 
You can use parameters in sql expression like this -->
select * from tablename where columnname= '{?param}'
 
Here param is the parameter
Enclose the parameter within quotes if it is a string
 
 
Regards,
Dhakshesh


Edited by dhakshu - 08 Apr 2007 at 6:48pm
Dhakshu
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 09 Apr 2007 at 10:56am

If you can't get a view created on your database, you might also be able to use the CommandText feature to set the SQL for your report.  It's not available for all databases.  To find out if you can use it, connect to your database in Crystal.  If you have 'Add Command' under the database name, you can use CommandText.

-Dell

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.016 seconds.