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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default parameter (no more '...')

Status
Not open for further replies.

Malcav

Programmer
Oct 7, 2005
43
GB
Hi
I am currently working on converting my companies 1000 or so crystal 9 reports to crystal XI.
Some of the reports we have have 15 parameters and how it is currently worked is that all the parameters are defaulted to 'All' and the user can pick things they want to change and limit the result set.
However in XI I cant seem to get it to show '...All' first.
All i need is for '...All' to be first or 'set to null' to be automatically selected.
Can this be done?
How can this be done?
If it cant be done can anyone thing of a way around it?
 
Pretty vague...

Most set up ...All in CR XI, and of course it is first if you designate it so.

Perhaps you should state your observations rather than stating "However in XI I cant seem to get it to show '...All' first.

Saying something is broken without a description doesn't help much.

Where does it show?

Did you place it first in the list? There's an up arrow to move it to the top, and it will then show first.

Are you using dynamic parameters?

-k
 
Ok here is the skinny

I open a version 9 report in XI and save it as XI version.
Link the parameters to "list of values" we have set up.
Then I run the report.
In each of the parameters appears as '...'
The next is the drop down list is '...All'
After that appears the list of values
If you click ok with the '...' showing the report does not run.
In version 9 when you ran the report value that appeared in the parameters was 'All' and this was by default.
So clicking ok would run the report.
However in XI each and ever parameter need to be clicked and a value selected.
Our reports have up to 15 parameters and so the users will not want to click every parameter.

I want to be able to have '...All' as the value that appears in the parameters as soon as you run the report.

If this is not possible I want every parameter to have 'set to null' selected.

Is that clearer?
 
I am having the same issue, can anyone please help.
thanks.
 
Got it.

So the issue is that ... appears to be the default, not ...All

What do you have listed under Default Valuie for the parameter?

Place the ...All there and you should be fine.

-k
 
When you link a parameter to a 'list of values' the default value box is no longer available.
 
This is still not solved some one must have an idea for a solution.
 
If you test this using a single parameter, what value is returned if it is left as '...'?

If this is a null value or returns '' can you not check for it as part of the selection criteria for record ot group value or as part of a suppression formula?

If isnull((@myexampleparam)) then {table.fieldvalue} > 0 else {table.fieldvalue} = (@myexampleparam)

If you follow my drift?

I WILL however try and replicate what you are describing and try it myself as I will be interested in applications for this.

If it is of any comfort I too am finding my way around XI at the minute.

'J
 
You can't set a default value for a DYNAMIC list of values.

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
 
Yup, It is tucked away in the help pages that:

Default Values:


NOTE * This option is only available for parameters with static prompts.

If you have moved from Crystal 9 previously did you use static prompts then?

If so replicate in the same way, or get users to get used to making selections.

You could do this several different ways to ease use for users.

Sadly, the checks for leaving the parameter 'as is' won't work it seems.

After testing here it does seem to enforce a selection being made. Shame really as by simply allowing the ... entry to be selected you could then perform checks and create default values from this.

Such small changes that would make our lives easier.

I'll keep looking, every day is a valuable lesson.
 
I have been looking for a solution to this problem too. It was disheartening to find out that it is a dead end.

I am using dynamic prompts with Crystal XI R2 and have tried several tricks that don't work. In effect it does default to '...', but it is an invalid option and you get an error message if you don't make an explicit choice.

They should have left '...' as a viable choice and allowed programmers to code something like this in the record selection formula:

IF {?parameterValue} = '...' THEN TRUE
ELSE
{fieldName} = {?parameterValue}
 
I have seen that article. It does show you how to make a value like ALL available but it WONT show you how to go the next step and make that the default value. You still have to select the ALL.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top