title: Windows form application error with crystal report
body: <p>I'm a novice in the windows form application. It's my first application at the office.
  My office management gives me the source code. But they don't know anything about it.</p>
  
  <p>I run those codes on visual studio 12 (64 bit). Everything is running, but the crystal report is not working. Throws error.</p>
  
  <p><strong>error is:</strong></p>
  
  <blockquote>
    <p>Unable to cast COM object of type
    'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to
    interface type
    'CrystalDecisions.ReportAppServer.Controllers.ISCRReportSource'. This
    operation failed because the QueryInterface call on the COM component
    for the interface with IID '{98CDE168-C1BF-4179-BE4C-F2CFA7CB8398}'
    failed due to the following error: No such interface supported
    (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).</p>
  </blockquote>
  
  <p>here is the <strong>screenshot:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/sEhzQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sEhzQ.png" alt="enter image description here"></a></p>
  
  <p>here is the code:</p>
  
  <pre><code>ReportDAL rDal = new ReportDAL();
              receipt r = new receipt();
  
  
              DataTable dt = rDal.GetInvoiceHeader(vId);
  
              //string ww = GetInvoiceHeader(vId);
              r.Database.Tables["ReceiptDetails"].SetDataSource(rDal.GetInvoiceDetails(vId));
              r.Database.Tables["ReceiptHeader"].SetDataSource(rDal.GetInvoiceHeader(vId));
              r.SetParameterValue("pReportDeliveryTime", GlobalData.reportDeliveryTime);
              crystalReportViewer1.ReportSource = r;
  </code></pre>
  
  <p>Can anyone give me a solution elaborately? </p>