Search code examples
crystal-reports

How can I tell crystal reports to select all values based on a parameter?


I have created a very simple crystal report that lists jobs and their current pending change order amount. It is grouped by Company, then Job Status, then Job (it must be grouped by job so the totals are correct).

There is a company parameter and a job status parameter on this report. If the user wishes to print all open jobs, they enter 1, closed jobs 2. But there needs to be an additional option to print all jobs, open and closed. How would I accomplish this?

I have already tried using the "is one of" function in the select expert, but that caused all jobs to be printed no matter what the parameter was.

Thanks in advance for any help!


Solution

  • Assuming your {?Job Status} parameter is either "open", "closed", or "both" you can just add a line in the record selection formula like:

    ...and ({?Job Status}="All" or {table.job_status}={?Job Status})