SAP Knowledge Base Article - Public

1198654 - Custom Functions do not get updated automatically after being modified, when refreshing reports in Crystal Reports or in SAP BI LaunchPad

Symptom

  • Repository Function no updated.
  • Custom Function used on the report, uses the old code, instead of the new updated one.
  • After updating a Customer Function stored in the repository, it does not update it when viewed in Crystal Reports, or in SAP BI LaunchPad.
  • A Custom Function is saved to the Repository and is used in report formula. When the Custom Function stored in the Repository is modified, the change should appear in all the reports with Formulas using the Custom Function. However, the change does not appear on the reports.
      

  • Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020
             
  • SAP BusinessObjects Business Intelligence platform 4.0
  • SAP BusinessObjects Business Intelligence platform 4.1
  • SAP BusinessObjects Business Intelligence platform 4.2
  • SAP BusinessObjects Business Intelligence platform 4.3

Reproducing the Issue

  1. In Crystal Reports, create a report of any data source.
  2. Create a Custom Function.
  3. Add the Custom Function to the SAP BusinessObjects Enterprise Repository.
  4. Create a formula on the report using the Custom Function stored in the Repository.
  5. Insert the formula on the report.
  6. Save the report to SAP BusinessObjects Enterprise Repository.
  7. Update the Custom Function, and re-add it to the Repository.
  8. Re-open the report in Crystal Reports designer, or refresh the report in SAP BI LaunchPad, and notice the change to the Custom Function is not picked up.

Cause

  • Report was saved with the option "Enable Repository Refresh" unchecked.
           
  • Custom Functions stored in the Repository, and used in reports formulas will only pick the latest update when the option "Enable Repository Refresh" is checked. Otherwise, when evaluating the formula, even if the Custom Function is connected to the Repository, it will take a copy of the Custom Function stored in the report file.

Resolution

  • Check the option "Enable Repository Refresh", for each report that uses the Custom Function stored in the Repository:
      
    1. In Crystal Reports designer, open the report stored on the SAP BusinessObjects Enterprise Repository.
        
    2. Under the menu "File", select "Save As..."
        
    3. At the bottom of the "Save As" window, check the option "Enable Repository Refresh"
       
       Custom Function - 02.png
        
    4. Still in the "Save As" window, save the report in the same folder, and with the same name. 
        
    5. When the following warning will display, click "Yes"

        <Report File Name.rpt> already exists.
         Do you want to replace it?

      Now, when viewing the report in SAP BI LaunchPad, or opening the report in Crystal Reports designer, it will first retreive the updated copy of the Custom Function stored in the Repository, before refreshing the report
         
           
           
  • Also, as an alternative solution to enable a report to use the updated function, you can: 
        
    1. Login to the Central Management Console (CMC)  
    2. Navigate to the report.
    3. Right click on the report and select in the contextual menu "Refresh Options"
    4. Check the option "Use Object Repository when refreshing report"
    5. Click on the "Refresh Report" button.
          
      Now, the report will be using the latest update of the function.
      For each report that uses the function that was updated in the repository, perform the above steps.

Keywords

CR, Repository Custom Functions, Report custom functions, Custom function not updated, reporting tab , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , BI-BIP-ADM , BI Servers, security, Crystal Reports in Launchpad , Problem

Product

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