Results 1 to 4 of 4

Thread: array problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Posts
    100

    array problem

    I have flexgrid which I want to use its data for column 6 to generate chart using ChartDirector.API.

    Snippet code below gives an error which is,

    "error converting argument 1 to type class double array"

    why is like that?
    Pls help.
    Thank u in advance.

    VB Code:
    1. ReDim data(MSFlexGrid7.Rows - 1)
    2.     ReDim labels(MSFlexGrid7.Rows - 1)
    3.     Dim i
    4.     For i = 0 To UBound(data)
    5.         data(i) = MSFlexGrid7.TextMatrix(i, 6)
    6.         labels(i) = MSFlexGrid7.TextMatrix(i, 0)
    7.     Next
    8.        
    9.     Call layer.addDataSet(data, &HCF4040, "Jumlah Purata").setDataSymbol(cd.DiamondSymbol, 10)
    10.      Call c.xAxis().setLabels(labels)
    Last edited by azrina; Mar 3rd, 2004 at 03:56 PM.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109
    What line gives the error?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Posts
    100
    VB Code:
    1. ReDim data(MSFlexGrid7.Rows - 1)
    2.     ReDim labels(MSFlexGrid7.Rows - 1)
    3.     Dim i
    4.     For i = 0 To UBound(data)
    5.         data(i) = MSFlexGrid7.TextMatrix(i, 6)
    6.         labels(i) = MSFlexGrid7.TextMatrix(i, 0)
    7.     Next
    8.              'error at this line
    9.             Call layer.addDataSet(data, &HCF4040, "Jumlah Purata").setDataSymbol(cd.DiamondSymbol, 10)
    10.      Call c.xAxis().setLabels(labels)

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Posts
    100
    someone told me that the error occured because the data(i) is not a number.

    How come??

    i enclose the screen shot of my Flexgrid.
    pls help.
    Attached Images Attached Images  

Posting Permissions

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



Click Here to Expand Forum to Full Width