Malfunctioning ConnectOnStart property

Stimulsoft Reports.NET discussion
Post Reply
gerold.taisser
Posts: 4
Joined: Tue Apr 09, 2019 8:20 am

Malfunctioning ConnectOnStart property

Post 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 669 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 669 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,
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Malfunctioning ConnectOnStart property

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply