Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Where Condition in SQL Expression Post Reply Post New Topic
Author Message
padreport
Newbie
Newbie


Joined: 20 Mar 2007
Location: India
Online Status: Offline
Posts: 38
Quote padreport Replybullet Topic: Where Condition in SQL Expression
    Posted: 10 Jul 2007 at 12:26am
Hi
    I've to give my where condition (it may be more than one field and any no. of length) dynamically to the sql expression in CR XI. How to use that
 
for eg:
 
WHERE emp.dept_id = 100 AND emp.location = 'India' and emp.dob >='01/01/1975'
 
like that... some query string will be append to the sql expression
using parameter is it possible
 
give details
 
Thanks in advance...
PAD
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 10 Jul 2007 at 9:17am
I don't know how to dynamically change the WHERE clause in SQL. You can use parameters to pass different values to the WHERE clause, but not actually change the conditions in it. However, there is a command in SQL to excecute a string value. I forget what it it is, but you could research it and see if you can put that in a SQL Command object so that you can enter a string parameter in the report and SQL will execute it for you. It's a long shot, but something worth researching.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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.