Posted 9 November 2022, 9:47 am EST
We have our program setup so when the designer opens, we set the connectionstring and load the datasource.
Try
Dim ds As New GrapeCity.ActiveReports.Data.SqlDBDataSource
ds = CType(reportDesigner.Report.DataSource, GrapeCity.ActiveReports.Data.SqlDBDataSource) ds.ConnectionString = ConnectString() ds.SQL = "SELECT TOP 5 * FROM Customer WITH (NOLOCK)" reportDesigner.Report.DataSource = ds
Catch oExcept As Exception
MsgBox(oExcept.Message)
End Try
But, this fails and displays the message:
Not allowed to change the ‘ConnectionString’ property. The connection’s current state is open.
How can i close the current state to get the correct connection string and datasource loaded?