Loop through BOY_1 matrix Respondida

Alvin Li

Hi,

I try to write VB code to loop through the table generated by the SQL report. I use the below code to get start.

Dim i as Item
i = form.Items.Item("BOY_1")
Dim m as Matrix
m = CType(i.Specific, Matrix)

However I got an error message "Unable to cast COM object of type 'System._ComObject' to interface type 'SAPbouiCOM.Matrix' when running the last line. But the same code work fine in other matrix such as invoice matrix (item = 38).

Can anyone help? Thanks

Comentarios

3 comentarios

  • Comment author
    Rasmus Jensen
    • Comentario oficial

    Moved this post to Q&A Section as it is not a feature request

  • Comment author
    Rasmus Jensen

    Please note that SQL Report use the SDK Grid ovject and not the SDK Matrix object so that is properly the reason for you issue

    0
  • Comment author
    Alvin Li

    Hi Rasmus,

    Thanks, it works.

     

    0

Iniciar sesión para dejar un comentario.