Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Any way of referencing multiple datasets from a report object?
Any way of referencing multiple datasets from a report object? [message #70891] Thu, 01 September 2005 20:49 Go to next message
marko is currently offline markoFriend
Messages: 39
Registered: July 2009
Member
For a table i would like to display dynamic query data in the header. For
example, i have a column labeled with a month of the year and the number of
"selling days" for that month (ie. "January (21)"). The value 21 needs to
come from a database query that is independent of the dataset used to render
the rows. Any ideas? Is there a technical reason why only one dataset can
be used per table?

A similar issue exists for the text widget. I would like to have the
ability to display data from multiple resultsets. I have had to resort to
creating an additional dataset to join all the data needed by text widget.
It works, but i would rather use the existing set of datasets.
Re: Any way of referencing multiple datasets from a report object? [message #70912 is a reply to message #70891] Thu, 01 September 2005 21:02 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Marko,

You could always override the create method for the control and make a POJO
call or use another Data set that will set a global variable.

Jason Weathersby
BIRT PMC

"Marko" <mmilicevic@pssd.com> wrote in message
news:df7pc6$fal$1@news.eclipse.org...
> For a table i would like to display dynamic query data in the header. For
> example, i have a column labeled with a month of the year and the number
> of
> "selling days" for that month (ie. "January (21)"). The value 21 needs to
> come from a database query that is independent of the dataset used to
> render
> the rows. Any ideas? Is there a technical reason why only one dataset
> can
> be used per table?
>
> A similar issue exists for the text widget. I would like to have the
> ability to display data from multiple resultsets. I have had to resort to
> creating an additional dataset to join all the data needed by text widget.
> It works, but i would rather use the existing set of datasets.
>
>
Re: Any way of referencing multiple datasets from a report object? [message #71404 is a reply to message #70912] Fri, 02 September 2005 17:25 Go to previous messageGo to next message
marko is currently offline markoFriend
Messages: 39
Registered: July 2009
Member
Thanks Jason. Can you point me to any sample code that demonstrates
building another dataset from script? Presumably i create new dataset from
a datasource? I don't see where the object model support this?

Thank you.


"Jason Weathersby" <jweathersby@actuate.com> wrote in message
news:df7q8f$gel$1@news.eclipse.org...
> Marko,
>
> You could always override the create method for the control and make a
POJO
> call or use another Data set that will set a global variable.
>
> Jason Weathersby
> BIRT PMC
>
> "Marko" <mmilicevic@pssd.com> wrote in message
> news:df7pc6$fal$1@news.eclipse.org...
> > For a table i would like to display dynamic query data in the header.
For
> > example, i have a column labeled with a month of the year and the number
> > of
> > "selling days" for that month (ie. "January (21)"). The value 21 needs
to
> > come from a database query that is independent of the dataset used to
> > render
> > the rows. Any ideas? Is there a technical reason why only one dataset
> > can
> > be used per table?
> >
> > A similar issue exists for the text widget. I would like to have the
> > ability to display data from multiple resultsets. I have had to resort
to
> > creating an additional dataset to join all the data needed by text
widget.
> > It works, but i would rather use the existing set of datasets.
> >
> >
>
>
Re: Any way of referencing multiple datasets from a report object? [message #71560 is a reply to message #71404] Fri, 02 September 2005 19:04 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Marko,

Attached is a report that creates two data sets.
One for offices and one for orders.
In the reports initialize method I create a global variable test.
I add two tables to the report one for each data set.
I set the visibility of the offices one to hide, this is so the query gets
called. In the offices data set methods I override the onFetch method to
set my global variable to
test = row["OFFICECODE"];

Then in the second table I set the header value to the global variable test.

There are probally better ways to do this, but here it is.

Jason Weathersby
BIRT PMC



"Marko" <mmilicevic@pssd.com> wrote in message
news:dfa1r3$9vi$1@news.eclipse.org...
> Thanks Jason. Can you point me to any sample code that demonstrates
> building another dataset from script? Presumably i create new dataset
> from
> a datasource? I don't see where the object model support this?
>
> Thank you.
>
>
> "Jason Weathersby" <jweathersby@actuate.com> wrote in message
> news:df7q8f$gel$1@news.eclipse.org...
>> Marko,
>>
>> You could always override the create method for the control and make a
> POJO
>> call or use another Data set that will set a global variable.
>>
>> Jason Weathersby
>> BIRT PMC
>>
>> "Marko" <mmilicevic@pssd.com> wrote in message
>> news:df7pc6$fal$1@news.eclipse.org...
>> > For a table i would like to display dynamic query data in the header.
> For
>> > example, i have a column labeled with a month of the year and the
>> > number
>> > of
>> > "selling days" for that month (ie. "January (21)"). The value 21 needs
> to
>> > come from a database query that is independent of the dataset used to
>> > render
>> > the rows. Any ideas? Is there a technical reason why only one dataset
>> > can
>> > be used per table?
>> >
>> > A similar issue exists for the text widget. I would like to have the
>> > ability to display data from multiple resultsets. I have had to resort
> to
>> > creating an additional dataset to join all the data needed by text
> widget.
>> > It works, but i would rather use the existing set of datasets.
>> >
>> >
>>
>>
>
>


Re: Any way of referencing multiple datasets from a report object? [message #71772 is a reply to message #71560] Fri, 02 September 2005 21:31 Go to previous message
marko is currently offline markoFriend
Messages: 39
Registered: July 2009
Member
Thanks for the workaround Jason.

But it sure feels like a very awkward solution? I will make an enhancement
request that data aware widgets be able to configure their dataset,
regardless if they are a child of another data widget. I'm still unclear if
there is a technical reason why this is not the case.

Also, it would be nice if you script could have created the dataset without
the need of for hidden tables. I wonder if there is a technical reason why
that is not possible?

Thanks again Jason.

Marko.
..


"Jason Weathersby" <jweathersby@actuate.com> wrote in message
news:dfa7nr$hqi$1@news.eclipse.org...
> Marko,
>
> Attached is a report that creates two data sets.
> One for offices and one for orders.
> In the reports initialize method I create a global variable test.
> I add two tables to the report one for each data set.
> I set the visibility of the offices one to hide, this is so the query gets
> called. In the offices data set methods I override the onFetch method to
> set my global variable to
> test = row["OFFICECODE"];
>
> Then in the second table I set the header value to the global variable
test.
>
> There are probally better ways to do this, but here it is.
>
> Jason Weathersby
> BIRT PMC
>
>
>
> "Marko" <mmilicevic@pssd.com> wrote in message
> news:dfa1r3$9vi$1@news.eclipse.org...
> > Thanks Jason. Can you point me to any sample code that demonstrates
> > building another dataset from script? Presumably i create new dataset
> > from
> > a datasource? I don't see where the object model support this?
> >
> > Thank you.
> >
> >
> > "Jason Weathersby" <jweathersby@actuate.com> wrote in message
> > news:df7q8f$gel$1@news.eclipse.org...
> >> Marko,
> >>
> >> You could always override the create method for the control and make a
> > POJO
> >> call or use another Data set that will set a global variable.
> >>
> >> Jason Weathersby
> >> BIRT PMC
> >>
> >> "Marko" <mmilicevic@pssd.com> wrote in message
> >> news:df7pc6$fal$1@news.eclipse.org...
> >> > For a table i would like to display dynamic query data in the header.
> > For
> >> > example, i have a column labeled with a month of the year and the
> >> > number
> >> > of
> >> > "selling days" for that month (ie. "January (21)"). The value 21
needs
> > to
> >> > come from a database query that is independent of the dataset used to
> >> > render
> >> > the rows. Any ideas? Is there a technical reason why only one
dataset
> >> > can
> >> > be used per table?
> >> >
> >> > A similar issue exists for the text widget. I would like to have the
> >> > ability to display data from multiple resultsets. I have had to
resort
> > to
> >> > creating an additional dataset to join all the data needed by text
> > widget.
> >> > It works, but i would rather use the existing set of datasets.
> >> >
> >> >
> >>
> >>
> >
> >
>
>
>
Previous Topic:An OutOfMemory error
Next Topic:BIRT Stats
Goto Forum:
  


Current Time: Fri Apr 26 04:16:07 GMT 2024

Powered by FUDForum. Page generated in 0.04004 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top