Crystalkeen logo; we offer Crystal reports viewers and schedulers
 
Crystalkeen header image 3
Crystalkeen header image 5

Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  

Articles:
Administration
Advanced
Basic
Database
Financial

Tools:

Analyzers
CR Schedulers
CR UFLs
CR Viewers
DataBase Tools
Graphics
International
Mail UFLs



 
 

Add'l:
About us

Contact Us
 

CrystalReports
on Steroids

Crystal Reports Parameters: How to find where you used them

Sometimes, 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.

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.

Authorship

Except where an author's name is given at the start of the article, all of these articles were written by Mo Naughton or Bruce Ferguson and edited by Mark Lamendola. Mo is a Crystal Reports consultant, trainer, and developer for Chelsea Technologies, Inc. Bruce Ferguson is a Crystal Reports consultant, trainer, and developer for CrystalKiwi, Inc. Mark Lamendola is a writer and editor with over 15 years experience in professional and trade publications.

 

  • Questions? Please write to mark@crystalkeen.com. We do want your business.
  • Do you have your own tips for Crystal Reports administrators and designers? Write to mark@crystalkeen.com and we'll post your tips with a link to your Website (or with some other attribution if you choose).
  • Crystal Reports is a subsidiary of Business Objects, which is owned by SAP.