How can I better manage my Crystal Reports Dynamic Prompts?
Answer:
There are 2 ways you can create Dynamic Prompts in Crystal Reports XIR2:
- In the Crystal Reports application.
OR
- In the Business View Manager application (if you have purchased Business Objects Enterprise).
The first method, creating the Dynamic Prompt in the Crystal Reports application (detailed below) has these disadvantages:
- If you publish the Crystal report to the Business Objects Enterprise, the dynamic prompt automatically gets created in Business View Manager, so you could potentially be overwriting a dynamic prompt already created with the same name in the system.
- You do not have a clear view or inventory of all dynamic prompts created in the system.
- You cannot schedule the prompt to be refreshed at regular intervals within Crystal Reports to speed up report processing time.
Creating a Dynamic Prompt in Crystal Reports:
- Right-click on Parameter Fields in the Field Explorer and select New.
- Type in the name for your Prompt field (Supervisor ID in this example).
- Select the data type for the prompt (number in this example).
- Select Dynamic from the List of Values drop-down menu in the upper right-hand corner.
- Click on the Value field and select the database field you want as your values for the prompt.
- Select any other options in the Options section on the bottom of the screen and then click OK to save the new Dynamic Prompt.
- Now publish the report to Business Objects Enterprise by going to the File>Save As> and selecting Enterprise folder (see below). Select the appropriate Enterprise folder to save the report and click on the Save button.
- Now, open up Business View Manager and open the Repository Explorer (if it doesn’t automatically open, go to the View menu and select Repository Explorer).
- Notice that under the Dynamic Cascading Prompts folder your new prompt (Supervisor ID is this example) has been created automatically.
The second method (detailed below), creating the Dynamic Prompt in the Business View Manager application has these advantages:
- Assists you in successfully managing all dynamic prompts from one area.
- Allows all report developers to share dynamic prompts with each other without having to re-create them or run the risk of overwriting each other’s work.
- Allows you to schedule fairly “static” or large prompts to improve report performance.
Creating a Prompt in Business View Manager:
- First create a Data Connection, which is the connection to the data source that holds your prompt values. Give your data connection a name (naming convention is name DC) and save it to the Repository. Example below SupervisorID DC save in Dynamic Cascading Prompts Repository folder. File menu>New>Data Connection
- Next create a Data Foundation which will be based off of the Data Connection you just created below (see below, example: select the Data Connection named: SupervisorID DC). This is the step you will choose the table you want to use for your prompt. File menu>New>Data Foundation
- Next, name your Data Foundation (naming convention name DF). Example below: Supervisor ID DF and save it to the Repository.
- Next, create a Business Element based on your Data Foundation, this is the level you want to choose which field you want to use for your prompt value. File menu>New>Business Element
- Name your Business Element, naming convention name BE (Example: SupervisorID BE) and save it to the Repository.
- Next create a Business View that will use the Business Element you created in the previous step. File menu>New>Business View
- Name your Business View (naming convention is name BV) and save it to the Repository.
- Finally, create a List of Values based on the Business View you created in the previous step and select a field to use. Go to File menu>New>List of Values
- Name your Business View (naming convention name LOV, this example: Supervisor ID LOV) and save it to the repository.
- Now open the Crystal Report you want to use this prompt in and click on your parameter fields and select the parameter you want to make dynamic. Once you select Dynamic from the List of Values drop-down menu in the upper right-hand part of the screen, you can then select the Existing radio button (see below) and then select the SupervisorID LOV object you just created from the drop-down menu next to the radio.
- You can also go back into Business View Manager and go to the Repository Explorer and right-click on your LOV object and select Schedule List of Values to schedule this list of values. (For example, if the data doesn’t change very frequently, schedule the list to be refreshed on a weekly basis. Scheduling greatly improves report performance).
No comments:
Post a Comment