SAP Knowledge Base Article - Public

2388686 - Crystal Reports Dynamic Parameter Best Practice

Symptom

  • What are the best practice for parameter list of values (LOV)?
  • What are the best practice when using dynamic parameter in Crystal 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 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020

Cause

  • In Crystal Reports, when creating a dynamic parameter on the fly, and saving the report to the SAP BusinessObjects Enterprise Repository, it generates the following objects, In the SAP BusinessObjects Repository folder: "Dynamic Cascading Prompts":
        
       - Data Connection
       - Data Foundation
       - Business Element
       - Business View
       - List of Values (LOV)
       - Prompt Group
                     
  • This was designed to facilitate the process of creating dynamic parameters, but the big drawback is when you create multiple reports with dynamic parameters, it will generates a large number of objects in the SAP BusinessObjects Repository, which will become very hard to manage in the future because you will have numerous data connections, many business views, a large number of List of Values (LOV).
           
  • All those objects are required when promoting the reports from one environment to another one, or when migrating the reports from one SAP BusinessObjects BI Platform to another one.
        
  • Simple tasks like changing the data source, will become a time consuming task, because you will have to find what are all the data connections that needs to be updated, for all the List of Values used.
         
  • Over time, it will become increasingly difficult to manage all those objects, as it will consistently increase every time you create new dynamic parameters, and when there is a large number List of Value sobjects, there is the potential to slow down the CMS database, and so on...

Resolution

  • The best practice when creating dynamic parameter on a report in Crystal Reports are:**
     
    • To create the List of Values in the Business View Manager, and
       
    • Re-use the same List of Values for all the dynamic parameter that needs the same dynamic list of values. 
       
      ** It is the best practice for reports based on all data sources, except for reports based of SAP BW BEx Query, or Universe, because those reports are not using Business Views List of Values for the dynamic parameter.
           
            
  • The advantages of creating the List of Values in the Business View Manager are:
         
    • One Data Connection per data source, instead of numerous Data Connections, therefore it is easier to update the data source connection when necessary.
        
    • Full control over how each of the objects are created. (Data Connection, Data Foundation, List of Values, ...)
         
    • Easier to manage as there is significantly less objects in the repository, as the List of Values are re-used.
       
    • Easier to promote or migrate the List of Values, due to the fact there is less objects.
        
          
        
  • Below are the general step on how to create a List of Values in the Business View Manager, and use the List of Values created for your report dynamic parameter:
       
    1. Launch the Business View Manager, and logon to your SAP BusinessObjects Repository.
        
    2. Under the menu "File", select "New - Data Connection", and select the desired data source to connect to.
        
    3. Save the Data Connection to the SAP BusinessObjects Repository.
        
    4. Under the menu "File", select "New - Data Foundation", then select the Data Connection created in previous step, then add the desired table(s).
         
    5. Save the Data Foundation to the SAP BusinessObjects Repository.
        
    6. Under the menu "File", select "New - Business Element", then select the Data Foundation created in previous step, then add the desired field(s).
        
    7. Save the Business Element to the SAP BusinessObjects Repository.
          
    8. Under the menu "File", select "New - Business View", then select the Business Element created in previous step.
         
    9. Save the Business View to the SAP BusinessObjects Repository.
        
    10. Under the menu "File", select "New - List of Values", then select the Business View created in previous step, then add the field to use for the List of Values.
        
    11. Click on "Refresh Status" once and save the List of Values to the SAP BusinessObjects Repository.
        
    12. Close Business View Manager.
       
    13. In Crystal Reports, create a report off any data source, or open an existing report.
       
    14. Under the menu "View", select "Repository Explorer".
       
    15. In the "Repository Explorer" pane, which is ususally located on the right side, click on the Logon button to logon to the SAP BusinessObjects Repository.
       
    16. Then in the "Field Explorer" pane, create a new parameter.
       
    17. In the "Create New Parameter" window, select "Dynamic" for the "List of Values" option.
         
         DP-01.png
        
           
        
    18. Then under "Choose a Data Source", select "Existing", and in the drop-down list, select the List of Values created in the Business View Manager.
        
         DP-02.png
        
         
         
    19. Click "OK" to create the parameter.
        

Keywords

CR, LOV , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , BI-BIP-ADM , BI Servers, security, Crystal Reports in Launchpad , How To

Product

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