Home » Archived » BIRT » Report designer: custom dataset not asked for metadata
Report designer: custom dataset not asked for metadata [message #196465] |
Thu, 19 October 2006 09:41  |
Eclipse User |
|
|
|
Hi all,
I've deployed a custom dataset into BIRT. With version 2.1.0 the
designer instantiated the driver and created a Query when I used the
dataset wizard to create a new dataset and then selected the "Output
Colums" page. With version 2.1.1 and 2.2M1 the dataset wizard does not
ask my custom dataset for its metadata (neither parameter- nor
resultset-metatdata) any more. The driver is deployed correctly,
however, as it is instantiated and asked for results when I select the
"Preview Results" page (It then fails to generate results as it misses
some required prameters).
Can anyone imagine what changes could have caused this problem? Do
datasets need to declare something in addition now?
Thanks for your comments.
Best regards
Alex
|
|
| | | |
Re: Report designer: custom dataset not asked for metadata [message #196731 is a reply to message #196699] |
Fri, 20 October 2006 03:05   |
Eclipse User |
|
|
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Linda, Jason,
thanks for your replies, the plugin.xml containing the definition of the
datasource and dataset as well as the dataSourceUI and dataSetUI can be
found here:
https://svn.jfire.org/svn/main/trunk/org.nightlabs.jfire.rep orting.admin/plugin.xm
The driver id I talk about is:
org.nightlabs.jfire.reporting.oda.jfs.JFSDriver
with its dataset
org.nightlabs.jfire.reporting.oda.jfs.JFSDataSet
As you see, I've used the extension point oda.design.ui.dataSource to
add a custom page to the dataset wizard:
https://svn.jfire.org/svn/main/trunk/org.nightlabs.jfire.rep orting.admin/src/org/nightlabs/jfire/reporting/admin/oda/jfs /client/ui/JFireScriptRegistryItemWizardPage.java
I've used the runtime interfaces IResultSetMetaData and
IParameterMetaData to pass the metadata. Seemed pretty straight forward
as in my case both depend on the query text set for the dataset. This
worked well, and with limitations still does with 2.1.1 and 2.2M1 for
the IResultSetMetaData (see my previous post), but the
IParameterMetaData is not queried from the runtime IQuery from version
2.1.0RC4 on. BTW: Parameter metadata is not queried at report runtime,
so it seems to be needed only for designtime :-)
If I understand you post correctly there should be an other way of
letting the desinger know the metadata of my dataset. Can you point to
how to do this. Do I have to do this by code using a design handle?
Best regards
Alex
Linda Chan wrote:
> Alex,
>
> When you deployed your custom dataset in BIRT's data set wizard/editor, did
> you implement your own custom designer extensions, or extend from those
> provided by BIRT, using the oda.design and oda.design.ui APIs? Providing a
> copy of your plugin.xml would help us understand your usage.
>
> In general, the Data Set Editor gets a data set design definition from a
> custom page contributed by a custom ODA designer, via the oda.design API.
> This design model provides much more rich design-time metadata that are used
> in designing a report, whereas the metadata provided by an ODA runtime
> interface IResultSetMetaData is very limited.
> The earlier behavior you'd observed was a bug; see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=136261
>
> Linda
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFOHUj6tUIhjw9uZgRAmZcAJ942ZaONJwAOmmt6Zm+7DkrkRbvKgCf XWth
yBKV9Q/xbW06aUN8JDS8Blk=
=YPaA
-----END PGP SIGNATURE-----
|
|
|
Re: Report designer: custom dataset not asked for metadata [message #196959 is a reply to message #196731] |
Fri, 20 October 2006 21:51   |
Eclipse User |
|
|
|
Alex,
Umm... in browsing through your plugin.xml, it seems that your custom oda pages are missing a couple of UI extensions.
Do you see from the debugger that those classes, e.g. JFireScriptRegistryItemWizardPage, actually got triggered when opening the Query page in the BIRT 2.1.1's EditDataSet
dialog?
To implement the DTP ODA design-time extensions, it involves a couple other UI extension points adopted from the DTP Connectivity framework. See this Wiki page for a
listing of the extension points involved, and exemplary implementation:
http://wiki.eclipse.org/index.php/Use_Case_-_Create_a_Custom _ODA_Data_Source
>> there should be another way of letting the desinger know the metadata of my dataset. Can you point to how to do this.
Yes, indeed. The UI extensions provide the custom pages that collect user-input of a data source and data set designs, which are in turn defined using the oda.design API
(EMF-based model). E.g. see org.eclipse.datatools.connectivity.oda.design.ui.wizards.Dat aSetWizardPage#collectDataSetDesign.
(A simple implementation example of that method can be found in the DTP ODA Flatfile UI plugin's
org.eclipse.datatools.connectivity.oda.flatfile.ui.wizards.F ileSelectionWizardPage class.)
BIRT, as an oda design consumer, then adapts the collected oda.design.DataSetDesign object to the internal model of its report design.
Linda
Alexander Bieber wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello Linda, Jason,
>
> thanks for your replies, the plugin.xml containing the definition of the
> datasource and dataset as well as the dataSourceUI and dataSetUI can be
> found here:
> https://svn.jfire.org/svn/main/trunk/org.nightlabs.jfire.rep orting.admin/plugin.xm
> The driver id I talk about is:
> org.nightlabs.jfire.reporting.oda.jfs.JFSDriver
> with its dataset
> org.nightlabs.jfire.reporting.oda.jfs.JFSDataSet
>
> As you see, I've used the extension point oda.design.ui.dataSource to
> add a custom page to the dataset wizard:
> https://svn.jfire.org/svn/main/trunk/org.nightlabs.jfire.rep orting.admin/src/org/nightlabs/jfire/reporting/admin/oda/jfs /client/ui/JFireScriptRegistryItemWizardPage.java
> I've used the runtime interfaces IResultSetMetaData and
> IParameterMetaData to pass the metadata. Seemed pretty straight forward
> as in my case both depend on the query text set for the dataset. This
> worked well, and with limitations still does with 2.1.1 and 2.2M1 for
> the IResultSetMetaData (see my previous post), but the
> IParameterMetaData is not queried from the runtime IQuery from version
> 2.1.0RC4 on. BTW: Parameter metadata is not queried at report runtime,
> so it seems to be needed only for designtime :-)
> If I understand you post correctly there should be an other way of
> letting the desinger know the metadata of my dataset. Can you point to
> how to do this. Do I have to do this by code using a design handle?
>
> Best regards
> Alex
>
> Linda Chan wrote:
> > Alex,
> >
> > When you deployed your custom dataset in BIRT's data set wizard/editor, did
> > you implement your own custom designer extensions, or extend from those
> > provided by BIRT, using the oda.design and oda.design.ui APIs? Providing a
> > copy of your plugin.xml would help us understand your usage.
> >
> > In general, the Data Set Editor gets a data set design definition from a
> > custom page contributed by a custom ODA designer, via the oda.design API.
> > This design model provides much more rich design-time metadata that are used
> > in designing a report, whereas the metadata provided by an ODA runtime
> > interface IResultSetMetaData is very limited.
> > The earlier behavior you'd observed was a bug; see
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=136261
> >
> > Linda
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFOHUj6tUIhjw9uZgRAmZcAJ942ZaONJwAOmmt6Zm+7DkrkRbvKgCf XWth
> yBKV9Q/xbW06aUN8JDS8Blk=
> =YPaA
> -----END PGP SIGNATURE-----
|
|
|
Re: Report designer: custom dataset not asked for metadata [message #196974 is a reply to message #196959] |
Sat, 21 October 2006 13:12   |
Eclipse User |
|
|
|
Hello Linda,
thanks again for you reply.
Linda Chan wrote:
> Alex,
>
> Umm... in browsing through your plugin.xml, it seems that your custom oda pages are missing a couple of UI extensions.
> Do you see from the debugger that those classes, e.g. JFireScriptRegistryItemWizardPage, actually got triggered when opening the Query page in the BIRT 2.1.1's EditDataSet
> dialog?
Yes, the classes where and still are triggered for the dataset also with
2.1.1, although I had problems creating the datasource. I've extended
the plugin.xml with a connection profile for the datasource and it works
now (thanks for the wiki link). Still I found that unlike stated in the
extension-point documentation
( http://www.eclipse.org/datatools/project_connectivity/connec tivity_doc/CMF_I101905.html#e.connectionProfile)
the id-attribute of the connectionProfile must match the id of my
datasource in order make my dataSourceUI extension work.
Also, I have another question. My datasource is not dependent on any
properties, so I'd like to remove the extension. If I do so, the
datasource creation works, but then the dataset UI contributions will
not be included as well. How can I define a datasource that can be
create without the need of displaying an additional page in the "New
Datasource" wizard?
Regarding the original reason of my post I'm still not sure.
I'm trying to use the BIRT or ODA (?) built in pages for output-columns
and parameters of my dataset. Is this the intended way?
Up to 2.1.1 the output-columns page asked the runtime driver for the
IResultSetMetaData I believe once at startup and now only when the
query-text changes. Strangely, the JDBC Select dataset does not seem to
have a problem with that :-)
The page I add to the "New Dataset" wizard simply sets the query-text
where the resultset and parameter metadata are dependent on it.
Would it be the way to do it, if I build the output columns and
parameters there in the collectDataSetDesign method using the given design?
Best regards and thanks for your help
Alex
>
> To implement the DTP ODA design-time extensions, it involves a couple other UI extension points adopted from the DTP Connectivity framework. See this Wiki page for a
> listing of the extension points involved, and exemplary implementation:
> http://wiki.eclipse.org/index.php/Use_Case_-_Create_a_Custom _ODA_Data_Source
>
>>> there should be another way of letting the desinger know the metadata of my dataset. Can you point to how to do this.
>
> Yes, indeed. The UI extensions provide the custom pages that collect user-input of a data source and data set designs, which are in turn defined using the oda.design API
> (EMF-based model). E.g. see org.eclipse.datatools.connectivity.oda.design.ui.wizards.Dat aSetWizardPage#collectDataSetDesign.
> (A simple implementation example of that method can be found in the DTP ODA Flatfile UI plugin's
> org.eclipse.datatools.connectivity.oda.flatfile.ui.wizards.F ileSelectionWizardPage class.)
>
> BIRT, as an oda design consumer, then adapts the collected oda.design.DataSetDesign object to the internal model of its report design.
>
> Linda
>
|
|
|
Re: Report designer: custom dataset not asked for metadata [message #197743 is a reply to message #196974] |
Wed, 25 October 2006 21:25  |
Eclipse User |
|
|
|
Alex,
>> How can I define a datasource that can be create without the need of displaying an additional page in the "New Datasource" wizard?
Which wizard class did you specify to use in the newWizard.class attribute defined in your connectionProfile extension? The current default implementation NewDataSourceWizard
provided by oda.design.ui assumes that it has at least one wizard page. You can try extend and override its behavior, and specify your subclass in newWizard.class.
>> Would it be the way to do it, if I build the output columns and parameters there in the collectDataSetDesign method using the given design?
If you want your custom data set page to define the meta-data of result set columns and parameters, you will include them in the DataSetDesign model returned by your
collectDataSetDesign method. ODA provides utility methods that you can use to transform your IResultSetMetaData content to an oda.design's result set columns meta data. (See
usage example in DTP ODA Flatfile UI plugin's org.eclipse.datatools.connectivity.oda.flatfile.ui.wizards.F ileSelectionWizardPage.savePage method.)
When BIRT Data Set Editor processes this DataSetDesign instance collected from your custom data set page, it will adapt its metadata and initialize the values displayed in its
OutputColumns and Paramaters pages. An user can then further edit those values directly in those pages. When one then switches back to your custom data set page, any
user-defined or edited values in OutputColumns and Paramaters pages are then passed back to your page. It's then up to your implementation to honor those values, or override
them as appropriate.
Linda
|
|
|
Goto Forum:
Current Time: Mon May 12 01:32:14 EDT 2025
Powered by FUDForum. Page generated in 0.31300 seconds
|