Reputation: 47
I have form1 and form 2
form1 contains 3 comboboxes : combobox1, comobox2, combobox3 and button1 form2 contains reportviewer1 and for that viewer I created report122
what I need is when I click on button1 the values in the three comboboxes be passed to form2 and be viewed in report122
how to do that
thanks in advance
Upvotes: 0
Views: 74
Reputation: 766
Add three parameters to your report
When you run the report via the button set these parameters using either:
reportViewer1.LocalReport.SetParameters(new ReportParameter("[parameter]", [value]));
or
reportViewer1.ServerReport.SetParameters(new ReportParameter("[parameter]", [value]));
Depending on where the report is held
Upvotes: 1