Custom Driver: Access to Report Parameters [message #258040] |
Fri, 12 October 2007 05:46  |
Eclipse User |
|
|
|
Hi everybody,
I developed a custom driver. Now I need access to the Values of any
ReportParameters. Is there a way to do this from within the wizard pages
of a dataset?
I can't seem to find any way to access these Parameters.
Thanks for your suggestions
Franzi
|
|
|
|
|
|
Re: Custom Driver: Access to Report Parameters [message #258432 is a reply to message #258293] |
Mon, 15 October 2007 20:19   |
Eclipse User |
|
|
|
Franzi,
>> I need the default values of all ReportParameters in my Plugin. Is there
>> a way to get these? Or do I have to use DataSetParameters?
From the ODA framework architecture perspective, since a custom driver or
its UI is supposed to be consumable by any ODA consumer application, they
should only be exposed to info related to its own data source and data set.
So in this case, only those parameters associated with its data set, and not
with a component that are specific to one ODA consumer application, such as
a BIRT report parameter.
Therefore, only when a BIRT report parameter is linked to a data set
parameter, its related info can then be visible to a custom ODA
driver/designer thru its data set parameters.
>> is there a way to acces the actual ReportParameter Values from within my
>> runtime Plugin?
The ODA runtime interfaces supports pass-through of a consumer application
specific context object, using the setAppContext method in oda IDriver,
IConnection and IQuery. The content of an appContext object can be set with
the BIRT engine API. See link for related spec:
http://wiki.eclipse.org/BPS35
>> Whenever I actually use one in a DataSet my ResultSet seems to only have
>> one unnamed Column
It sounds like there may be a runtime exception when trying to access your
driver's result set metadata. The best way is to use the debugger, and step
thru your implementation around IResultSet.getMetaData.
Linda
"franzi" <franzi.haeger@gmail.com> wrote in message
news:509a9c10b2037449b6680086379ffc4f$1@www.eclipse.org...
> Hi Linda,
>
> thanks for the reply. Yes I meant the default Values of the Parameters,
> but I did not want to access them via the DataSetParameters. Actually I
> need the default values of all ReportParameters in my Plugin. Is there a
> way to get these? Or do I have to use DataSetParameters?
> And is there a way to acces the actual ReportParameter Values from within
> my runtime Plugin?
> I do have a Problem with the DataSetParameters too. Whenever I actually
> use one in a DataSet my ResultSet seems to only have one unnamed Column. I
> can't figure this Problem out either.
>
> Thanks Franzi
>
|
|
|
Re: Custom Driver: Access to Report Parameters [message #258435 is a reply to message #258432] |
Tue, 16 October 2007 04:01   |
Eclipse User |
|
|
|
Hi,
thanks again for your answers they are really helpful.
Linda Chan wrote:
>>> I need the default values of all ReportParameters in my Plugin. Is there
>>> a way to get these? Or do I have to use DataSetParameters?
> From the ODA framework architecture perspective, since a custom driver or
> its UI is supposed to be consumable by any ODA consumer application, they
> should only be exposed to info related to its own data source and data set.
> So in this case, only those parameters associated with its data set, and not
> with a component that are specific to one ODA consumer application, such as
> a BIRT report parameter.
> Therefore, only when a BIRT report parameter is linked to a data set
> parameter, its related info can then be visible to a custom ODA
> driver/designer thru its data set parameters.
I wasn't really aware of this concept until now. Thanks.
>>> is there a way to acces the actual ReportParameter Values from within my
>>> runtime Plugin?
> The ODA runtime interfaces supports pass-through of a consumer application
> specific context object, using the setAppContext method in oda IDriver,
> IConnection and IQuery. The content of an appContext object can be set with
> the BIRT engine API. See link for related spec:
> http://wiki.eclipse.org/BPS35
This is the way I'm working when I create the reports from within my
Application. I'm passing the values of the Parameters via the
setAppContext method. The Problem is that I want to have the same behavior
and reports when they are created from within the ReportDesigner. But I
can't seem to find a way to do this.
>>> Whenever I actually use one in a DataSet my ResultSet seems to only have
>>> one unnamed Column
> It sounds like there may be a runtime exception when trying to access your
> driver's result set metadata. The best way is to use the debugger, and step
> thru your implementation around IResultSet.getMetaData.
I tried to debug this behavior but could not find the Problem. My Metadata
and ResultSet are filled and read correctly. They have all the columns and
entries I expected from the query but somewehre between the reading of
these and the presentation in the preview or the columns (I couldn't yet
figure out where exactly) it seems to mix up somehow ending up with just
one unnamed_1 column that shows the entries of the first column of the
result set.
Thanks a lot and greetings from Berlin
Franzi
> Linda
> "franzi" <franzi.haeger@gmail.com> wrote in message
> news:509a9c10b2037449b6680086379ffc4f$1@www.eclipse.org...
>> Hi Linda,
>>
>> thanks for the reply. Yes I meant the default Values of the Parameters,
>> but I did not want to access them via the DataSetParameters. Actually I
>> need the default values of all ReportParameters in my Plugin. Is there a
>> way to get these? Or do I have to use DataSetParameters?
>> And is there a way to acces the actual ReportParameter Values from within
>> my runtime Plugin?
>> I do have a Problem with the DataSetParameters too. Whenever I actually
>> use one in a DataSet my ResultSet seems to only have one unnamed Column. I
>> can't figure this Problem out either.
>>
>> Thanks Franzi
>>
|
|
|
|
Re: Custom Driver: Access to Report Parameters [message #258537 is a reply to message #258435] |
Tue, 16 October 2007 19:42   |
Eclipse User |
|
|
|
Franzi,
> The Problem is that I want to have the same behavior and reports when they
> are created from within the ReportDesigner. But I can't seem to find a way
> to do this.
Running/generating a report output within the report designer uses the BIRT
runtime engine. So the setAppContext() interfaces do get used. Perhaps you
are referring to designing a report, and while editing your data set in your
custom ODA designer pages? If so, the use of setAppContext would not apply.
And for the reasons described earlier, it is a better design to associate a
BIRT report parameter to your data set parameter. This way, their default
values are available at design-time; and runtime values are available via
the oda IQuery's setter methods at runtime.
>>somewehre between the reading of
> these and the presentation in the preview or the columns (I couldn't yet
> figure out where exactly) it seems to mix up somehow ending up with just
> one unnamed_1 column that shows the entries of the first column of the
> result set.
Are your ODA UI plugin implementation based on the code generated by the ODA
project wizard? If so, try to step through the code in your
CustomDataSetWizardPage. In particular, this method:
updateDesign( DataSetDesign dataSetDesign, IConnection conn, String
queryText )
The generated code has some assumptions on what your ODA runtime driver
would return. Perhaps some runtime exceptions occur here if those
assumptions are not met.
Linda
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05165 seconds