title: How to Fix the bug Local processing Exception was unhandled when passing parameter to report rdlc winform?
body: <p>I am doing college project. In that, they want a bonafide certificate. For that, I planned to pass <code>TextBox</code> string to report.</p>
  
  <p>I googled for passing parameter in a winform. Then I got this step by step process. I implement that.</p>
  
  <blockquote>
    <p>Step:</p>
    
    <p>1: In Visual Studio 2010, open your
    .rdlc file, and open “Report Data”
    window (If you can not see this
    window, go to View menu to open it);</p>
    
    <p>2: Right click the “Parameters” node,
    and add a new Parameter, ie: named it
    “content“;</p>
    
    <p>3: In your .rdlc file, add a textbox,
    named it tbContent, and set its filed
    express to :</p>
    
    <p>=Parameters!content.Value</p>
    
    <p>4: Go to your Form file which include
    your reporterview control, and add the
    following code:</p>
  
  <pre><code>       this.reportViewer1.LocalReport.ReportEmbeddedResource
  </code></pre>
    
    <p>= “TestReport.Report1.rdlc”;
                ReportParameter rp = new ReportParameter(“content”,
    this.textBox1.Text);
                this.reportViewer1.LocalReport.SetParameters(new
    ReportParameter[] { rp });
                this.reportViewer1.RefreshReport();</p>
    
    <p>5: then you can pass the parameter
    from the TextBox on the form to .rdlc
    file;</p>
  </blockquote>
  
  <p>I added <code>using Microsoft.Reporting.WinForms;</code> assembly reference. </p>
  
  <pre><code> this.reportViewer1.LocalReport.ReportEmbeddedResource = "Report1.rdlc";
  
              ReportParameter rp = new ReportParameter("content", this.textBox1.Text);
              this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
              this.reportViewer1.RefreshReport();  
  </code></pre>
  
  <p>But it throws the exception:</p>
  
  <blockquote>
    <p>Local processing Exception was
    unhandled at<br>
    this.reportViewer1.LocalReport.SetParameters(new
    ReportParameter[] { rp }); 
    line.</p>
  </blockquote>
  
  <p>Here's the full error from the clipboard:</p>
  
  <pre><code>  Microsoft.Reporting.WinForms.LocalProcessingException was unhandled
    Message=An error occurred during local report processing.
    Source=Microsoft.ReportViewer.WinForms
    StackTrace:
         at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
         at Microsoft.Reporting.WinForms.LocalReport.SetParameters(IEnumerable`1 parameters)
         at Report.Form1.Form1_Load(Object sender, EventArgs e) in D:\Jagadeeswaran\Project\Report\Report\Form1.cs:line 38
         at System.Windows.Forms.Form.OnLoad(EventArgs e)
         at System.Windows.Forms.Form.OnCreateControl()
         at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
         at System.Windows.Forms.Control.CreateControl()
         at System.Windows.Forms.Control.WmShowWindow(Message&amp; m)
         at System.Windows.Forms.Control.WndProc(Message&amp; m)
         at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
         at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)
         at System.Windows.Forms.Form.WndProc(Message&amp; m)
         at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
         at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
         at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
         at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
         at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
         at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
         at System.Windows.Forms.Control.set_Visible(Boolean value)
         at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
         at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
         at System.Windows.Forms.Application.Run(Form mainForm)
         at Report.Program.Main() in D:\Jagadeeswaran\Project\Report\Report\Program.cs:line 18
         at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
         at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
         at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
         at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.ThreadHelper.ThreadStart()
    InnerException: System.ApplicationException
         Message=The report definition for report 'D:\Jagadeeswaran\Project\Report\Report\bin\Debug\~/Report1.rdlc' has not been specified
         Source=Microsoft.ReportViewer.Common
         StackTrace:
              at Microsoft.Reporting.PreviewStore.GetCompiledReport(CatalogItemContextBase context, Boolean rebuild, Byte[]&amp; reportDefinition, ControlSnapshot&amp; snapshot)
              at Microsoft.Reporting.LocalService.GetCompiledReport(CatalogItemContextBase itemContext, Boolean rebuild, ControlSnapshot&amp; snapshot)
              at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
         InnerException: System.IO.DirectoryNotFoundException
              Message=Could not find a part of the path 'D:\Jagadeeswaran\Project\Report\Report\bin\Debug\~\Report1.rdlc'.
              Source=mscorlib
              StackTrace:
                   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
                   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
                   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
                   at Microsoft.ReportingServices.StandalonePreviewStore.GetReportDefinition(ReportID reportId)
                   at Microsoft.Reporting.PreviewStore.GetCompiledReport(CatalogItemContextBase context, Boolean rebuild, Byte[]&amp; reportDefinition, ControlSnapshot&amp; snapshot)
              InnerException: 
  </code></pre>