Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
I am having a problem and been looking for days on passing a variable to a textbox in reportviewer.
Currently I have one date string and eventually will have six that I want to pass to textboxes in my .rdlc report. I am pulling information from a database to place in the report and have constructed a dataset. The dataset does not allow me to pull the dates I need since they are future dates, i.e. timecards/dairycards and the dates are picked from a calendar control, The dates are stored as variables and placed in an array for the report.
I keep getting the following error message when I run the report:
LocalProcessingException was unhandled.
Microsoft.Reporting.WinForms.LocalProcessingException was unhandled
Message="An error occurred during local report processing."
Below is my code for the btnRun_Click event:
private void btnRun_Click(object sender, EventArgs e)
            reportViewer1.ProcessingMode = ProcessingMode.Local;
            LocalReport localReport = reportViewer1.LocalReport;
            reportViewer1.LocalReport.ReportPath = "Report1.rdlc";
            string param0 = GlobalClass.GlobalVar;
            ReportParameter inputdata = new ReportParameter("DateOne", param0);
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] {inputdata});
            // TODO: This line of code loads data into the 'AttendanceDataSet.EMPLOYEES' table. You can move, or remove it, as needed.
I have highlighted the line of code that the exception is thrown at.
I do have on my report the textbox expression set as:
I have looked everywhere I can think to find a solution. Any advice would be helpful.
Thanks in advance
Posted 21-Jul-10 8:35am
mslliviu at 23-Jul-10 8:47am
I think in the report designer textbox should be =Parameters!DateOne.Value

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 349
1 Nirav Prabtani 268
2 Richard Deeming 215
3 CHill60 170
4 _Amy 145
0 OriginalGriff 8,104
1 Sergey Alexandrovich Kryukov 7,045
2 Maciej Los 4,039
3 Peter Leow 3,738
4 CHill60 2,912

Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 21 Jul 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100