且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将多参数从查询字符串传递到rdlc报告

更新时间:2022-10-22 16:05:25

当您尝试将字符串转换为数字时,会发生ORA-01722错误,并且该字符串无法转换为数字。

I have two webpages

First page has a button on clicking which second page is called which contains rdlc report


First Page

string vendors = "&Id=7&Id=35";

     protected void Page_Load(object sender, EventArgs e)
     {

     }

     protected void Button1_Click(object sender, EventArgs e)
     {
         Response.Redirect("WebForm1.aspx?"+vendors );
     }




Here Id is multiparameter value


Page Two

string str = Request.QueryString["Id"];

               ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource
                    ("dsReport", SqlDataSource1));
               List<ReportParameter> parameters = new List<ReportParameter>();

               parameters.Add(new ReportParameter("Id", str));

               ReportViewer1.LocalReport.SetParameters(parameters);






This gives me oracle error(ORA-01722: invalid number ). Pls Help

An ORA-01722 error occurs when you try to convert a character string into a number, and the string cannot be converted into a number.