[英]c# passing parameters to crystal reports error “Missing Parameter Values”
[英]C# crystal report parameter missing error
我嘗試使用參數選擇來加載報告。 我已經手動完成了所有必要的工作,並向表單進行了報告。 但是我沒有得到報告的價值。 報告將顯示為空白。 這就是我后面編寫的代碼。
using CrystalDecisions.CrystalReports.Engine;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSearch_Click(object sender, EventArgs e)
{
ReportDocument reportdocument = new ReportDocument();
reportdocument.Load(Server.MapPath("MR1.rpt"));
//reportdocument.SetDatabaseLogon("", "", "SureshDasari", "MySampleDB");
reportdocument.SetParameterValue("Material_Code", txtMC.Text);
CrystalReportViewer1.ReportSource = reportdocument;
}
}
請糾正我
您已注釋掉“登錄”參數。 您是否將“啟用數據庫登錄提示”設置為true?
並嘗試加載完整路徑負載:
reportDocument.Load(@"FullPathOfYourReport");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.