CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2013

    Unhappy Value separation from an array

    Hi All,

    I am getting multiple values in single parameter(type : string). i had added as string parameter and converted into
    number as well. But i dont know how to separate those values into single array each.

    i ll mention below which formula i have used:

    Stringvar Array string := Split({?ops1_id}, ",");

    Numbervar Array number;
    Redim number[Ubound(string)];

    Numbervar i;
    for i := 1 to Ubound(string) do (
    number[i] := ToNumber(string[i])


    But this formula used to get count of an array. So please help me out.
    Thanks in advance

  2. #2
    Join Date
    Jul 2005

    Re: Value separation from an array

    I would use next code...
    The multiple value parameter ?ops1_id is already an array
    In the formula a numeric array 'number' is created with the elements of input parameter
    After the formula is executed (when you insert it in a report section) the numeric array is created and loaded
    then you can use each array element: number[1] or number[2] or number[3], etc.

    Numbervar Array number;
    Redim number[Ubound({?ops1_id})];
    Numbervar i;
    for i := 1 to Ubound({?ops1_id}) 
    number[i] := ToNumber({?ops1_id}[i])

    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.