makeitwork09
Technical User
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.
Thanks
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