Click here to Skip to main content
15,906,285 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello all,
I have my Report1(rdlc) with one Parameter (added like this: Report -> Report Parameters -> Add). The application is working in Local Mode, not Server Mode with Oracle.

Now I want to display the Paramter Prompt. What I've done:
1. Fill the Prompt Field when Added the parameter (doesn't work for me)
2. Add this code in MyWindows.cs (even in MyWindows.Designer.cs)
this.reportViewer1.ShowParameterPrompts = true;
this.reportViewer1.ShowPromptAreaButton = true;


I have read in forums that Visual Studio 2008 does not show the Parameter Prompt because it is not necessary.

Please give me any solution or help.
Thanks in advance.
Posted
Updated 6-Dec-09 9:48am
v2

1 solution

ok :) Thank you everyone for reading my question, but I solved the problem. The code that solves the problem it's following:

//MyWindow.cs
using Microsoft.Reporting.WinForms;
//now the code 
ReportParameter[] param = new ReportParameter[1];
param[0] = new ReportParameter("ParameterName", "ParameterValue", false);
reportViewer1.LocalReport.GetParameters();
reportViewer1.LocalReport.SetParameters(param);


That's all.

Have a great day,
Sandu
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900