Loop through BOY_1 matrix Answered
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
Comments
3 comments
Moved this post to Q&A Section as it is not a feature request
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
Hi Rasmus,
Thanks, it works.
Please sign in to leave a comment.