Re: Dataset Field/Schema update with Custom Data Provider
Data Dynamics Reports Support
Dataset Field/Schema update with Custom Data Provider
08-13-2010, 8:24 PM
I'm using a Custom Data Provider, and I've created a custom control for editing the command text in the query window of the Data Set smart panel.
I'd like to update the fields for a dataset based on the schema of the data that is queried in from the command text (much like what is done when a query is updated for the SQL Data Provider). I see the IDataSourceSchemaProvider interface, but it is internal to the DataDynamics.Reports.Design assembly. Are there hooks in the API for providing a schema to update the fields for a dataset when using a Custom Data Provider? If so, are there similar hooks for updating dataset parameters?
-Jason
Re: Dataset Field/Schema update with Custom Data Provider
08-15-2010, 8:53 PM
Hello,
Custom data provider's IDataReader implementation should implement all the interface members(FieldsCount, GetName, etc.). Designer internals use those members to populate the schema.
In order to update the data set parameters from the command text, IDbCommand implementation should also implement DataDynamics.Reports.Extensibility.Data.IDbCommandExtension interface. It's DeriveParameters method should parse the command text and return the parameters collection.
Sergey Abakumoff
GrapeCity
Re: Dataset Field/Schema update with Custom Data Provider
08-16-2010, 10:07 AM
Thanks a lot! I'll give that a try.
-Jason