Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 Crystal Reports: How do I set the logging level?

Since log4net is shipped with CR for VS2010, it stands to reason that stuff is logged. How do I set the CR log level to debug so I can figure out what's going on with my report?

I should clarify, I have log4net already working in my project, I'm just not seeing anything from CrystalReports.

like image 636
Jeremy Holovacs Avatar asked Jun 26 '12 17:06

Jeremy Holovacs


1 Answers

This link contains details on how to enable extra logging:

https://apps.support.sap.com/sap/support/knowledge/public/en/0001470978

Excerpt:

  1. Create two .reg files called logging-on.reg and logging-off.reg using Notepad.
  2. Copy the text from the appropriate section below into each .reg file and save it.
  3. Copy the .reg files to the system where you need to do your logging.
  4. Double click the logging-on.reg file and merge the contents into the registry.
  5. Restart IIS, service, or Windows application you are monitoring. Note: The logging won't work if the Crystal runtime files are already in memory.
  6. Run the application until the point of failure, or your error message.
  7. Locate the .log files in your temp directory.
    • Windows XP; C:\Documents and Settings\\Local Settings\Temp
    • Windows Vista, 7, Server 2008; C:\Users\\AppData\Local\Temp
    • Windows Server 2008 running Visual Studio IDE creates a subfolder \2 ( in my case ) that VS uses as a temp folder. This is where the log files are located
  8. They will be named according to the application. For example, if your app is called mySlowReport.exe - the log files will be named:
    • mySlowReport.crpe.bkgrnd.log
    • mySlowReport.crpe.Diagnostics.log
    • mySlowReport.crpe.functions.log

Crystal Reports for Visual Studio 2010

Note The log file extension created by Crystal for Visual Studio 2010 is .GLF.

Enable Logging

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
"Destinations"=dword:00000003
"Position"=dword:00000003
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
"Destinations"=dword:00000003
"Position"=dword:00000003
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
"Destinations"=dword:00000003
"LogErrorsOnly"=dword:00000000
"Position"=dword:00000003
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
"Destinations"=dword:00000003
"Position"=dword:00000003
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
"Destinations"=dword:00000003
"Position"=dword:00000003
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
"Destinations"=dword:00000003
"LogErrorsOnly"=dword:00000000
"Position"=dword:00000003

Disable Logging

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
"Destinations"=dword:00000000
"Position"=dword:00000000
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
"Destinations"=dword:00000000
"Position"=dword:00000000
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
"Destinations"=dword:00000000
"LogErrorsOnly"=dword:00000000
"Position"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
"Destinations"=dword:00000000
"Position"=dword:00000000
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
"Destinations"=dword:00000000
"Position"=dword:00000000
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
"Destinations"=dword:00000000
"LogErrorsOnly"=dword:00000000
"Position"=dword:00000000
like image 113
Ken Avatar answered Nov 05 '22 15:11

Ken