Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

16.01 Introducing Parameters

Using parameters are a critical part of report writing. They are the only way for a user to send input to a report prior to it printing. For each parameter, the user is prompted with a separate dialog box to enter either discrete values or a range of values.

The problem with parameters is that the user interface for prompting the user to enter a value isn’t very exciting. There is a separate dialog box for each parameter and it is generic and bland. There is no way to customize them to make them fit in with the look and feel of your application. Fortunately, Crystal Reports .NET lets you override a parameter’s default behavior. When opening a report with parameters, you can use a form in your project that prompts the user for all the relevant data and pass this directly to the report. This gives the user a clean interface for entering the data. You also get the benefit of validating the user input prior to printing the report. This reduces the chances of an error occurring when running reports.