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

Problem parsing a comma delimited parameter

Status
Not open for further replies.

DanaHallenbeck

IS-IT--Management
Sep 27, 2000
63
US
I am using Crystal's web reports (CR8), and found that you cannot have a dropdown for multiple values in a parameter over the web unless you are using ASP. Therefore, I am trying to allow folks to enter the parameter values separated by commas. I have tried to do this with the following while loop:

pos2 := 0;
pos1 := 1;

while pos2<>pos1 do
(
if instr(pos2 + 1, {?State}, &quot;,&quot;) <> 0 then
(
pos2 := instr(pos2+1,{?State},&quot;,&quot;);
state := right({?State}, pos2 - pos1);
pos1 := pos2 + 1;
)
else
(
state := right({?State}, (len({?State}) - (pos2 + 1)));
pos1 := pos2;
);
);

This is taken from some VB code I have used before. I always seem to get a zero-length string error whenever I refresh the data. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top