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

Multiple parameter (cascading) selection criteria not working

Status
Not open for further replies.

makeitwork09

Technical User
Sep 28, 2009
170
US
I am using Crystal XI

The report has  three parameters, one of which is a cascading dynamic
parameter.

After selecting a region, the next parameter returns the MSAs (MSA
parameter) corresponding to that region, but the MSA is preceded by the
STATE in that region. For example, MARYLAND - WASHINGTON, DC-MD-VA-WV. The MSA field is not preceded by a state, therefore the array code below is removing the state and dash from the selected MSA.

The expectation of following selection criteria is meant to only return the selected MSAs, however, the results of the report shows all the MSAs for the region. I do not understand why that is happening.

Code:
numbervar counter:= 1;
numbervar positionCount:=count({?msa});
Stringvar array MSAArray; //New Array name and type

while positionCount >= counter do
(
redim preserve MSAArray[counter];
If InStr({@state_msa},'- ') <> 0 then
   MSAArray[counter] := rtrim(mid({@state_msa},InStr
({@state_msa},'-')+2,len(rtrim({?msa}[counter]))))
else
   MSAArray[counter] := rtrim({?msa}[counter]);
counter := counter + 1;
);

(rtrim({Command.MSA}) in MSAArray and
{Command_2.system_type_revised} in {?Property Types} and
({Command.CURR_BOOK_VALUE} > 0 or
{Command.THRDPRT_CURR_BOOK_VALUE} > 0))

Thanks
 
I figured out what I was doing wrong. Where I had @state_msa I needed to have {?msa} [counter].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top