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

CR XI - Dynamic Parameters - Default Values

Status
Not open for further replies.

organickarma

Programmer
Nov 19, 2006
34
US
Hi,

I am currently developing reports that run off SQL Server command objects as datasource. These reports have 2 to 3 dynamic parameters. i.e. non cascading ones that use command objects to populate the drop downs.

I need to be able to add the All option to these drop downs. That part is relatively simple and I accomplished it by doing a union on the command object queries to include the All.

However my issue is being able to default the parameter to this All value.

I have searched for answers high and low to no avail.

Can anybody on here let me know if there is some kind of workaround or hack way of implementing this?

Thanks in advance.

A
 
If you force the user to choose "All" or a parameter value, then you don't need a default. You would reference the "All" value in the where clause of the command that serves as the datasource for your report:

where
(
(
'{?parm}' <> 'All' and
table.field = '{?parm}'
) or
'{?parm}' = 'All'
)
and //etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top