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

using a group within a parameter selection

Status
Not open for further replies.

ncchish

Programmer
Jul 29, 2002
86
0
0
US
Please help. I have a parameter called ?MarketProgram which lists different Market Programs. I want to group several of the Market Programs together under one category within ?MarketProgram called LCALL. I created a formula called @MPIndicator and added it to the record selection. I want all of the choices within LCALL when it's selected or they can choose individual choices. It's not working and I can't figure out why. Any help is appreciated.

Thanks

(
If {?MarketProgramHeading} = "All" Then
True
Else
{@MPIndicator} in {?MarketProgram}
)

Here is the formula:

stringvar sMarketProgramLabel;
If {?MarketProgram} in ["LC","LCOT","L1","L2","L3","L4"] then sMarketProgramLabel := "LCALL"
else
if {?MarketProgram} = "LC" then sMarketProgramLabel := "LC"
else
if {?MarketProgram} = "LCOT" then sMarketProgramLabel := "LCOT"
else
if {?MarketProgram} = "LC" then sMarketProgramLabel := "LC"
else
if {?MarketProgram} = "L1" then sMarketProgramLabel := "L1"
else
if {?MarketProgram} = "L2" then sMarketProgramLabel := "L2"
else
if {?MarketProgram} = "L3" then sMarketProgramLabel := "L3"
else
if {?MarketProgram} = "L4" then sMarketProgramLabel := "L4";
sMarketProgramLabel
 
You could create a formula that looks at what the value of the parameter {?MarketProgram} is and group on this formula. Add this formula to the record selection as well.
For example
{@MarketProgram} would be:
IF {?MarketProgram} = 'LCALL'
THEN {table.MarketProgram} in ['LC','LCOT','L1','L2','L3','L4']
ELSE IF {?MarketProgram} = 'LC'
THEN {table.MarketProgram} = ['LC']
ELSE IF {?MarketProgram} = 'LCOT'
THEN {table.MarketProgram} = ['LCOT']
ELSE IF {?MarketProgram} = 'L1'
THEN {table.MarketProgram} = ['L1']
ELSE IF {?MarketProgram} = 'L2
THEN {table.MarketProgram} = ['L2']
ELSE IF {?MarketProgram} = 'L3'
THEN {table.MarketProgram} = ['L3']
ELSE IF {?MarketProgram} = 'L4'
THEN {table.MarketProgram} = ['L4']

OR
If you want the users to be able to choose one, multiples (e.g. 'L1', 'LCOT', 'L4'), or all. Then it'll be set up alittle differently. Have the parameter contain the values and descriptions of the marketing programs and add a value of * and description of All or LCALL. Then in your report selection have this condition:
( {table.marketprogram}in {?MarketProgram} OR {table.marketprogram} like {?MarketProgram} ).

Hope this helps
JD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top