Last post Aug 13, 2019 02:27 AM by Wei Zhang
Aug 10, 2019 01:58 PM|jsshivalik|LINK
I have defined 2 parameters thru report data - Parameters . One is int type and in one it displays data from query and user can select multiple values. I want to pass these parameter values and create report programmatically using reportviewer with vb.net
in windows form application.It is on local server
Secondly i want to know how user can input value in first parameter & can select multiple values from 2 parameter.
Wht is the purpose of defining variables using report data , if we can enter parameter thru txtboxes .
Aug 13, 2019 02:27 AM|Wei Zhang|LINK
According to your description, if you want to use reportviewer in winform , I suggest that you could follow the steps in the link as below:
Then if you want to add parameter,you could set the parameter value in code behind ,which you could see as below:
report.ReportParameters.Add("myID", ReportParameterType.Integer, 123);
report.ReportParameters["myID"].Value = 123; //if parameter was created by designer
Then in reportview:
int id = (int)r.ReportParameters["myID"].Value;
If you want to select multiple values from 2 parmaeter,I think may be you could create a ComboBox which contains value of parameter then you could choose the value .