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

Default value in Dynamic Cascading Prompt?

Status
Not open for further replies.

RustyAfro

Programmer
Jan 12, 2005
332
US
Different question - is there any way to keep the default value functionality as found in a Static Prompt? It seems common sense it should exist, but I can't find it anywhere...
 
I build out a command object, as in:

select '...All...' from table
union all
select field from table

And use that as the source for the parmaeter.

Now the first value is ...All... and you can code for it. If it's a numeric, place it in the description andsomething like -999999 in the value and display only the description in the prompt.

-k

 
HI Synapse,

I had thought to do a union query and had already included an "!ALL" at the top. The user can select "!ALL" to get everything.

But the problem is I can't figure out how to make the cascading parameter use "!ALL" as the default.

In a static parameter , I could just place "!ALL" in the default value field and when the user refreshed the form, The description part of the "!ALL" would already be selected. But there is no "Default" section in a cascading parameter that I can find...

 
They can't exit a dynamic parameter prompt without entering something, or hitting cancel.

So try a formula of:

(
if not(isnull({?My Parameter}))
and
{?My Parameter}[1] <> "!All" then
{table.field} = {?My Parameter}
else
if isnull({?My Parameter})
or
{?My Parameter}[1] <> "!All" then
true
)

-k
 
That was off slightly...

(
if not(isnull({?My Parameter}))
and
{?My Parameter}[1] <> "!All" then
{table.field} = {?My Parameter}
else
if isnull({?My Parameter})
or
{?My Parameter}[1] = "!All" then
true
)

-k
 
Hi Synapse,

I gave that a try, but the parameter screen still does not let me continue if I do not select a parameter for the cascading dynamic parameter.

It's probably because I am referencing that parameter directly in the SQL of the command that drives the report. I am doing so because I need the command to filter on the database side, not the client side.

It doesn't seem there is any way therefore to set a default value for cascading parameters...maybe next release ;-)

Joel
 
If you can't manage to make this happen with the native functionality of XI, there are 3rd-party tools (see list at: that may help.

My DataLink Viewer has its own dynamic & cascading parameter implementation with the options to:
1) remember past choices and use those as the default
2) dynamically set the default value using a formula

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Ido,

I almost have a similar problem with different scenario,

I have 2 different dynamic cascading prompts(dcp) with two each,
Say the first dcp has MOU_VAL and MOU_Region and the second dcp has Region and Center.

When the parameters are prompted prompts should be defaulted the following way,

If MOU_VAL = 'MOU' then prompt for MOU_Region and automatically force Region and Center to take 'ALL' values.
else if MOU_VAL = 'Non MOU' then prompt for Region and Center and automatically force MOU_Region to take 'ALL' values.

Each of the 4 values have '-ALL-' value coded on the database end.

Please advice.

Thanks,
Sai
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top