cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter prompting not suppressed after passing values

Former Member
0 Kudos

Hi there,

I have created a report with 7 parameters. I have via code-behind passed the values I require to the report using the SetParameterValue option. If I insert a break point just before I refresh the report I can see that the report has all 7 values set and hascurrentvalue is equal to yes. When I refresh the report it still prompts for all 7 parameters. Order of code as follows:

1. create new ReportDocument

2. load report using Server.MapPath

3. set parameters

4. set RecordSelectionFormula

5. set report source to 1

6. refresh report

Not usre what I am doing wrong

Any help would be appreciated.

Thanks,

Garth.

Accepted Solutions (1)

Accepted Solutions (1)

former_member208657
Active Contributor
0 Kudos

You are going to want to set CrystalReportViewer.ReuseParameterValuesOnRefresh to true if you don't want to be prompted for parameters values.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, Garth;

What version of Crystal Reports and .NET are you using?

If you do not do step 6, the refresh of the report, does it work any better?

Regards,

Jonathan

Former Member
0 Kudos

Jonathan,

Thanks for the prompt reply.

I am running Visual Studio 2008 SP1. I am using the built-in Crystal Reports version. I need to refresh as I am assigning multiple reports to a single reportviewer.

Thanks,

Garth.

Former Member
0 Kudos

Hi, Garth;

Try installing SP1 for Crystal Reports for .NET 2008

https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe

Regards,

Jonathan

Former Member
0 Kudos

Thanks. Have downloaded the SP, will give it a try and let you know.

Former Member
0 Kudos

Did you find a solution to this problem? I am having a similar issue. I am using a stored procedure in my report and setting the parameter value in VB.Net. The HasCurrentValue parameter returns True after I set the parameter value, but I still receive a prompt for a parameter. I would like to disable the prompting somehow.