Crystal Reports – using a parameter field to generate a Summary or Detail report

You may have created a report and you want users to have the option of either just seeing the summary level or the full details. This can be achieved using a parameter. Create a new parameter  called Summary or Detail.

Parameter field dialog box

In the Value section, type two values – Summary and Detail. Click OK.

Go to the Design tab, right-click over the left-hand area and select Section Expert.

Select Expert

In the Details section , check the Suppress (No Drill-Down) box, then click the Formula  button to the right of it. The formula should be {?Summary or Detail}=”Summary”.

Click Save and Close then click OK.

Refresh the report and you will be asked whether you want a Detail or a Summary report. Make your selection and click OK.

If you select a summary report, you may find that you have field headings visible that are not relevant to your report.

Summary Report

Also, it may look better if the Order Amount column was nearer the left. Select the field headings you do not wish to see in the summary report, right-click and click Format Objects. On the Common tab, check the Suppress box, then click the Formula button to the right. In the Formula Workshop type {?Summary or Detail}=”Summary” then click Save and Close. Click OK. The field headings are suppressed. To move the summary column nearer to the left, you have to know that widths in Crystal Reports are measured in twips and that there are 1440 twips in an inch! To move this column nearer to the dates, from Design view, right-click in the column and select Size and Position. Click on the formula button between X and Y.

Type in something like:

if {?Summary or Detail}=”Summary” then -3000. Click Save and Close, then click OK.

Repeat for any additional fields to be moved to the left.

Your fields are now closer to the grouping column.

Grouped data

Find out more about our Crystal Reports courses London, Surrey, Middlesex England or our Crystal Reports training Hampshire, Dorset, Wiltshire.


About jdonbavand

I am a trainer of Microsoft Office, Microsoft Project and Crystal Reports. I have called my blog "If Only I'd Known That...." because I hear it so many times in training sessions. In fact, if only I had a £100 for every time someone says "If only I'd known that." ....
This entry was posted in Crystal Reports and tagged , . Bookmark the permalink.

1 Response to Crystal Reports – using a parameter field to generate a Summary or Detail report

  1. Pingback: Crystal Reports – using a parameter field to generate a Summary or Detail report | Dinesh Ram Kali.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s