Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Invalid Table Number

$
0
0

I have a bunch of reports that were being created in CR 2008 - Well, most of them came from really old CR versions - I'm validating these reports with the CR .Net, but I have one report that I do not really know what it is happening there. If I open the report in designer everything is ok. But if I just open the report using the next code, I receive an exception. I've open the report in designer and I've removed all the components there and the behavior is the same. We have a dll which is the bridge between CR and the application, this is the interface that handles the calls to the report and as we have a lot of reports, we used to convert this component from C++ to C++/CLI and we kept the .rpt files without conversion. If I open the .rpt file in the last CR designer version and save the file, the behavior is the same.  I've done some research regarding this and I've not found anything that could help, because I'm receving the error when I'm trying to load the report. Once again, this is not regarding permissions because I'm able to load a lot of .rpt files.

 

I've just done a quick C# code in a simple windows form project and the behavior is the same, I've tried all these options without success. Am I missing something?

 

                CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

                report.Load(@"C:\arinvedtWtAmt.rpt", CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);

                report.Load(@"C:\arinvedtWtAmt.rpt", CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault);

                report.Load(@"C:\arinvedtWtAmt.rpt");

                report.ReportClientDocument.Open(@"C:\arinvedtWtAmt.rpt", 0);

 

Exception thrown in Load:

 

CrystalDecisions.Shared.CrystalReportsException was caught

  HResult=-2146232832

  Message=Load report failed.

  Source=CrystalDecisions.CrystalReports.Engine

  StackTrace:

       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod)

       at WindowsFormsApplication17.Form1.Form1_Load(Object sender, EventArgs e) in c:\Users\rmujica\Documents\Visual Studio 2012\Projects\WindowsFormsApplication17\WindowsFormsApplication17\Form1.cs:line 29

  InnerException: System.Runtime.InteropServices.COMException

       HResult=-2147483142

       Message=

Invalid table number.

arinvedtWtAmt 40276_44480_{0B6283D9-4446-4EE7-A5F0-E14EAE5AD4D7}.rpt

       Source=Analysis Server

       ErrorCode=-2147483142

       StackTrace:

            at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)

            at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)

            at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

       InnerException:

 

 

I really appreciate any advice here. Thanks!

Roberto M.


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>