Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Passing 'dynamic' parameters to Stored Procedure Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 05 Aug 2009 at 6:12am
Hi, DBlank as me to take a look.
 
1) you can't use parameters in a command object.  It is my belief that the command object was created to support the parameters, so you get the double entering.
 
2) you could code the date inputs as strings, then the user can enter them as just the date, you set them to a smalldatetime variable in the sp.
 
3) you can set defaults, but I would set the trigger to be if the value is NULL, since from the parameter screen you can check to make them null.
 
4) if you use the Crystal parameters you can report on them, and you don't need to return them from the sp.  (you might need to add coding to the report to handle the defaults)
 
5) I haven't tried this just using a stored proc, but I do it all the time in datasets is to return multiple tables in the stored proc (multiple selects).  If you can, then you can return the dates in their own table. (I use datasets in my reports so that I can reiterate the parameters to my report--I use ADO.Net connects, so I never touch Crystal's parameter screen, and the report doesn't know what they were)
 
Hope this helps.
IP IP Logged
JESii
Newbie
Newbie
Avatar

Joined: 03 Aug 2009
Location: United States
Online Status: Offline
Posts: 7
Quote JESii Replybullet Posted: 06 Aug 2009 at 11:52am
Yes, very much so; I have a better idea of which approaches aren't going to prove useful as well as some new ideas about how to tackle this situation.

Thanks very much...
IP IP Logged
<< Prev  Page  of 2
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