当我将参数传递给显示错误的方法时 [英] When I am passing parameters to the method showing an error
问题描述
静态RptInvoicePrint报告=新RptInvoicePrint();
当我将参数值传递给下面显示错误的方法时
方法:public static object setRptLogInfo(ref ReportDocument crpt,string rptTbl)
{
}
传递值:setRptLogInfo(报告,RAD_SP_INV_RPTPRINTINVOICE; 1 ); $
错误:Radar5C.Classes.PrintInvoice.setRptLogInfo的最佳重载方法匹配(参考CrystalDecisions.CrystalReports.Engine.ReportDocument ,string)有一些无效的论点
请帮我解决这个问题。
Hi,
static RptInvoicePrint report = new RptInvoicePrint();
When i am passing parameter values to the below method showing error
Method: public static object setRptLogInfo(ref ReportDocument crpt, string rptTbl)
{
}
Passing Values : setRptLogInfo( report, "RAD_SP_INV_RPTPRINTINVOICE;1");
Error: The best overloaded method match for Radar5C.Classes.PrintInvoice.setRptLogInfo(ref CrystalDecisions.CrystalReports.Engine.ReportDocument, string) has some invalid arguments
Please help me in solving this.
推荐答案
您的方法签名:
Your method signature:
public static object setRptLogInfo(ref ReportDocument crpt, string rptTbl)
将第一个参数显示为ref值。所以尝试:
Shows the first parameter as a ref value. So try:
setRptLogInfo(ref report, "RAD_SP_INV_RPTPRINTINVOICE;1");
这篇关于当我将参数传递给显示错误的方法时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!