Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Additional column in BIRT Data set
Berlino
Hello,
is there a possibility to define in a BIRT-Data set an additional colummn and at runtime execute for example a SELECT-Statement on another table or compute a value.
Thanks
Find more posts tagged with
Comments
Hans_vd
About the select statement:
Is there a specific reason that you want to execute it at runtime? Why can't you adapt your query so that it selects the value that you want. The column will appear in your dataset and you can do whatever you want with it.
If you explain what it is that you want, I'll be able to tell you whether it can be done in SQL or not and I can help you creating the SELECT statement.
About the computed values:
You can add columns in your dataset - so called computed columns - that compute a value based on the columns you already have in your dataset. There's a whole set of Javascript and BIRT-functions you can use to get your expression together
Berlino
Hi Hans_vd,
thank you for your quick answer.
There ar several reasons for such an approach:
1. to make the main SELECT less complex.
2. performance reason: we have Reports (not yet in BIRT, but in Oracle Reports and we want migrate to BIRT) whose SELECTS have five or more joins on different tables. So its a good idea to read additional informations (for example customer adress) not on every single row in a order position table but rather but rather on a higher grouping level, i.e. on totals row per customer.
So what I want is: to read the customer information at the time when the totals row is written.
When I have an additional column, can I execute an extra SELECT at runtime only for any totals row (as described in p.2 above)?
I hope i could explain as exactly as possible.
Thanks a lot
Hans_vd
Berlino,<br />
<br />
If performance is an issue, I don't think separating the query into multiple queries is a good idea. I suppose you have a customer table at a high grouping level in the query, and a separate table that holds the addresses. Well, the addresses tabel will be read for only as much records as you have different customers in your resultset. So the address will not be read out of the database for every row in your resultset.<br />
As a matter of fact, if performance is an issue, it is almost always better to have one (complex) query, rather than having multiple (less complex) queries. Joining multiple tables together, well, Oracle is really good at that.<br />
<br />
As for complexity of the query: is adding the customer address the only extra join in your query, then in my opinion your query is not gonna be that more complex than it already is without it.<br />
<br />
<br />
If you really want to do it as you suggest: you might create an extra dataset with parameter custormer number that selects the address, and have the parameter filled in as described in this link<br />
<a class='bbc_url' href='
http://dev.eclipse.org/newslists/news.eclipse.birt/msg24960.html'>[news.eclipse.birt]
Re: Values in dataset to be used as input for anothe</a><br />
<br />
But again, it is almost certainly not going to improve performance