Custom ODA driver IDataSetMetaData usage [message #1006051] |
Tue, 29 January 2013 11:04  |
Eclipse User |
|
|
|
Defining query parameters for a custom ODA driver does not work because
IConnection.getMetaData() is never called by BIRT framework.
I created a custom ODA data source using the standard template
project that comes with eclipse. This template code provides a
IParameterMetaData instance with one parameter, so I would expect
that when I add such a data source in report designer and edit the
"Data Set" then I would get the parameters binding screen in the
"Edit Data Set" dialog.
I added some logging to trace the main calls of the ODA driver
and note that the IConnection method
IDataSetMetaData getMetaData(String dataSetType)
is never called. Thus it is not surprising that report designer does
not know that query parameters are required.
The template implementation of IDataSetMetaData has method
supportsInParameters() return true so it expects input parameters
to be used.
Why is this not called?
Is there some special plugin.xml setting required?
Obviously this works for the ODA JDBC drivers, but they additionally provide
special UI configuration screens so may be using the API in a different way.
I feel this feature should work in some basic manner for a simple ODA driver
without a special UI plugin.
The same problem applies when just using the runtime reporting engine,
but since the report design will not specify any query parameters this
is not surprising.
My platform:
linux x86_64
java 1.7 (openjdk "icedtea" 7)
eclipse juno SR1
DTP 1.10.1
BIRT 4.2.1
Here is the basic sequence of calls when I first insert a new data source
and data set into a report design using the sample code ODA driver:
Driver.setAppContext
Driver.getConnection() odatemplatedriver
Connection.setAppContext()
Connection.open()
Connection.newQuery()
Query.setSpecification()
Query.setAppContext()
Query.prepare() queryText=
Query.setProperty() name=property1 value=null
Query.getMetaData()
ResultSetMetaData.getColumnCount()
ResultSetMetaData.getColumnName()
ResultSetMetaData.getColumnName()
Driver.getManifest
ResultSetMetaData.getColumnName()
ResultSetMetaData.getColumnName()
Driver.getManifest
Query.close()
Connection.close()
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04935 seconds