Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, there!
i just want to ask..
How am i going to pass the value of text box in the .rdlc
-i have searched some codes that saying using parameters and adding some codes to the form, but i get an error

C#
private void button1_Click(object sender, EventArgs e)
   {
       this.reportViewer1.LocalReport.ReportEmbeddedResource = "Report1.rdlc";

       ReportParameter rp = new ReportParameter("ApplicationUser", this.textBox1.Text);
       this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
       this.reportViewer1.RefreshReport();



   }


i also add parameters in textbox in reportviewer
=Parameters!ApplicationUser.Value

but i get this error:
Error 1 The report parameter ‘content’ has a DefaultValue or a ValidValue that depends on the report parameter “content”. Forward dependencies are not valid. C:\Thesis\texvox\texvox\Report1.rdlc texvox

--content is the parameter name..

hope someone can help.. thank u very much in advance!
Posted

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