VITIX
asked on
Cant Use VS 2005 Crystal Reports in VS 2008?
I am converting a VB.Net application written in VS 2005 to run in C# using VS 2008. I have both VS 2005 and VS 2008 installed on my XP Pro machine. I have my VS 2008 options set to target the .Net 3.5 framework. I have already installed both the VS service pack 1 and the service pack for Crystal Reports Basic 2008.
The existing application includes about 50 reports that were created in VS 2005. When I run the old app in VS 2005 debug, everything works fine. The reports are using xsd data sources and runtime parameters to pull data from SQL server. They do exactly what they are supposed to do when I run the app in VS 2005 VB.
When I run in C# VS 2008 all I get is a C++ memory exception. If I try to view or watch the exception objects, all I get is a long list of "cannot interpret because a native frame is on top of the stack" or something like that. This exception comes up before the report ever tries to query any data. If I try to set a variable to the report tables, I get an error because there are no tables, no database, nothing. I only get that message about the native frame on top of the stack.
The VS 2008 code is running against a new server, but even if I use the old connection strings and the old server and the old database, the reports still will not run in VS 2008. The VS 2005 code and reports all runs against the old server and old database.
Some of the reports will display data correctly in design mode preview, while others display some default stuff like colors names and data types. Why do they display correct data in design mode, but then wont work in runtime? Is this a compatibility issue? A framework version issue? Am I going to have to recreate these reports from scratch using the VS 2008 designer? Or is there a way to "import" them and "upgrade" them using the existing reports created in VS 2005?
The existing application includes about 50 reports that were created in VS 2005. When I run the old app in VS 2005 debug, everything works fine. The reports are using xsd data sources and runtime parameters to pull data from SQL server. They do exactly what they are supposed to do when I run the app in VS 2005 VB.
When I run in C# VS 2008 all I get is a C++ memory exception. If I try to view or watch the exception objects, all I get is a long list of "cannot interpret because a native frame is on top of the stack" or something like that. This exception comes up before the report ever tries to query any data. If I try to set a variable to the report tables, I get an error because there are no tables, no database, nothing. I only get that message about the native frame on top of the stack.
The VS 2008 code is running against a new server, but even if I use the old connection strings and the old server and the old database, the reports still will not run in VS 2008. The VS 2005 code and reports all runs against the old server and old database.
Some of the reports will display data correctly in design mode preview, while others display some default stuff like colors names and data types. Why do they display correct data in design mode, but then wont work in runtime? Is this a compatibility issue? A framework version issue? Am I going to have to recreate these reports from scratch using the VS 2008 designer? Or is there a way to "import" them and "upgrade" them using the existing reports created in VS 2005?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
The exact runtime error is:
First-chance exception at 0x7c812aeb (kernel32.dll) in UHHM.exe: Microsoft C++ exception: _com_error at memory location 0x0012d5f4..
While in break mode, when I mouse over the report object I created, every property, memeber, etc of the report object says this:
"Cannot evaluate expression because a native frame is on top of the call stack."
It's as if the code does not know the report exists. If I run and break in VS2005, then I can mouse over the report object and I can see the default table, the names and values of the parameters, the names of the report fields, etc.....
First-chance exception at 0x7c812aeb (kernel32.dll) in UHHM.exe: Microsoft C++ exception: _com_error at memory location 0x0012d5f4..
While in break mode, when I mouse over the report object I created, every property, memeber, etc of the report object says this:
"Cannot evaluate expression because a native frame is on top of the call stack."
It's as if the code does not know the report exists. If I run and break in VS2005, then I can mouse over the report object and I can see the default table, the names and values of the parameters, the names of the report fields, etc.....
ASKER
I just encountered this error while trying to run a simple Crystal Report page in VS 2005. The page was created by another programmer using VS 2005, and it runs just fine on his machine. (He does not have VS 2005 and VS 2008 installed on the same machine.)
"Unable to find the report in the manifest resources. Please build the project and try again." Â
Could all of my problems stem from having both versions of VS on one machine?
"Unable to find the report in the manifest resources. Please build the project and try again." Â
Could all of my problems stem from having both versions of VS on one machine?
ASKER
I have now uninstalled VS 2005, and re-installed VS 2008, but I still get the same errors. The same code same reports runs fine on the other programmer's machine. The only difference is he has never had both versions of VS installed on his machine, he only installed VS 2008 on his.
This code instantiates the report object:
    ReportDocument Reportname = new ReportDocument();
    Reportname = new TransactionList();
    MessageBox.Show(Reportname .DataDefin ition.ToSt ring());
