私のrdlcレポートでは、パラメータテストを作成します。フォームで、私は、パラメータを設定するコードの下に書く:パラメータを設定するRDLCレポートC#
//Set Parameters
ReportParameter[] p = new ReportParameter[1];
p[0] = new ReportParameter("Test", "Testing");
currentBilling_rv.LocalReport.SetParameters(p);
// Provide datasource to report Current_Total_Billing.rdlc
ReportDataSource rds = new ReportDataSource("CurrentTotalBilling", dataset.Tables[2]);
currentTotalBilling_rv.LocalReport.DataSources.Clear();
currentTotalBilling_rv.LocalReport.DisplayName = "Current Total Billing";
currentTotalBilling_rv.LocalReport.ReportPath = ".\\Current_Total_Billing.rdlc";
currentTotalBilling_rv.LocalReport.DataSources.Add(rds);
currentTotalBilling_rv.RefreshReport();
私は例外
はタイプ の未処理の例外「Microsoft.Reporting.WinForms.MissingReportSourceException」は、マイクロソフトで を発生しているプログラムを実行すると.ReportViewer.WinForms.dll
追加情報:レポート定義のソースは が指定されていません
助けてください。
パラメータ関連のコードを削除すると機能しますか? – InitK
はい、それはうまく動作します –