Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conditioning Parameters in Crystal XI

Status
Not open for further replies.

Marco Poblete

Technical User
Oct 25, 2018
13
0
0
US
Is there a way to condition the prompt of parameters?. for example I need a Parameter to either prompt for a date or an amount. in my case the same report should be able to run by date range or by amount range so I 'm thinking:
parameter 1 "Report Type" values "Date Range" or "Amount Range"
If the user selects "Date Range" Parameters for Begin Date and End Date should appear.
If the user selets "Amount Range" then parameters for "from amount" and through amount should appear.
I want to avoid all the parameters prompted if they are not needed, i.e if "date range" is selected, only the date parameters should be enabled.

Is there anyw way to do that?

Thanks in advance
Mpoblete
 
Unfortunately, there is no conditional control over whether or not parameters appear. Any parameter that exists will appear every time (unless you want to program your own custom front end in .net or something else).

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Of course (depending on what version you have of CR) you could use optional prompts and have default values if necessary.
 
True, and that might allows the user to skip some parameters, but Marco should note that the optional prompts will still appear in the parameter list.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
thank you guys, I'll have to find a workaround to achieve my users needs
MP
 
Or you could write an application using either the .NET or Java SDK and have the application control the prompts and set them prior to running the report.

-Dell

Senior Manager, Data & Analytics
Protiviti
 
If the report doesn't contain subreports, you can create a main report with 2 on-demand subreports. Each subreport would have a variation on the parameter logic.

If your called subreport contains a subreport, the approach above won't work (a subreport cannot contain a subreport). But at least one 3rd-party viewer (see list on Ken Hamady's web site) provides a solution. Users of that viewer can double-click in one report to trigger another report. This avoids the subreport limitation. It also allows passing login and parameter info from the calling report to the triggered report.

- Ido

view, export, burst, email, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top