Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » how-to question: use result set to iterate on other queries
how-to question: use result set to iterate on other queries [message #119575] Mon, 30 January 2006 09:39 Go to next message
Ruben Samaey is currently offline Ruben SamaeyFriend
Messages: 10
Registered: July 2009
Junior Member
Hello,

We would like to use Birt to create reports on our issue tracking.

We'd like to quantify "design effort" (e.g. new and open issues),
"validation effort" (e.g. fiwed but unverified issues), overall effort).

As such we've identified queries on the database that reflect these
concepts.
We've made these queries with a parameter: e.g. the product on which we
want the info.

Somehow now we need to itterate over all products, which is another easy
query; and use the outcome of this query to repeat all above mentioned
queries and put the results in a graph.

My main question is: how do we go about to use the results of a product
query as the parameter on the above mentioned queries: do we create a
javascript data source or are there other and beter solutions.

Any help is welcome.

best regards,
Ruben
Re: how-to question: use result set to iterate on other queries [message #120240 is a reply to message #119575] Mon, 30 January 2006 20:11 Go to previous messageGo to next message
Paul Reeves is currently offline Paul ReevesFriend
Messages: 14
Registered: July 2009
Junior Member
This may be a bit simplistic, but I'll share it as I think it is a nice,
simple tutorial for making a report on a bug database. It's on the MySQL
site:
http://dev.mysql.com/tech-resources/articles/using-birt/


"Ruben Samaey" <rsa@newtec.be> wrote in message
news:8ef4e784803c68f8b2bca5b10086fae5$1@www.eclipse.org...
> Hello,
>
> We would like to use Birt to create reports on our issue tracking.
>
> We'd like to quantify "design effort" (e.g. new and open issues),
> "validation effort" (e.g. fiwed but unverified issues), overall effort).
>
> As such we've identified queries on the database that reflect these
> concepts.
> We've made these queries with a parameter: e.g. the product on which we
> want the info.
>
> Somehow now we need to itterate over all products, which is another easy
> query; and use the outcome of this query to repeat all above mentioned
> queries and put the results in a graph.
>
> My main question is: how do we go about to use the results of a product
> query as the parameter on the above mentioned queries: do we create a
> javascript data source or are there other and beter solutions.
>
> Any help is welcome.
>
> best regards,
> Ruben
>
Re: how-to question: use result set to iterate on other queries [message #120733 is a reply to message #120240] Tue, 31 January 2006 09:18 Go to previous messageGo to next message
Ruben Samaey is currently offline Ruben SamaeyFriend
Messages: 10
Registered: July 2009
Junior Member
Thanks for your pointer.
Scanning it it seems I might get where I want starting from this.

However, I still do not understand how to use the outcome of a paramter
query as the input for another query.

Situation:

report paramter: product name
(b.t.w. is it possible to populate the values for a paramter by a query ?)

product_id data set: is a parametered query and uses the "product name"
report paramter and returns and id [integer] [This works]

design_effort data set: is also a parametered query and SHOULD use the
result of the product_id query (the result of which depends on the product
name the user selects as report paramter value)

I fail to find a way of linking the design_effort data set with the result
of the product_id data set. When I access the binding tab on the
design_effort data set, I want it's input to be the result from the
product id data set. However when clicking value the expression builder
gives only the design_effort data set as available "this reports' data
sets".

all input is welcome

regards,
Ruben
Re: how-to question: use result set to iterate on other queries [message #120739 is a reply to message #120733] Tue, 31 January 2006 09:38 Go to previous messageGo to next message
Ruben Samaey is currently offline Ruben SamaeyFriend
Messages: 10
Registered: July 2009
Junior Member
Update on previous message:
with sub reports it seems that one can wire up the input for one query
with the result of another query.
However, I tried doing this and I'm getting the following errors:

id
53
name
Demod

------------------------------------------------------------ --------------------

There are errors on the report page:
- There are error(s) in Data:null
Error0 : data.engine.UnexpectedError(1 time)detail: Data engine operation
failed due to an unexpected exception. Invalid field name: idInvalid field
name: id

The id number changes when I change the report parameter, however the name
should change as the id changes, but this does not happen.
Re: how-to question: use result set to iterate on other queries [message #122920 is a reply to message #120739] Wed, 01 February 2006 23:23 Go to previous messageGo to next message
Paul Reeves is currently offline Paul ReevesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Ruben,

I doubt I can be of more assistance but I'll just say I had a similar
problem once and it was because I had a table in a table (using 2 different
data sets) and I think there is a known issue in BIRT about data
accessibility in child containers. I can't remember the scenario so perhaps
someone else can help further. Are you using nested tables?


"Ruben" <rsa@newtec.be> wrote in message
news:f55d6b432e4bf4e52f7015b367866b5e$1@www.eclipse.org...
> Update on previous message:
> with sub reports it seems that one can wire up the input for one query
> with the result of another query.
> However, I tried doing this and I'm getting the following errors:
>
> id 53 name Demod
>
> ------------------------------------------------------------ --------------------
>
> There are errors on the report page: - There are error(s) in Data:null
> Error0 : data.engine.UnexpectedError(1 time)detail: Data engine operation
> failed due to an unexpected exception. Invalid field name: idInvalid field
> name: id
>
> The id number changes when I change the report parameter, however the name
> should change as the id changes, but this does not happen.
>
>
Re: how-to question: use result set to iterate on other queries [message #122966 is a reply to message #122920] Thu, 02 February 2006 09:33 Go to previous messageGo to next message
Ruben Samaey is currently offline Ruben SamaeyFriend
Messages: 10
Registered: July 2009
Junior Member
Hello Paul,

thanks for your input.

Indeed the set-up I had built was using a nested table.
It seems this is the only way of displaying data of 2 datasets close to
each other.

However the limitation of data in child containers being inaccessible to
the parent container, and more general data in a report being inaccessible
to objects not contained in the same table, seem very harsh limitations
indeed.

It implies that all data correlation one wants to set up, needs to be done
on the database side.
It seems that it would be great addition to a report tool that data from 2
or more datasets can be correlated, as it is my opinion that it is just
such correlation that most people want reports on.
Just my 2 cents.

Perhaps I should file a feature request to that extent ?

Best regards,
Ruben

<Hi Ruben,
<
<I doubt I can be of more assistance but I'll just say I had a similar
<problem once and it was because I had a table in a table (using 2
different
<data sets) and I think there is a known issue in BIRT about data
<accessibility in child containers. I can't remember the scenario so
perhaps
<someone else can help further. Are you using nested tables?
Re: how-to question: use result set to iterate on other queries [message #123299 is a reply to message #122966] Thu, 02 February 2006 19:24 Go to previous messageGo to next message
Paul Reeves is currently offline Paul ReevesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Ruben,

Let me confirm that this is indeed a limitiation before we make a feature
request. But if it the case, then it seems like a good request :) BRB.


"Ruben" <rsa@newtec.be> wrote in message
news:2d712dab1606db837de74d6ec4faf163$1@www.eclipse.org...
> Hello Paul,
>
> thanks for your input.
>
> Indeed the set-up I had built was using a nested table.
> It seems this is the only way of displaying data of 2 datasets close to
> each other.
>
> However the limitation of data in child containers being inaccessible to
> the parent container, and more general data in a report being inaccessible
> to objects not contained in the same table, seem very harsh limitations
> indeed.
>
> It implies that all data correlation one wants to set up, needs to be done
> on the database side.
> It seems that it would be great addition to a report tool that data from 2
> or more datasets can be correlated, as it is my opinion that it is just
> such correlation that most people want reports on.
> Just my 2 cents.
>
> Perhaps I should file a feature request to that extent ?
>
> Best regards,
> Ruben
>
> <Hi Ruben,
> <
> <I doubt I can be of more assistance but I'll just say I had a similar
> <problem once and it was because I had a table in a table (using 2
> different
> <data sets) and I think there is a known issue in BIRT about data
> <accessibility in child containers. I can't remember the scenario so
> perhaps
> <someone else can help further. Are you using nested tables?
>
>
>
Re: how-to question: use result set to iterate on other queries [message #123337 is a reply to message #122966] Thu, 02 February 2006 19:34 Go to previous messageGo to next message
Paul Reeves is currently offline Paul ReevesFriend
Messages: 14
Registered: July 2009
Junior Member
Ruben,

the nested table/grid issue doesn't appear to be a problem anymore. It was
bug that was fixed awhile back. I just made a simple report that used both a
nested table and grid and used different data sets. It worked fine.

I suggest you post what you did to achieve this:
"with sub reports it seems that one can wire up the input for one query
with the result of another query."

Perhaps someone more knowledgeable than myself can then help you get to the
next step.
Re: how-to question: use result set to iterate on other queries [message #124441 is a reply to message #123337] Sat, 04 February 2006 16:29 Go to previous message
No real name is currently offline No real nameFriend
Messages: 87
Registered: July 2009
Member
Ruben,

When you have nested tables, here's how the inner table gets a value from
the outer table to use in its query:

1) In the query of the inner table, use a parameter marker in the WHERE
clause. For example, WHERE custID = ?
2) In the data set of the inner table, create the corresponding data set
parameter. You must supply a specific default value for the parameter.
3) In the layout editor, select the inner table. Select Binding and bind the
data set parameter to the outer table's field whose value you want.

The BIRT online help provides a tutorial for creating such a report. Under
Help Contents, select BIRT Developer Guide -- Building a report with
subreports -- Tutorial 3.

Hope this helps.
-Diana


"Paul Reeves" <preeves@actuate.com> wrote in message
news:drtmq0$j33$1@utils.eclipse.org...
> Ruben,
>
> the nested table/grid issue doesn't appear to be a problem anymore. It was
> bug that was fixed awhile back. I just made a simple report that used both
a
> nested table and grid and used different data sets. It worked fine.
>
> I suggest you post what you did to achieve this:
> "with sub reports it seems that one can wire up the input for one query
> with the result of another query."
>
> Perhaps someone more knowledgeable than myself can then help you get to
the
> next step.
>
>
Previous Topic:scripted dateset for chart?
Next Topic:Error on Chart with Scripted data souce by Java object
Goto Forum:
  


Current Time: Fri Sep 27 08:14:25 GMT 2024

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

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

Back to the top