Page 1 of 1

Malfunctioning ConnectOnStart property

Posted: Tue Apr 09, 2019 8:51 am
by gerold.taisser
Hello,

Most of our reports start with displaying a dialog to the user where he can input some data. We use that data as parameters in a query to a sqlServer-Database. With the result of the query the report is filled.
In order to do so, the ConnectOnStart property for the report is set to false. (see Screenshot
doAddress-SqlDataSource.PNG
doAddress-SqlDataSource.PNG (10.79 KiB) Viewed 786 times
).

After the user confirms his inputs by pressing the OK-Button, we call the Connect-Method in the Click-Event-Handler of the button. (see Screenshot
Button - doAddress.Connect.PNG
Button - doAddress.Connect.PNG (14.92 KiB) Viewed 786 times
)

In past versions the result was displayed in the databands of the report. In the current version (2019.2.3) this does not work anymore. The report stays empty.
Can you help us with this problem? Is this a bug or by design? Is there a workaround available?
Best regards,

Re: Malfunctioning ConnectOnStart property

Posted: Wed Apr 10, 2019 7:51 pm
by Lech Kulikowski
Hello,

Please try to use the following code:
DataSourceName.ConnectOnStart = true;
DataSourceName.Connect();

Thank you.