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

Dynamic Parameter Question 1

Status
Not open for further replies.

jwaldner

Programmer
Jan 21, 2011
77
US
I have a dynamic parameter based on a field in my database. I use it to group data by 'people' in the list. I would like to be able to leave the list 'empty' if I don't want to group. right now the report forces me to put something in the list. Is there a way around this?
Thanks!
 
You could use a command to populate your picklist, like this:

select table.person
from table
union
select 'All'
from table

Do not link the command to any other tables, and reference it ONLY to populate the picklist in the parameter set up screen (insert->command.person).

Then write the record selection formula like this (report->selection formula->record):

(
(
{?Persons} <> "All" and
{table.person} = {?Persons}
) or
{?Persons} = "All"
)

Direct the user to select "All" or some value(s). If you want grouping on the results to be optional, create a separate parameter {?GroupBy} with options "Person" and "Do Not Group".

Then create a formula like this and insert a group on it:

select {?GroupBy}
case "Person" : {table.person}
case "Do Not Group" : ""

Format the group section to "suppress blank section" in the section expert.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top