|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports Parameters: How to find where you used themSometimes, you use a parameter in a report then decide you don’t want it after all. After carefully removing the parameter from everywhere you can find it in the report, you discover that it is still being used somewhere. Apart from checking every field and every conditional format, here is an easier way to find where it is being used. Use the field explorer and edit the parameter – change it to a different data type (string, date, number, etc.). Then refresh your report. Because your parameter has changed data type, any formula using it will very likely now be invalid. So just amend or delete each error as it appears. Thanks to Bob Holmes of Massachusetts for this suggestion. His suggestion was originally published on the microsoft.public.vb.crystal newsgroup, where Bob is frequent contributor. A second method: Use File/Print/Export and select Report Definition as the format, and save as a disk file. The option creates report documentation. Search the text file for the parameter and see where it has been used. A third method: Use Report Analyzer. This is a tool you should have, anyhow, as it will show you all kinds of things about your reports. Report Analyzer automatically detects potential performance issues in your Crystal Report design settings--including record selection formulas, grouping options, and database options. Using Report Analyzer, you can end the frustration, the "surprise" overtime, and the fruitless troubleshooting. In addition to saving time in your work, you can improve infrastructure utilization by ferreting out waste and optimizing resources.
If you find parameters drive you batty sometimes, stick with them. You'll reach a point where using them is pain-free and easy. Parameters can add huge flexibility to your Crystal Reports. Consider this, for example. If you have a collection of Crystal Reports where there are only small differences between each report (record selection, a group field, a minor calculation), you can use a single report and create a parameter to decide which variation to invoke. The most common use of a parameter is in record selection where you might enter a selection formula of: {table.field} = {?Selection} Now the interesting thing is that this will work when the parameter is a single value, multiple values, range, or multiple value range. Crystal Reports will create the necessary database query to get the correct data. However: {table.field} >= {?Selection} //and similarly for other relational operators will work only if the parameter is a single value. You can’t use some relational operators if the parameter is a range or multiple values. The correct syntax for the statement above (if the parameter is a range) is: {table.field} >= Minimum({?Selection}) The various summary functions (maximum, minimum, count, etc.) can all apply to a range or multiple values parameter.
This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects. |