I have created a reportdocument variable RD, loaded with a valid '.rpt' file, set the parameters it needs, and set the connectioninfo.
I want to count the number of rows in the reportdocument to see if the report is empty:
Dim RowCount As Long = RD.Rows.Count
On this line an error is produced:
Type 'System.String' cannot be marshaled as an unmanaged structure; no meaningful size or offset can be computed.
I am using Visual Studio 2008 (VB.NET), Crystal Reports Basic for Visual Studio 2008 an .NET 3.5.
Before I started needing to count the number of rows returned by the reportdocument, the report was created without issue.
Does anyone have any idea why I get this error?