SAP Knowledge Base Article - Public

1603398 - How to trace data source connections in Crystal Reports using crlogger? [Video]

Symptom

  • How to perform a database trace in Crystal Reports?
  • How to trace what's happening when refreshing a report in Crystal Reports?
  • How to use crlogger to generate a log when using Crystal Reports?

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020
        
  • SAP Crystal Reports, developer for Visual Studio (all versions)

Resolution

  • To perform a database trace in Crystal Reports using crlogger:
                   
    1. Add the following User Environment Variables to your local system:
        
      LOGGING_DIR = C:\logging
      LOGGING_ENABLED_ASSERT = 1
      LOGGING_ENABLED_RUNTIME = 100

      In more details:
        
      1.1  In MS Windows, in the search bar, type: Environment variables
        
      1.2  Select in the search result: Edit environment variables
        
      1.3  In the "System Properties" window, under the tab "Advanced", click on: "Environment Variables"
        
      1.4  In "Environment Variables", under the section: "User variables", click on the button "New..."
        
      1.5  In "New User Variable", enter the following:
               - Variable name: LOGGING_DIR
               - Variable value: C:\logging        
       
      1.6  Then click "OK"
       
      1.7  Add a second user variable by clicking on the button "New...", and enter:
               - Variable name: LOGGING_ENABLED_ASSERT
               - Variable value: 1      

      1.8  Then click "OK"

      1.9  Add the third user variable by clicking on the button "New...", and enter:
               - Variable name: LOGGING_ENABLED_RUNTIME
               - Variable value: 100      

      1.10  Then click "OK"

      1.11  Back to the Environment Variables window, click "OK"
        
      1.12  Back to the System Properties, click "Apply", then "OK"

    2. Open Crystal Reports or your .NET application, and run the report.       
        
    3. Once you finished reproducing the issue, the log file will be located in the directory defined in the Environment Variable:   

       LOGGING_DIR      

      In the current example, the folder was set to: c:\logging      
        
  • Important Note:
    Once the trace is no longer required, disable the trace, otherwise it can impact the report performance due to the overhead of tracing each actions.
      
  • To disable generating a trace with crlogger close Crystal Report or your .NET application, perform one of the following:
    - Remove the environment variables created in step 2, and reboot the computer; or
    - To temporarily disable logging using crlogger, change the values of the following environment variables:
      • LOGGING_ENABLED_ASSERT = 0
      • LOGGING_ENABLED_RUNTIME = 0
         

  • Below is a video demonstrating how to setup crlogger to perform a trace in Crystal Reports.
     
        

    Media not computed.

 

Keywords

CR for VS, database logging, crlogger trace tracing , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020

Attachments

crlogger.dll.12.zip