Is it possible to bind the report in runtime, not using ADO .NET entry data model (establish connection; pull data, all in runtime).
1. If I use ‘ADO .NET entry data model’ would the report be connected just for this specific database that I would add in ADO .NET entry data model permanently.
· I understand they have a ReportDataSourceProvider to bind report in runtime.
2. Is it possible to fill ReportDataSourceProvider without using ADO .NET entry data model?
And the last if I’d like to bind the report to dataset how I can do it in runtime
Thanks!
Hi!
Report data source providers offer a general mechanism to bind a data source at runtime. They are independent of the technology you use to retrieve the actual data from its source. So you can use them to get data from an entity framework’s model or connecting directly to the data base using a Data Reader or using data sets.
For the CTP we only support that the GetDataSource method returns objects that implements IEnumerable. So you can query the entity framework to get the result (as it is in the samples) or you can build your own collection with the data if you want. If what you want to use as data source doesn’t directly implement IEnumerable you will need to convert it to IEnumerable. In the future we will support that you directly return an IDataReader and also other contracts.
Currently, the CTP supports that you return a DbDataReader too, but be warn that is just for internal use right now. In the future we will support IDataReader.
Regarding question number 1, when you instantiate the Entity Object Context you can specify a different connection string if you need to connect to a different data base.
I hope that this fully answer your questions.
If you haven’t yet, you can take a look section “Changing a Data Source at Runtime” of the documentation where it explains this in greater detail.
Thanks,
Leo