Skip to Content
0

Multiple parameters crystal report

Feb 23, 2017 at 10:21 PM

44

avatar image

Hi,

I need a report to give the user option to choose multiple options. For example:

User wants to run report: by State, or by City, or Rep, or State and Rep, or City and State.

I was able to make to run by one choice. But when I try to run by State and City, the report is not working.

Please help

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Don Williams
Feb 23, 2017 at 10:22 PM
0

Use Dynamic Cascading Parameters

Share
10 |10000 characters needed characters left characters exceeded
Abhilash Kumar
Feb 24, 2017 at 09:51 AM
0

Hi Larisa,

If you're using CR 2008 or over, here's what you can do:

1. Create a parameter called 'State'. While in the parameter creation screen, scroll down and look for an option called 'Optional Prompt'. Set that to 'True'.

2. Create all the other parameters (City, Rep etc) and make them optional as well.

3. Go to the Report Option in the toolbar > Selection Formulas > Record and use this code:

(Not(HasValue({?State Prompt})) OR {Database.State field} = {?State Prompt})
AND
(Not(HasValue({?City Prompt})) OR {Database.City field} = {?City Prompt})
AND
(Not(HasValue({?Rep Prompt})) OR {Database.Rep field} = {?Rep Prompt})

Use correct fields from your database as well as prompts in the code above.

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Larisa Gasparian Feb 28, 2017 at 06:22 PM
0

Thank you. I will try that

Share
10 |10000 characters needed characters left characters exceeded
Larisa Gasparian Mar 02, 2017 at 05:53 PM
0

Thanks a lot! It worked perfect!

Share
10 |10000 characters needed characters left characters exceeded