openargs pass an array

  • Thread starter Thread starter mcnewsxp
  • Start date Start date
mcnewsxp said:
can i pass an array via openargs?


No. OpenArgs is a string valued argument.

However, you can concatenate your array's elements (with a
deliminator) in a string. If the array elements are
strings, you can use the Join function to do the whole array
in one shot. Then the report's open event can use the Split
function to recreate a duplicate array in the report's
module.

Personally, I think that's kind of the long way around and
would just make the array a Public declaration in a
standard, so the report can just use it where it is without
passing any of it in OpenArgs. Not a good practice, but a
lot easier.

OTOH, maybe you don't really need to use an array at all
(pretty unusual for a report). If you'll explain what the
report is trying to use the array for, maybe someone can
come up with an alternative approach.
 
mcnewsxp said:
can i pass an array via openargs?

Not as such -- OpenArgs is passed as a String. But you can take your
array, use the Join function to make a delimited string from it, and
pass that in OpenArgs. Then, in the receiving form, you can use the
Split function to reconstruct the array from the string.
 
OTOH, maybe you don't really need to use an array at all
(pretty unusual for a report). If you'll explain what the
report is trying to use the array for, maybe someone can
come up with an alternative approach.

--

trying to pass several values from one form to the next.
 
mcnewsxp said:
trying to pass several values from one form to the next.


Sorry, I don't know why I was thinking report when your
question is in a forms newsgroup.

There are lots of ways to make data available from one form
to another. A delimited string in OpenArgs is the most
straightforward and if it works for you, say so. If not,
please provide more info and we'll explore some other
possibilities.
 
Not as such. One work-round is to pass a string containing a delimited
list, e.g

"First Element|Second Element|Third Element"
 
Back
Top