Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
hdv212
Posting Yak Master
140 Posts |
Posted - 2007-11-09 : 02:20:37
|
hii have a reportViewer in my form and a report in reportDesigner named 'Report1.rdlc'.in my report, i define a parameter that has these properties :Name = Report_Parameter_0Data type = StringPromt = 11111111111111Allow blank value = trueNull = trueand add a textBox to my report in reportDesigner with following properties :Name = textbox5Value = Parameters!Report_Parameter_0.Valueand in my form load event that show report i wrote this code to send my value to 'Report_Parameter_0' programmatically :try{ this.v_customerOrderCountTableAdapter.Fill(this.NorthwindDataSet.v_customerOrderCount); Microsoft.Reporting.WinForms.ReportParameter rp = new Microsoft.Reporting.WinForms.ReportParameter("Report_Parameter_0", "Param From Code"); this.reportViewer1.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter[] { rp }); this.reportViewer1.RefreshReport();}catch (Exception ex){ MessageBox.Show(ex.Message);}with above information, in runTime, i prospected that 'textbox5' have 'Param From Code' value, but have 'Parameters!Report_Parameter_0.Value' yet.where does problem and how to send value to reportParameter correctly ?thanks |
|
|
|
|