如何传递第二个参数 [英] How do pass second parameters
本文介绍了如何传递第二个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用系统;
使用 System.Collections.Generic;
使用 System.Linq;
使用 System.Web;
使用 System.Web.UI;
使用 System.Web.UI.WebControls;
使用 CrystalDecisions.CrystalReports.Engine;
public partial class TradeInvoiceReport:System.Web.UI.Page
{
protected void Page_Load( object sender,EventArgs e)
{
ReportDocument reportdocument = new ReportDocument();
reportdocument.Load(Server.MapPath( TradeInvoice.rpt));
string InvoiceNO = Request.QueryString [ InvoiceNo跨度>]的ToString();
reportdocument.SetParameterValue( InvoiceNo,InvoiceNO);
< big> reportdocument.SetParameterValue( Branch,Branch); < ; / 大 >
// reportdocument.SetDatabaseLogon(username,password,divya-pc,);
CrystalReportViewer1.ReportSource = reportdocument;
}
}
在此案例中,我有传递了两个参数,但系统通过错误信息..
i有删除第二个参数 - 分支值晶体报告工作正常.....
如何 映射第二个参数....请协助
解决方案
Hai Mr.Vivek ...
我将第二个参数值传递给我的水晶报告....
在我的水晶报告中我已经通过了两个参数....系统通过错误信息..
单参数 - 在我的Crystal Report编码中正常工作.. 。
第二个参数值 - ////reportdocument.SetParameterValue(\"BranchCode,BranchCode); ///
请帮助我
.................................. ................................................ <无线电通信/>
使用系统;
使用 System.Collections.Generic;
使用 System.Linq;
使用 System.Web;
使用 System.Web.UI;
使用 System.Web.UI.WebControls;
使用 CrystalDecisions.CrystalReports.Engine;
public partial class TradeInvoiceReport:System.Web.UI.Page
{
protected void Page_Load( object sender,EventArgs e)
{
ReportDocument reportdocument = new ReportDocument();
reportdocument.Load(Server.MapPath( TradeInvoice.rpt));
string InvoiceNO = Request.QueryString [ InvoiceNo跨度>]的ToString();
reportdocument.SetParameterValue( InvoiceNo,InvoiceNO);
reportdocument.SetParameterValue( BranchCode,BranchCode);
// reportdocument.SetDatabaseLogon(username,password,Divya-pc ,);
CrystalReportViewer1.ReportSource = reportdocument;
}
------------------------------ -------------------------------------------------- -------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CrystalDecisions.CrystalReports.Engine;
public partial class TradeInvoiceReport : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ReportDocument reportdocument = new ReportDocument();
reportdocument.Load(Server.MapPath("TradeInvoice.rpt"));
string InvoiceNO = Request.QueryString["InvoiceNo"].ToString();
reportdocument.SetParameterValue("InvoiceNo", InvoiceNO);
<big> reportdocument.SetParameterValue("Branch", Branch);</big>
//reportdocument.SetDatabaseLogon("username","password","Divya-pc","");
CrystalReportViewer1.ReportSource = reportdocument;
}
}
In this Case,I Have passed two parameters but system through the error message..
i have remove 2nd parameter-Branch-Value crystal report working fine.....
how do mapping second parameters .... Please assist
解决方案
Hai Mr.Vivek...
I pass the second parameter value to my crystal report ....
In my crystal report i have passed two parameters.... System through the error message..
Single paramater - working fine in my Crystal Report coding...
2nd parameters value - ////reportdocument.SetParameterValue("BranchCode", BranchCode);///
Please assist me
..................................................................................
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CrystalDecisions.CrystalReports.Engine; public partial class TradeInvoiceReport : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ReportDocument reportdocument = new ReportDocument(); reportdocument.Load(Server.MapPath("TradeInvoice.rpt")); string InvoiceNO = Request.QueryString["InvoiceNo"].ToString(); reportdocument.SetParameterValue("InvoiceNo", InvoiceNO); reportdocument.SetParameterValue("BranchCode", BranchCode); //reportdocument.SetDatabaseLogon("username","password","Divya-pc",""); CrystalReportViewer1.ReportSource = reportdocument; }
---------------------------------------------------------------------------------------
这篇关于如何传递第二个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文