Use Customized Data Provider
Hi,
We are trying to use report designer control in our exiting application.we are trying to use the same existing connection as report designer connection as well.we have tried several ways and nothing went good.We have used IDbConnection as database connection in our exiting application.if we can inject the same connection to report designer it is easy to maintain and the user functionality as well.And we dont need to give end user to change the existing connection.End users can change sql queries and create report.please update us on how to use IDbConnection as primary connection of report designer.
tnx in advance
chaminda
We are trying to use report designer control in our exiting application.we are trying to use the same existing connection as report designer connection as well.we have tried several ways and nothing went good.We have used IDbConnection as database connection in our exiting application.if we can inject the same connection to report designer it is easy to maintain and the user functionality as well.And we dont need to give end user to change the existing connection.End users can change sql queries and create report.please update us on how to use IDbConnection as primary connection of report designer.
tnx in advance
chaminda
Comments
Have you checked this post?
http://www.fast-report.com/en/forum/?p=/discussion/8832
and i also facing the prob as in http://www.fast-report.com/en/forum/?p=/discussion/8832 . i cant see tables in the data wizard and also no data in query designer as well.
i am using OleDbConnection in my IDbConnection.Hope there will be a way to over come this issues
tnx
Chaminda
1. we cant override GetEditor(); method.
2.when we use that connection which is customized users can add another database connection.(we need to restrict that.).and if we try to preview the report connection will disappear.
how we should over come from this.
the problerm is we don't need to use another database connection in our application.we just need to use the same connection as we have used in existing app.We dont mind using a new connection when we designing the report.but we need to use existing application connection(IDbConnection) when we run the report.
tnx
chaminda
i want to clarify few things when we are going forward with your report designer solutions.Hope you all can help me with them.
1.can we create our own class something similar to OleDbDataConnection class which is derrived from DataConnectionBase class ?
2.if yes is there any example or sample project ?
3. can we restrict users to use connection which we assign to the report dictionary.without adding a new connection to the designer.(if user click on new dictionary all the data will vanished.)
please help me.we are new to fast report and we need to go ahead with the designer.
waiting
chaminda
1) yes, you can.
2) there are many connectors with source code available here:
http://www.fast-report.com/pbc_download/FRNetConnections.zip
3) the only way is to use the Config.DesignerSettings.ApplicationConnection. And I don't understand why you can't use this option with your OleDbConnection?
Can i get the sql query from the report and run it inside application connection and set data back to the report. is that possible ?
something like
var table = fastReport.GetDataSource(tableName) as TableDataSource;
string selectCommand = table.SelectCommand;
var data = Presenter.ExecuteSql(selectCommand);
fastReport.RegisterData(data, tableName);
is there a way of doing this.waiting for a quick reply.
tnx in advance.
Chaminda
tnx. Hope you can make it soon. and i have try to set the exisiting connection in my case it's a IDbConnection, which is open.the error i am getting from the report was that connection is already open.Hope u will consider this as well.i mean allow us to use an open connection.
tnx
Chaminda
Tnx a lot.its work like charm !!!