and I get the C++ error (given above) on the message box line, as if the report does not actually exist.
The class code associated with the report is:
namespace ABCD {
  using System;
  using System.ComponentModel;
  using CrystalDecisions.Shared;
  using CrystalDecisions.ReportSou rce;
  using CrystalDecisions.CrystalRe ports.Engi ne;
 Â
 Â
  public class TransactionList : ReportClass {
   Â
    public TransactionList() {
    }
   Â
    public override string ResourceName {
      get {
        return "TransactionList.rpt";
      }
      set {
        // Do nothing
      }
    }
   Â
    public override bool NewGenerator {
      get {
        return true;
      }
      set {
        // Do nothing
      }
    }
   Â
    public override string FullResourceName {
      get {
        return "ABCD.TransactionList.rpt" ;
      }
      set {
        // Do nothing
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.CrystalRe ports.Engi ne.Section Section1 {
      get {
        return this.ReportDefinition.Sect ions[0];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.CrystalRe ports.Engi ne.Section Section2 {
      get {
        return this.ReportDefinition.Sect ions[1];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.CrystalRe ports.Engi ne.Section GroupHeaderSection1 {
      get {
        return this.ReportDefinition.Sect ions[2];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.CrystalRe ports.Engi ne.Section Section3 {
      get {
        return this.ReportDefinition.Sect ions[3];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.CrystalRe ports.Engi ne.Section GroupFooterSection1 {
      get {
        return this.ReportDefinition.Sect ions[4];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.CrystalRe ports.Engi ne.Section Section4 {
      get {
        return this.ReportDefinition.Sect ions[5];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.CrystalRe ports.Engi ne.Section Section5 {
      get {
        return this.ReportDefinition.Sect ions[6];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.Shared.IP arameterFi eld Parameter_AccountName {
      get {
        return this.DataDefinition.Parame terFields[ 0];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.Shared.IP arameterFi eld Parameter_Where {
      get {
        return this.DataDefinition.Parame terFields[ 1];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.Shared.IP arameterFi eld Parameter_Title {
      get {
        return this.DataDefinition.Parame terFields[ 2];
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public CrystalDecisions.Shared.IP arameterFi eld Parameter_PageFooter {
      get {
        return this.DataDefinition.Parame terFields[ 3];
      }
    }
  }
 Â
  [System.Drawing.ToolboxBit mapAttribu te(typeof( CrystalDec isions.Sha red.Export Options), "report.bmp")]
  public class CachedTransactionList : Component, ICachedReport {
   Â
    public CachedTransactionList() {
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public virtual bool IsCacheable {
      get {
        return true;
      }
      set {
        //
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public virtual bool ShareDBLogonInfo {
      get {
        return false;
      }
      set {
        //
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi bilityAttr ibute(Syst em.Compone ntModel.De signerSeri alizationV isibility. Hidden)]
    public virtual System.TimeSpan CacheTimeOut {
      get {
        return CachedReportConstants.DEFA ULT_TIMEOU T;
      }
      set {
        //
      }
    }
   Â
    public virtual CrystalDecisions.CrystalRe ports.Engi ne.ReportD ocument CreateReport() {
      TransactionList rpt = new TransactionList();
      rpt.Site = this.Site;
      return rpt;
    }
   Â
    public virtual string GetCustomizedCacheKey(Requ estContext request) {
      String key = null;
      // // The following is the code used to generate the default
      // // cache key for caching report jobs in the ASP.NET Cache.
      // // Feel free to modify this code to suit your needs.
      // // Returning key == null causes the default cache key to
      // // be generated.
      //
      // key = RequestContext.BuildComple teCacheKey (
      //   request,
      //   null,    // sReportFilename
      //   this.GetType(),
      //   this.ShareDBLogonInfo );
      return key;
    }
  }
}
This code instantiates the report object:
    ReportDocument Reportname = new ReportDocument();
    Reportname = new TransactionList();
    MessageBox.Show(Reportname
and I get the C++ error (given above) on the message box line, as if the report does not actually exist.
The class code associated with the report is:
namespace ABCD {
  using System;
  using System.ComponentModel;
  using CrystalDecisions.Shared;
  using CrystalDecisions.ReportSou
  using CrystalDecisions.CrystalRe
 Â
 Â
  public class TransactionList : ReportClass {
   Â
    public TransactionList() {
    }
   Â
    public override string ResourceName {
      get {
        return "TransactionList.rpt";
      }
      set {
        // Do nothing
      }
    }
   Â
    public override bool NewGenerator {
      get {
        return true;
      }
      set {
        // Do nothing
      }
    }
   Â
    public override string FullResourceName {
      get {
        return "ABCD.TransactionList.rpt"
      }
      set {
        // Do nothing
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.CrystalRe
      get {
        return this.ReportDefinition.Sect
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.CrystalRe
      get {
        return this.ReportDefinition.Sect
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.CrystalRe
      get {
        return this.ReportDefinition.Sect
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.CrystalRe
      get {
        return this.ReportDefinition.Sect
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.CrystalRe
      get {
        return this.ReportDefinition.Sect
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.CrystalRe
      get {
        return this.ReportDefinition.Sect
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.CrystalRe
      get {
        return this.ReportDefinition.Sect
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.Shared.IP
      get {
        return this.DataDefinition.Parame
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.Shared.IP
      get {
        return this.DataDefinition.Parame
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.Shared.IP
      get {
        return this.DataDefinition.Parame
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public CrystalDecisions.Shared.IP
      get {
        return this.DataDefinition.Parame
      }
    }
  }
 Â
  [System.Drawing.ToolboxBit
  public class CachedTransactionList : Component, ICachedReport {
   Â
    public CachedTransactionList() {
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public virtual bool IsCacheable {
      get {
        return true;
      }
      set {
        //
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public virtual bool ShareDBLogonInfo {
      get {
        return false;
      }
      set {
        //
      }
    }
   Â
    [Browsable(false)]
    [DesignerSerializationVisi
    public virtual System.TimeSpan CacheTimeOut {
      get {
        return CachedReportConstants.DEFA
      }
      set {
        //
      }
    }
   Â
    public virtual CrystalDecisions.CrystalRe
      TransactionList rpt = new TransactionList();
      rpt.Site = this.Site;
      return rpt;
    }
   Â
    public virtual string GetCustomizedCacheKey(Requ
      String key = null;
      // // The following is the code used to generate the default
      // // cache key for caching report jobs in the ASP.NET Cache.
      // // Feel free to modify this code to suit your needs.
      // // Returning key == null causes the default cache key to
      // // be generated.
      //
      // key = RequestContext.BuildComple
      //   request,
      //   null,    // sReportFilename
      //   this.GetType(),
      //   this.ShareDBLogonInfo );
      return key;
    }
  }
}
ASKER
After stopping at a break point, and mousing over the object to read the properties, I concluded that the code is not actually creating a report because it cannot find the rpt file. The list of properties on mouseover said something like "file not found" or path not found, etc....
So I changed the path in the report's cs class file code and hard coded it to the C: drive path to the rpt file on my local hard drive. When I run it now I get this error:
"A first chance exception of type 'CrystalDecisions.CrystalR eports.Eng ine.LoadSa veReportEx ception' occurred in CrystalDecisions.CrystalRe ports.Engi ne.dll
Additional information: Unable to find the report in the manifest resources. Please build the project, and try again."
Isn't this implying that the project does not know where the rpt file is?? This is an rpt file that I created from scratch in the VS Crystal Designer in the IDE.
So I changed the path in the report's cs class file code and hard coded it to the C: drive path to the rpt file on my local hard drive. When I run it now I get this error:
"A first chance exception of type 'CrystalDecisions.CrystalR
Additional information: Unable to find the report in the manifest resources. Please build the project, and try again."
Isn't this implying that the project does not know where the rpt file is?? This is an rpt file that I created from scratch in the VS Crystal Designer in the IDE.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks, that's an interesting read. The behaviour I am getting is similar, except that my code will never continue. I get 2 or 3 messages saying "Windows cannot continue from this exception".
I will try changing the debug settings on Monday when I can get back to the office. This may explain why my code runs fine on the other programmer's machine, because his "Exceptions" settings are different than mine. Also why it runs ok in VS 2005, because I had default "Exceptions" settings in VS 2005. (but I have uninstalled 2005 now)
Good lead, I will definitely check into this. Thanks!
I will try changing the debug settings on Monday when I can get back to the office. This may explain why my code runs fine on the other programmer's machine, because his "Exceptions" settings are different than mine. Also why it runs ok in VS 2005, because I had default "Exceptions" settings in VS 2005. (but I have uninstalled 2005 now)
Good lead, I will definitely check into this. Thanks!
ASKER
I tried changing the debug settings as suggested in the article, but I still get this error. Doesn't matter if I'm in debug mode or if I compile and run the executable, same error pops up.
CrystalDecisions.CrystalRe ports.Engi ne.LoadSav eReportExc eption: Unable to find the report in the manifest resources. Please build the project, and try again.
The rpt file is located exactly where the code says it should be, but I have no idea how to "fix" this manifest, which only has about 10 or 12 lines of xml in it. Sorry, I'm new at this stuff.
CrystalDecisions.CrystalRe
The rpt file is located exactly where the code says it should be, but I have no idea how to "fix" this manifest, which only has about 10 or 12 lines of xml in it. Sorry, I'm new at this stuff.
ASKER
Here is the exception in its entirety:
CrystalDecisions.CrystalRe ports.Engi ne.LoadSav eReportExc eption: Unable to find the report in the manifest resources. Please build the project, and try again.
  at CrystalDecisions.CrystalRe ports.Engi ne.EngineE xceptionUt ils.DoThro wException (String message, EngineExceptionErrorID id)
  at CrystalDecisions.CrystalRe ports.Engi ne.Excepti onThrower. ThrowEngin eException (String messageID, EngineExceptionErrorID id)
  at CrystalDecisions.CrystalRe ports.Engi ne.ReportC lass.Load( String reportName, OpenReportMethod openMethod, Int16 parentJob)
  at CrystalDecisions.CrystalRe ports.Engi ne.ReportD ocument.En sureLoadRe port()
  at CrystalDecisions.CrystalRe ports.Engi ne.ReportD ocument.ge t_DataDefi nition()
  at UHHM.frmCashReportsXML.btn Transactio nList_Clic k(Object sender, EventArgs e) in C:\Housing\Housing\UHHM\UH HM\frmCash ReportsXML .cs:line 771
  at System.Windows.Forms.Contr ol.OnClick (EventArgs e)
  at System.Windows.Forms.Butto n.OnClick( EventArgs e)
  at System.Windows.Forms.Butto n.OnMouseU p(MouseEve ntArgs mevent)
  at System.Windows.Forms.Contr ol.WmMouse Up(Message & m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Contr ol.WndProc (Message& m)
  at System.Windows.Forms.Butto nBase.WndP roc(Messag e& m)
  at System.Windows.Forms.Butto n.WndProc( Message& m)
  at System.Windows.Forms.Contr ol.Control NativeWind ow.OnMessa ge(Message & m)
  at System.Windows.Forms.Contr ol.Control NativeWind ow.WndProc (Message& m)
  at System.Windows.Forms.Nativ eWindow.Ca llback(Int Ptr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/Microso ft.NET/Fra mework/v2. 0.50727/ms corlib.dll
-------------------------- ---------- ----
UHHM
  Assembly Version: 1.0.0.0
  Win32 Version: 1.0.0.0
  CodeBase: file:///C:/Housing/Housing /UHHM/UHHM /bin/Debug /UHHM.exe
-------------------------- ---------- ----
System.Windows.Forms
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Wi ndows.Form s/2.0.0.0_ _b77a5c561 934e089/Sy stem.Windo ws.Forms.d ll
-------------------------- ---------- ----
System
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System/2. 0.0.0__b77 a5c561934e 089/System .dll
-------------------------- ---------- ----
System.Drawing
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Dr awing/2.0. 0.0__b03f5 f7f11d50a3 a/System.D rawing.dll
-------------------------- ---------- ----
Microsoft.VisualBasic
  Assembly Version: 8.0.0.0
  Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /Microsoft .VisualBas ic/8.0.0.0 __b03f5f7f 11d50a3a/M icrosoft.V isualBasic .dll
-------------------------- ---------- ----
System.Configuration
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Co nfiguratio n/2.0.0.0_ _b03f5f7f1 1d50a3a/Sy stem.Confi guration.d ll
-------------------------- ---------- ----
System.Xml
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Xm l/2.0.0.0_ _b77a5c561 934e089/Sy stem.Xml.d ll
-------------------------- ---------- ----
System.Data
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_32/S ystem.Data /2.0.0.0__ b77a5c5619 34e089/Sys tem.Data.d ll
-------------------------- ---------- ----
System.Data.DataSetExtensi ons
  Assembly Version: 3.5.0.0
  Win32 Version: 3.5.30729.1 built by: SP
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Da ta.DataSet Extensions /3.5.0.0__ b77a5c5619 34e089/Sys tem.Data.D ataSetExte nsions.dll
-------------------------- ---------- ----
System.Core
  Assembly Version: 3.5.0.0
  Win32 Version: 3.5.30729.1 built by: SP
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Co re/3.5.0.0 __b77a5c56 1934e089/S ystem.Core .dll
-------------------------- ---------- ----
System.Transactions
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_32/S ystem.Tran sactions/2 .0.0.0__b7 7a5c561934 e089/Syste m.Transact ions.dll
-------------------------- ---------- ----
System.EnterpriseServices
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_32/S ystem.Ente rpriseServ ices/2.0.0 .0__b03f5f 7f11d50a3a /System.En terpriseSe rvices.dll
-------------------------- ---------- ----
CrystalDecisions.Windows.F orms
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Wi ndows.Form s/10.5.370 0.0__692fb ea5521e130 4/CrystalD ecisions.W indows.For ms.dll
-------------------------- ---------- ----
CrystalDecisions.Shared
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Sh ared/10.5. 3700.0__69 2fbea5521e 1304/Cryst alDecision s.Shared.d ll
-------------------------- ---------- ----
CrystalDecisions.ReportSou rce
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Re portSource /10.5.3700 .0__692fbe a5521e1304 /CrystalDe cisions.Re portSource .dll
-------------------------- ---------- ----
System.Web
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_32/S ystem.Web/ 2.0.0.0__b 03f5f7f11d 50a3a/Syst em.Web.dll
-------------------------- ---------- ----
CrystalDecisions.CrystalRe ports.Engi ne
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Cr ystalRepor ts.Engine/ 10.5.3700. 0__692fbea 5521e1304/ CrystalDec isions.Cry stalReport s.Engine.d ll
-------------------------- ---------- ----
CrystalDecisions.ReportApp Server.Com mLayer
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Re portAppSer ver.CommLa yer/10.5.3 700.0__692 fbea5521e1 304/Crysta lDecisions .ReportApp Server.Com mLayer.dll
-------------------------- ---------- ----
CrystalDecisions.ReportApp Server.Cli entDoc
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Re portAppSer ver.Client Doc/10.5.3 700.0__692 fbea5521e1 304/Crysta lDecisions .ReportApp Server.Cli entDoc.dll
-------------------------- ---------- ----
CrystalDecisions.ReportApp Server.Dat aSetConver sion
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Re portAppSer ver.DataSe tConversio n/10.5.370 0.0__692fb ea5521e130 4/CrystalD ecisions.R eportAppSe rver.DataS etConversi on.dll
-------------------------- ---------- ----
CrystalDecisions.ReportApp Server.Dat aDefModel
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Re portAppSer ver.DataDe fModel/10. 5.3700.0__ 692fbea552 1e1304/Cry stalDecisi ons.Report AppServer. DataDefMod el.dll
-------------------------- ---------- ----
CrystalDecisions.ReportApp Server.Con trollers
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Re portAppSer ver.Contro llers/10.5 .3700.0__6 92fbea5521 e1304/Crys talDecisio ns.ReportA ppServer.C ontrollers .dll
-------------------------- ---------- ----
CrystalDecisions.ReportApp Server.Rep ortDefMode l
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Re portAppSer ver.Report DefModel/1 0.5.3700.0 __692fbea5 521e1304/C rystalDeci sions.Repo rtAppServe r.ReportDe fModel.dll
-------------------------- ---------- ----
CrystalDecisions.KeyCode
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /CrystalDe cisions.Ke yCode/10.5 .3700.0__6 92fbea5521 e1304/Crys talDecisio ns.KeyCode .dll
-------------------------- ---------- ----
CrystalDecisions.CrystalRe
  at CrystalDecisions.CrystalRe
  at CrystalDecisions.CrystalRe
  at CrystalDecisions.CrystalRe
  at CrystalDecisions.CrystalRe
  at CrystalDecisions.CrystalRe
  at UHHM.frmCashReportsXML.btn
  at System.Windows.Forms.Contr
  at System.Windows.Forms.Butto
  at System.Windows.Forms.Butto
  at System.Windows.Forms.Contr
  at System.Windows.Forms.Contr
  at System.Windows.Forms.Butto
  at System.Windows.Forms.Butto
  at System.Windows.Forms.Contr
  at System.Windows.Forms.Contr
  at System.Windows.Forms.Nativ
************** Loaded Assemblies **************
mscorlib
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/Microso
--------------------------
UHHM
  Assembly Version: 1.0.0.0
  Win32 Version: 1.0.0.0
  CodeBase: file:///C:/Housing/Housing
--------------------------
System.Windows.Forms
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Drawing
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
Microsoft.VisualBasic
  Assembly Version: 8.0.0.0
  Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Configuration
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Xml
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Data
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Data.DataSetExtensi
  Assembly Version: 3.5.0.0
  Win32 Version: 3.5.30729.1 built by: SP
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Core
  Assembly Version: 3.5.0.0
  Win32 Version: 3.5.30729.1 built by: SP
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Transactions
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.EnterpriseServices
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.Windows.F
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.Shared
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.ReportSou
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Web
  Assembly Version: 2.0.0.0
  Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.CrystalRe
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.ReportApp
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.ReportApp
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.ReportApp
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.ReportApp
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.ReportApp
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.ReportApp
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
CrystalDecisions.KeyCode
  Assembly Version: 10.5.3700.0
  Win32 Version: 10.5.0.1943
  CodeBase: file:///C:/WINDOWS/assembl
--------------------------
Are you running this on the development machine or have you deployed it?
mlmcc
mlmcc
ASKER
Running on my own machine, entirely in development at this point. The only thing that is not on my machine is the SQL (test) database.
I don't know enough C# to really help
mlmcc
mlmcc
ASKER
It's been suggested that the way the cs wrapper class is created by VS 2008 is quite different than the wrapper class created by VS2003 or 2005. Tech support was able to demonstrate that the Crystal dll's are workign correctly, and the references in my project are correct. They believe this error/s is caused by the way I am instantiating the report by invoking the wrapper class constructor. The cs wrapper classes I ahve were generated in VS 2005 (possibly in VS 2003) and all I did was run the code thru a VB-to-C# converter and add them to my VS 2008 project. That might explain why the manifest does not recognize the file. Â
I noticed that one of my reports started working correctly after I accidentally deleted it and had to recreate it from scratch, thereby causing VS 2008 to generate a new wrapper class.
I'm wondering if there is a way to manually remove the existing wrapper class for the report and force VS to generate a new one, without having to recreate all of the reports from scratch?
I noticed that one of my reports started working correctly after I accidentally deleted it and had to recreate it from scratch, thereby causing VS 2008 to generate a new wrapper class.
I'm wondering if there is a way to manually remove the existing wrapper class for the report and force VS to generate a new one, without having to recreate all of the reports from scratch?
ASKER
Thanks for your time, you helped point me to an overall solution.
I noticed that after I edit the code of the .cs file and remove the following lines, it works. The problem is, the lines keep coming back on subsequent edits and I have to keep removing the lines over and over again every time I make changes to the report:
    public override bool NewGenerator {
      get {
        return true;
      }
      set {
        // Do nothing
      }
    }
   Â
    public override string FullResourceName {
      get {
        return "NuclearCardiologyReports. Crystal Reports.ThalliumRestOnly24 HourFinalR eport.rpt" ;
      }
      set {
        // Do nothing
      }
    }
   Â
Crystal Reports needs a fix. I have so many reports that it would be costly to redo them.
    public override bool NewGenerator {
      get {
        return true;
      }
      set {
        // Do nothing
      }
    }
   Â
    public override string FullResourceName {
      get {
        return "NuclearCardiologyReports.
      }
      set {
        // Do nothing
      }
    }
   Â
Crystal Reports needs a fix. I have so many reports that it would be costly to redo them.
ASKER
The errors happen as soon as the ReportDocument object is set to a new instance of the report class. For example, I have MyReport.rpt and MyReport.cs files included in the project. I do something like this:
ReportDocument crMyReport = new ReportDocument();
crMyReport = MyReport();
(I dont have the exact code here in front of me right now, sorry)
The constructor in MyReport.cs is empty. Those two lines work fine, but then the next line I try setting MyTables = crMyReport.Tables and that's when the exceptions start. It's as if the report class never gets instantiated properly, there is no default table or database or parameters or anything in the report object. When I mouse over it, every property of the report object has that line about "Cannot interpret because a native frame is on top of the stack."
Is there something about using xsd files I am missing? I've never used them before, but the guy who wrote the original code and reports using VB and VS 2005 has a data source with xsd and xss files for each report. I assume the reports work in the designer because they are not using the C# code to run. I am not glued to the xml data source thing either. I can change the database methods if necessary, but I dont think that's the problem. I dont think the report object is ever getting to the point where it talks to the SQL server. The exceptions come up before that ever happens.
I have the option to try installing the full version of Crystal Reports XI. I also have thought about transferring the new C# code back to VS 2005 just to see if it runs correctly there, since our main goal is to switch over to C#, not necessarily to be using VS 2008. If I knew how to use SQL Reporting Services I would be tempted to abandon Crystal.