Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

c# - Microsoft.Reporting.WinForms.LocalProcessingException: 'An error occurred during local report processing.'

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();
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...