Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: SQL Command Parameter Post Reply Post New Topic
Author Message
ahaiken
Newbie
Newbie


Joined: 10 Mar 2009
Online Status: Offline
Posts: 8
Quote ahaiken Replybullet Topic: SQL Command Parameter
    Posted: 10 Mar 2009 at 10:41am
I would like to programmatically change a parameter that I created via the 'Add Command To Report' with the create button for a parameter list.  I tried several approaches.  The following approaches used the variable 'report' defined as reportDocument:

report.SetParameterValue("Parm1", "MyValue"); 
This seems to only modify parameters created with the Field Explorer Parameter Fields option.  The report didn't get any results.

Created a DataReader with the SQL that I wanted, and then tried to set report.SetParameterValue with that DataReader.
The report didn't get any results.

Tried report.ParameterFields.Add(parameterField), but didn't get any results.

Does anyone know how I can set the command parameter for a CR9 rpt file via VS C#.net 2005?

Thanks,
Amy


IP IP Logged
ahaiken
Newbie
Newbie


Joined: 10 Mar 2009
Online Status: Offline
Posts: 8
Quote ahaiken Replybullet Posted: 11 Mar 2009 at 6:51am
I got this working, so there's no longer a problem. 

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 11 Mar 2009 at 1:14pm
Would you please post your solution so that users who encounter this problem in the future can find it here?
 
Thanks!
 
-Dell
IP IP Logged
talljames
Newbie
Newbie
Avatar

Joined: 19 Mar 2009
Location: Australia
Online Status: Offline
Posts: 3
Quote talljames Replybullet Posted: 19 Mar 2009 at 10:03pm
Hello Ahaiken, how did you get it working. I am having a similar issue.
 
regards
 
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.031 seconds.