If I am understanding your question right, you are looking to build a WHERE clause that can change based on the user input. The input can be either a Multi-select List box or a number of different check boxes. I have pasted some code below that should help you build a dynamic WHERE clause.
The first code here is for a Multi-select listbox.
-DEFAULT &MULTIVAR = ' ';
-SET &MULTIVAR = IF &MULTIVAR EQ ' ' THEN 'FOC_NONE' ELSE UPCASE(75,&MULTIVAR,&MULTIVAR);
TABLE FILE CAR
PRINT
'CAR.CARREC.MODEL'
'CAR.BODY.BODYTYPE'
BY 'CAR.ORIGIN.COUNTRY'
BY 'CAR.COMP.CAR'
HEADING
""
FOOTING
""
WHERE CAR.ORIGIN.COUNTRY EQ &MULTIVAR;
END
The next set of code is for multiple checkbox options.
-DEFAULT &VAR1 = ' ';
-DEFAULT &VAR2 = ' ';
-DEFAULT &VAR3 = ' ';
-DEFAULT &VAR4 = ' ';
-SET &VAR1 = IF &VAR1 EQ ' ' THEN 'FOC_NONE' ELSE UPCASE(20,&VAR1,&VAR1);
-SET &VAR2 = IF &VAR2 EQ ' ' THEN 'FOC_NONE' ELSE UPCASE(20,&VAR2,&VAR2);
-SET &VAR3 = IF &VAR3 EQ ' ' THEN 'FOC_NONE' ELSE UPCASE(20,&VAR3,&VAR3);
-SET &VAR4 = IF &VAR4 EQ ' ' THEN 'FOC_NONE' ELSE UPCASE(20,&VAR4,&VAR4);
TABLE FILE CAR
PRINT
'CAR.CARREC.MODEL'
'CAR.BODY.BODYTYPE'
BY 'CAR.ORIGIN.COUNTRY'
BY 'CAR.COMP.CAR'
HEADING
""
FOOTING
""
WHERE CAR.ORIGIN.COUNTRY EQ '&VAR1.EVAL' OR '&VAR2.EVAL' OR '&VAR3.EVAL' OR '&VAR4.EVAL';
END
I hope this helps.
Thanks,
Dave
WebFOCUS 7.7.03
Windows Web Server 2008
MS SQL Server 2000
Excel,CSV,PDF,HTML