Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Parameter used as Array Post Reply Post New Topic
Author Message
newbie
Newbie
Newbie


Joined: 10 Jul 2007
Online Status: Offline
Posts: 29
Quote newbie Replybullet Topic: Parameter used as Array
    Posted: 20 Jul 2007 at 12:21pm
Hello,
 
I have one Parameter (example: City) in a small report and it is static which has default value "..All".  The user can enter cities in the parameter using comma separator. 
 
example:- user enter cities like  houston,richmond,new york,new jersy
 
How to write the Syntax in "Record selection formula editor"?  How it will be used in SQL select statement.
 
one more question:-
How can I do wild card matching in a Parameter List?  Is it possible?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Jul 2007 at 12:40pm
Use the IN operator with parentheses around the list. However, they will also need to put quotes around each string value and you are still going to have to play around with it to tweak it. Considering that people will also have typos, this could be tough to get it perfect.
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
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 20 Jul 2007 at 12:57pm
Brian:
 
I usually feed all my parameters in through a .Net front end application. I am curioius though, would there be a way to create an 'IN' statement using the Cascading Prompts available in v.11.
 
Regards,
 
John W.
 
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Jul 2007 at 1:21pm
Hey John,

I don't know how you do an IN with DCPs. They are designed by sending a multi-field command object to the server and then the user picks the individual values that they want out of that recordset. There isn't a way for a user to pick more than one value (is there? I should double check this). But I don't think it could be since users are forced to just pick one item at a time before continuing to the next prompt. Maybe the last item in the chain could be a multi-value selection? Not sure without doing a bit of research...
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
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 20 Jul 2007 at 2:36pm
Brian:
 
Thanks for the insight about DCPs. When I get some time I will explore them more fully.  It is a shame they could not be used to generate an IN statement from the pick list. Seems to me like that would be a useful function.
 
Thanks again.
 
John W.
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.047 seconds.