I am trying to pass parameters to the report but every time following exception occured.
ApplicationException: The report definition for report 'ReportsProfitLoss.rdlc' has not been specified
I have tried following code ,is ther anyone who can help me out.
private void button1_Click(object sender, EventArgs e)
{
ReportParameterCollection reportParameters = new ReportParameterCollection();
reportParameters.Add(new ReportParameter("SalesProfit", txtSalesProfit.Text));
reportParameters.Add(new ReportParameter("TotalExpenses", txtTExpenses.Text));
reportParameters.Add(new ReportParameter("TotalSalries", txtSalary.Text));
reportParameters.Add(new ReportParameter("NetProfit", txtNetProfit.Text));
frm_Rv_ProfitLoss frm_RV_profit = new frm_Rv_ProfitLoss();
frm_RV_profit.reportViewer1.LocalReport.ReportEmbeddedResource = @"ReportsProfitLoss.rdlc";
frm_RV_profit.reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
frm_RV_profit.reportViewer1.LocalReport.SetParameters(reportParameters);
frm_RV_profit.reportViewer1.RefreshReport();
frm_RV_profit.Show();
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…