Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How can I retrieve data?
How can I retrieve data? [message #848123] Wed, 18 April 2012 00:35 Go to next message
Colin  is currently offline Colin
Messages: 14
Registered: September 2010
Junior Member
I have a database table that contains the names of other, dynamically
created, database tables. I can retrieve that data and from it compose a
query. I tried to use the composed query in a subreport table, but cannot
see how to pass it to the beforeopen of the dataset. The subreport example
shows how to pass a parameter of a where clause, but I need to pass the
whole query. How can that be done?

--
Colin
Re: How can I retrieve data? [message #849123 is a reply to message #848123] Wed, 18 April 2012 22:40 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Does the query change, change the column definitions? Ie are you just
changing the table name and not the column names and column types in the
sub report?

Jason

On 4/17/2012 8:35 PM, Colin wrote:
> I have a database table that contains the names of other, dynamically
> created, database tables. I can retrieve that data and from it compose a
> query. I tried to use the composed query in a subreport table, but cannot
> see how to pass it to the beforeopen of the dataset. The subreport example
> shows how to pass a parameter of a where clause, but I need to pass the
> whole query. How can that be done?
>
Re: How can I retrieve data? [message #849589 is a reply to message #849123] Thu, 19 April 2012 09:15 Go to previous messageGo to next message
Colin  is currently offline Colin
Messages: 14
Registered: September 2010
Junior Member
I retrieve one column, converting it to a string in the query and renaming
it to one name using sql 'as'

Jason Weathersby <jasonweathersby@xxxxxxxx> wrote:
> Does the query change, change the column definitions? Ie are you just
> changing the table name and not the column names and column types in the sub report?
>
> Jason
>
> On 4/17/2012 8:35 PM, Colin wrote:
>> I have a database table that contains the names of other, dynamically
>> created, database tables. I can retrieve that data and from it compose a
>> query. I tried to use the composed query in a subreport table, but cannot
>> see how to pass it to the beforeopen of the dataset. The subreport example
>> shows how to pass a parameter of a where clause, but I need to pass the
>> whole query. How can that be done?
>>


--
Colin Sutton
Re: How can I retrieve data? [message #850436 is a reply to message #849589] Fri, 20 April 2012 03:17 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Colin,

Look at the attached example and give it a try. It may cache the
dataset defeating your purpose but it may be worth a try. Look at the
outer table oncreate on the detail row and the beforeOpen script on the
inner data set.

Jason

On 4/19/2012 5:15 AM, Colin wrote:
> I retrieve one column, converting it to a string in the query and renaming
> it to one name using sql 'as'
>
> Jason Weathersby<jasonweathersby@xxxxxxxx> wrote:
>> Does the query change, change the column definitions? Ie are you just
>> changing the table name and not the column names and column types in the sub report?
>>
>> Jason
>>
>> On 4/17/2012 8:35 PM, Colin wrote:
>>> I have a database table that contains the names of other, dynamically
>>> created, database tables. I can retrieve that data and from it compose a
>>> query. I tried to use the composed query in a subreport table, but cannot
>>> see how to pass it to the beforeopen of the dataset. The subreport example
>>> shows how to pass a parameter of a where clause, but I need to pass the
>>> whole query. How can that be done?
>>>
>
>
Re: How can I retrieve data? [message #851345 is a reply to message #850436] Fri, 20 April 2012 22:28 Go to previous message
Colin  is currently offline Colin
Messages: 14
Registered: September 2010
Junior Member
Thanks, Jason, that showed me exactly what I needed..
--
Colin
Jason Weathersby <jasonweathersby@xxxxxxxx> wrote:
> Colin,
>
> Look at the attached example and give it a try. It may cache the
> dataset defeating your purpose but it may be worth a try. Look at the
> outer table oncreate on the detail row and the beforeOpen script on the inner data set.
>
> Jason
>
> On 4/19/2012 5:15 AM, Colin wrote:
> I retrieve one column, converting it to a string in the query and
> renaming it to one name using sql 'as'
>
> Jason Weathersby<jasonweathersby@xxxxxxxx> wrote:
> Does the query change, change the column definitions? Ie are you just
> changing the table name and not the column names and column types in the sub report?
>
> Jason
>
> On 4/17/2012 8:35 PM, Colin wrote:
> I have a database table that contains the names of other, dynamically
> created, database tables. I can retrieve that data and from it compose a
> query. I tried to use the composed query in a subreport table, but cannot
> see how to pass it to the beforeopen of the dataset. The subreport
> example shows how to pass a parameter of a where clause, but I need to
> pass the whole query. How can that be done?
Previous Topic:Dynamically changing the date format on the X axis
Next Topic:Using BIRT with jsf4birt.jar on tomcat server/websphere
Goto Forum:
  


Current Time: Fri Sep 19 22:03:34 GMT 2014

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

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