Tuesday, January 25, 2011

BIRT: Connecting Data Elements to Existing Table Bindings

Not sure how I never knew this existed before, but I discovered a really cool little feature in BIRT. Lets say you have an existing table binding in a report. For me, I ran across this when I went into the XML source and copied a binding multiple times to duplicate it and make minor changes. Or, lets say you just added an Aggregation via the Property Editors binding tab instead of dragging and dropping. Now you want to add in a data element to display it. If you try to drop in a new Data Element, it will create a new binding, even if you are just referencing an existing table binding. Thats no good, you dont want duplicates, you just want to reference an existing binding. There is always the option of using a Dynamic Text element, but what if you want to change the underlying expression in the future, and you find the Property Editor tedious. Well, there is a quick way.

Add a Data element in the report designer. Do not change the name or add an expression, just his Escape. It will create a blank placeholder. Then, right-mouse click on this blank data element, and choose Change Data Column. The Select Data Binding dialog will pop up, and you can select which Data Binding to use. Once you hit OK, it will act just like an original Data Report Item. Again, not sure how I never came across that before...

5 comments:

An American Family said...

I didn't know that either. Very neat though. I kept ending up with multiple bindings for custom aggregations on multiple fields. This is nice.

Thanks.

Anonymous said...

I was googling for this very thing. Awesome Post! Thanks

rkraus10 said...

Beautiful! Thanks!!!

rkraus10 said...

Beautiful!!! Thanks!!!

Anonymous said...

Awesome tip !!! Thanks.