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!

Group or not on parameter

Status
Not open for further replies.

RobHVB6Sql

Programmer
May 20, 2002
77
AU
CR8.5 /SQL

Sorry, I'm obviously missing something here, read several threads, but no help.

I have two groups and wish to allow the user to choose to use the second (sub) group or not. They always want to see all records.

I have a string parameter @Group1 passed in, but I don't know how to associate the formula.

If I place it in the group selection area all records disappear.

Code:
If {?@Group1} = "Yes" then
  TRUE
else
  "No"


Rob Hasard
(VB6 /SQL 7.0)
 
If the parameter that is asking whether to use the second group is called ?Group2then you need a formula field like:

if{?Group2} = "Yes" then
{mytable.myfield}
else
XXX

{mytable.myfield} is the field that is to be used for the grouping if it is required.

XXX is a constant value.
If myfield is text then XXX must be text (say " ")
If myfield is a number then XXX must be a number (say 0).

You second group should be based on this formula field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top