Search This Blog

2011-08-18

Crystal Report - Delete unused dynamic parameter group

Product: Crystal Report 2008 - XI

Whenever dynamic parameter is used with new parameter defined, Crystal Report automatically creates following
1. Data Foundation - Visible in Business View Manager
2. Business Element - Visible in Business View Manager
3. Business View - Visible in Business View Manager
4. List of Values - Visible in Crystal Report
5. Prompt Group - Visible in Crystal Report

Note: "Visible" above means without using "Repository Explorer," above objects are usable from File - Open (Business View Manager), or parameter selection (Crystal Report)

Therefore, after report design finalize, a lot of unused objects will left behind. This post shows the tool and step used to remove any object above, but I use prompt group as an example

For this example, I use new dynamic view for table called Budget with parameter filter on department. Following are automatically created (this is the 2nd report using Budget table, so it automatically added "_1" to all the name)
1. Data Connection - Budget DC_1
2. Data Foundation - Budget DF_1
3. Business Element - Budget BE_1
4. Business View - Budget BV_1
5. List of Values - Budget > Department_1
6. Prompt Group - Budget > Department_1 - Prompt Group_1

As you can see above, if I have daily, weekly, monthly, quarterly, and yearly tables, the naming convention above will be very confusing to be reuse.

Following these steps to delete unwanted (or rename) them:

1. In Crystal Report designer, open the prompt group to find out the List-of-Value (LOV) name

Launch Business View Manager, and login to Crystal Report server as Administrator (any user who has privilege)
Open Repository Explorer from pull down menu View - Repository Explorer
Repository Explorer will show up on right panel, unless you have moved it to somewhere else
Inside Repository Explorer, open the folder where above objects store. In my case, I use folder name "Custom Daily"
Select prompt name "Budget Prompt Prompt Group 2"
On toolbar, click on X to delete
Close any open window which accessing the object. Business View Manager will show an error if the object is currently open. Inform everyone to close

Although Crystal Report (designer interface) can see Repository Explorer, it can't delete these objects .

Automated creation of these object has automated naming convention which is confusing and not easily reusable for other report design.

Therefore, for cleaner and proper report design, it is best to delete unused objects, as well as rename them.

This procedure can be used to rename the objects as well by right click on them, and click Rename

If the prompt has been remove and created again, this will be the prompt group name. You can see it is very messy

Budget > Department_1 - Department_1 - Prompt Group_1

Moreover, this name needs to update in the select formula which is affecting the readability, especially during troubleshooting

Please leave me a positive comment if this post help

Please use following PayPal donate if my post helped

No comments: