Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Bindings from one table into new table
al91206
Few lingering questions that our team has been frustrated by lately:
1. When we alter the sql (add or remove fields) in a data set the bindings get screwed up - and we end up shouting at the computer. Any easy way other than ensuring our code is ready for prime-time before starting the report build process?
2. Is it possible to copy aggregates from one table to another? It seems we need to create a new aggregate if we want that same info in another table in the report?
Any help and / or workarounds for these situations would be GREATLY appreciated.
Thx.
Al
We are using: BIRT Report Pro Designer 2.3.2
Find more posts tagged with
Comments
mwilliams
Hi Al,
For #1, after changing the SQL, you should be able to go to the binding tab and choose the refresh button. This will at least add any new bindings to the table that were added to the bound dataSet. You may have to delete the unneeded ones still though.
For #2, can you explain more about what you mean by copying an aggregation from one table to another? Do you have the same fields in different tables and are wanting the same aggregation in both tables, but don't want to have to create it twice? Let me know.
al91206
Say I have Field1 and Field2 in a data set.
Now in Table1 I have created an aggregate on both fields. In a different table - Table2 I would like to also show those aggregates. I have already set the binding for Table2 to the data set - but in the bindings I do not see the aggregates since it is in Table1. What I would like to do is copy the aggregates from Table1 to Table2 - but this apparently doesn't work as I get an error that the binding does not exist.
If you don't understand my explanation (no worries) - I will make a sample report.
mwilliams
Al,
There would have to be a binding for the aggregation in table 2 as well. The one from table 1 doesn't just copy straight over because the only binding for it is in table 1, it's not a part of the dataSet. You would have to go to the binding tab for the second table and add the aggregation there. If you just want the values to be brought over from the first table, you could use an array variable or something to record the values and step through the array in the second table to recall the values. Just another option. If I'm not understanding correctly still, let me know.
al91206
Basically you're saying that it's not possible to do this w/o doing extra work. Creating new binding manually is basically the same work as developing a new aggregate - right?
It would be very nice (maybe I will put an enhancement request) that when you copy an aggregate it copies the binding to the new table. Do you think this would be a useful feature? Has anyone else asked for this type of functionality???
mwilliams
Al,
You could put in an enhancement request for this if you'd like. I can't say I've seen anyone else ask about this before. It will probably be argued that for the copying of aggregation bindings to work, you'd have to have the second table set up with the same dataSet with the same column bindings, etc, so this scenario may not happen often enough to consider, but I don't know that for sure. Is this something that you could do in a computed column in your dataSet editor? You can do aggregations on rows and on the entire result set in there. Then the binding would be available for all elements bound to that dataSet. If you're needing the aggregation over a group, you'll need to create it in the table, I believe.