Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Mulitple Values in COMMAND `Parameter Post Reply Post New Topic
Author Message
sa-user
Groupie
Groupie


Joined: 29 Jun 2011
Online Status: Offline
Posts: 65
Quote sa-user Replybullet Topic: Mulitple Values in COMMAND `Parameter
     Posted: 12 Jul 2011 at 12:27pm

Hi ,

Any one know how to pass multiple values if sql command is being used?

 

Thanks

 

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 13 Jul 2011 at 3:47am
what do you mean by multiple values?
 
I pass a string of values to my stored procs, but I also have a function that will split the string into a table so that I can join against it.
 
if the string is well formatted (ie you can get you users to enter something like:
,1,2,3,4,5,56,
you could use a simple CHARINDEX(table.field, {parameter})>0, though you might be prompted for the parameter twice, once for the report, once for the command...
 
command objects are a strange beast...I don't believe that they intended to be a datasource for the report, but method to populate dynamic parameter selection lists, which is why they might ask twice for the parameter.
 
HTH
IP IP Logged
c16271
Groupie
Groupie
Avatar

Joined: 24 Aug 2010
Location: United States
Online Status: Offline
Posts: 48
Quote c16271 Replybullet Posted: 23 Feb 2012 at 8:02am
Different approach, see link (for people still having this issue):
 
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