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!

Grouping based on parameter

Status
Not open for further replies.

amoeba102

Programmer
Apr 2, 2002
58
US
I want to present the user with a list of fields from which they can choose the field to group on for a report.


I get 'Invalid Argument', or a message about trying to group on a non-recurring field.

Using CR XI
 
I have tried presenting user with a prompt and asking them to select the field to group on. Then I tried to use that parameter as a group, but parameters aren't available for grouping, so I used the parameter in a formula (stringvar groupon:={?groupParam} and then used that formula to group on.

It allows me to do it, but when I run the report I get a "Group specified on a non-recurring field. Details;@GroupOn
 
You should create a formula like the following:

Select {?parm}
case "Date" : totext({table.date},"yyyy/MM/dd")
case "Amount" : totext({table.amount},2)
case "Shipper" : {table.shipper}
default : ""

Then insert a group on this formula. You can't group on a parameter--you have to group on a database field or formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top