Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove the dialogBox "Enter Parameter Values" when using param?

Status
Not open for further replies.

mondi

Programmer
Sep 10, 2003
169
0
0
AL
Hi to all!
I have made a report using Crystal Reports for Visual Studio .NET 2005. I have made a program using C#, which uses this report. My report uses two parameters, to which I give the values during runtime.
My problem is that even when I give the values to the parameters, it still displays a dialogBox saying "Enter Parameter Values", in runtime. I give the values from C# in this way:

cr1.SetParameterValue("Parameter1", "Value for P1");
cr1.SetParameterValue("Parameter2", "Value for P2");

What can I do to not display that message? Maybe in the design of the Crystal Report?
Thanks for any help!



Country of eagles
 
Does it however put the values in you selected when it displays the dialog box? or are the fields still empty or default values?
 
Hi!
In the dialogBox the fields are empty :(.
However I solved this problem without parameters. I just put the special fields ReportTitle and ReportComments in the report (I didn't use them in this report earlier) and I gave the values to them from C#, and it worked.
The code I used was something like this:

cr1.SummaryInfo.ReportComments = "value1";
cr1.SummaryInfo.ReportTitle = "value2";

Although it's not a clean way to do it, it worked.
Thanks for your reply!


Country of eagles
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top