Tech Off Thread

8 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Debugging VS 2010 and CR 2010

Back to Forum: Tech Off
  • User profile image

    I am unable to debug a project which uses Crystal Reports 2010.  The same project, on the same machine, works flawlessly when installed or run directly from the "bin" folder of the Windows Application.

    The application does not fail in the traditional nature of throwing an exception but dies with an actual "hard crash". 

    I have managed to trace the offending piece of code down to the following statement:

    rd = new ReportDocument();

    Yes, the document exists and all libraries referenced do in fact exist.  The path's referenced are accessible.  The failure occurs in the load of the document, not the creation of the document object or the viewer object either.

    While I do not know why I cannot debug this project anymore, here is what has changed:

    1. The project was previously targeted at X86 client base.  The requirements have been altered for either X86 or X64 clients.  Thus the project was set to "Any CPU".
    2. All references were removed and recreated using the correct 13.0.2000.0 flavored libraries.
    3. The development box now has Crystal 2010 and the run-times for 32 and 64 bit loaded.
    4. The development box is a X64 system running 12 GB of memory. 

    Again, the problem I am having is one of debugging and not experienced by the end users.  Using Administrative mode or normal credentials makes no difference.


    Do I have a Visual Studio problem or a Crystal Reports problem?  Any ideas??


  • User profile image

    My bet is Crystal Reports has some issues with 64-bit debugging.

    My personal experiences have left a large bias against CR. Sorry for your pain.

  • User profile image

    While I thank you for your shared lack of enthusiasm with Crystal, I am stuck in a technological bubble.

    I am putting my money on the VS 2010 suite being the culprit.  The fact that I am running the development environment as a Win32.exe might be causing grief when trying to debug a X64 based client.  I know you cannot mix X86 and X64 exe/dll's however that appears to be the case when trying to run X64 items under VS. 

    Given that when I take VS out of the equation things work, I point my finger at VS.  Now if somebody can tell me how they are testing  and debugging X64 client apps under windows 7 using a X64 based machine on the same box as your Visual Studio instance I suspect we will have an answer.



  • User profile image

    We have a large application under the same environment and it works just fine when debugging.

    The following are installed on the dev box:

    SAP Crystal Reports runtime engine for .NET Framework 4 (64-bit)

    SAP Crystal Reports, version for Visual Studio 2010


  • User profile image

    @lensman: I would still imagine a missing or failing CR dll is most likely, purely from experience.

    reportWithPath long is this file path? Perhaps too long for CR? 

    I want every reason to avoid CR. Can you help? j/k


    Best wishes.

  • User profile image

    @davewill: How is it targeted?  Is the target set to "Any CPU" or "X86" or "x64"?  My development box has both 32 and 64 run times of crystal installed.  Again the problem occurs only when running the application under VS 2010. On the same hardware (or any random client), the program functions successfully without error.





  • User profile image

    @JohnAskew:While I would love to blame Crystal, I still am giving them the benefit of the doubt.  The identical code has been running since 2006 with the exception of switching the version of crystal AND the "target" of the application. 

    Previous incarnations of this program ran as a targeted X86 application. Crystal XI-R2 was the platform of choice with crystal.  Due to changes in the RTF language specifications since Office 97/2000 my clients needed a new RTF engine to print reports containing word documents  (thus the necessity to upgrade to Crystal 2010).

    As to the file path?  It is less than 32 characters including the file name and contains no spaces.  I know it is legal.  I know crystal has problems with extremely long paths and spaces.


    As to potential solutions beyond Crystal?  Have you tried Telerik Reports?  I discovered them quite by accident and have been surprised with their simplicity.  They are quite limited when compared to  crystal however they actually work.  Long term this project is migrating to a web based solution and will be using Telerik Reports. 

    I am simply trying to figure out why I cannot debug a crystal based program under Visual Studio.  Yes, I can work around the problem however it is very inconvenient.


  • User profile image

    @lensman: Any CPU is the target.  It debugs when launching from Visual Studio as well as if the EXE is launched and then attached to in Visual Studio.

    Uninstall the 32 bit runtime (SAP Crystal Reports runtime engine for .NET Framework 4 (32-bit)).  That shouldn't be needed on a 64 bit machine.

    What support pack level do you have installed?

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.