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)
Binding Two Data Sets
spg2112
Hello all,
I'm a BIRT newbie please take it easy on me if I come across as being retarded. I created 2 grids and 2 data sets that I'm thinking I need to bind on one, possible two of the data elements. I've tried the expression that was in the BIRT help and I've searched this forum but I can't figure this out.
Do bindings work like indexes in Access? If so I need to bind them on the "XREF" element. Any help would be greatly appreciated!
Steve
Find more posts tagged with
Comments
mwilliams
Not sure if I'm understanding your question completely, but as far as binding two dataSets to a single element, you can't do this, you'd have to do a joint dataSet or embed a table or element from the second dataSet in the first dataSet's table or element and link them using filters or dataSet parameter binding. Hope this helps.
spg2112
Hey Michael,
Thanks for the reply. My two data sets are the same exact query, one I have filtered for quantities and the other is filtered for the dollar amounts for those quantities. I just want to display them side by side in the report.
Steve
mwilliams
If you put a grid in your report with one row and two columns, you can put the element you have bound to each dataSet into their respective grid cell and they will be side by side in your report. Let me know.
spg2112
Thanks for all your help today Michael. I think I'm almost there. I ended up using the Joint Data Set route but I'm getting duplicate records from my quantity data set. I've tried all join types, (inner, left, right... etc).
Is there a way to join on multiple elements?
Steve
mwilliams
Steve,
It's not a standard functionality to join on multiple fields in BIRT. There is a workaround that you can do though. You can create a computed column in both dataSets that concatenates all of the fields you want to join on and then join on those two fields.
spg2112
Thanks Michael! That will work. One last dumb question. How do I reference an Element ID (label or text) in the expression builder?
Steve
mwilliams
Can you explain a little more?
spg2112
I have a label in my report "South" (Element ID is 1874), I want to build an if statement around the label. If "South" then {0} else {1}.
Steve
mwilliams
Steve,
If I'm understanding correctly, you could just store the value of the label in a persistentGlobalVariable in the onCreate of the label and then use the PGV to do your comparison later where you need it. Let me know.