Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to pass dataSetRow[] values in a Crosstab Within a Table
How to pass dataSetRow[] values in a Crosstab Within a Table [message #1082593] Thu, 08 August 2013 20:12 Go to next message
Son Ton is currently offline Son TonFriend
Messages: 5
Registered: August 2013
Junior Member
I have a table that list employees in a company. For EACH employee (table row), I have a CROSSTAB that display information about the employee.

How do I pass dataSetRow["EmployeeID"] into the crosstab cube's dataset query?

I've already tried a couple approaches that did not work out for me:

1/Use Filter in the cube
My cube query is very complicated, that involves a few outer joints, so a simple filter for the cube does not work for me.

2/ Use beforeOpen script to replace params in the query.
Apparently, beforeOpen script only executed once, no matter how many times the query being executed.

3/ I can't find any "Parameter binding" for crosstab


So, again, how can I pass in table row value, in this case dataSetRow["EmployeeID"], to a crosstab?

I'll really any suggestion/solution you have.

Thanks!
ST
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1083565 is a reply to message #1082593] Sat, 10 August 2013 05:18 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Since the cube only gets created once, you'll have to filter the crosstab for each group based on the outer table value.

Michael

Developer Evangelist, Silanis
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1085973 is a reply to message #1083565] Tue, 13 August 2013 16:11 Go to previous messageGo to next message
Son Ton is currently offline Son TonFriend
Messages: 5
Registered: August 2013
Junior Member
Thank you for your reply, Michael.

So, no matter what I do, the cube will be created once? (Performance-wise, it makes sense).

Filtering by outer table value is my only option then?
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1086112 is a reply to message #1085973] Tue, 13 August 2013 20:54 Go to previous messageGo to next message
Son Ton is currently offline Son TonFriend
Messages: 5
Registered: August 2013
Junior Member
Michael:

Do you know why I can't use row["EmployeeID"], or row._outer["EmployeeID"] in my cube's filter? (EmployeeID is one my table column). I have the crosstab right under a cell. A data element at the same level can have a binding row["EmployeeID"], but not in the crosstab's cube filter.

Do you happen to have any sample code which use a crosstab within a table? The scenario seems very common, but somehow I can't find any such sample code.

Thank you so much!
ST
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1086361 is a reply to message #1086112] Wed, 14 August 2013 05:58 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

If it's embedded in the outer table, you should be able to access the outer table's bindings for your filter. What is your BIRT version?

Michael

Developer Evangelist, Silanis
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1086725 is a reply to message #1086361] Wed, 14 August 2013 16:19 Go to previous messageGo to next message
Son Ton is currently offline Son TonFriend
Messages: 5
Registered: August 2013
Junior Member
I'm using Eclipse BIRT Designer Version 3.7.2.

I had expected to see the outer table bindings available for the filter too, but somehow it was not available in menu items. When I manually entered it in as row["EmployeeID"], or row._outer["EmployeeID"], the report failed.

As you can see in my screenshot, a data element at the same cell was able to access outer table bindings.

Any workaround? Thanks!
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1087326 is a reply to message #1082593] Thu, 15 August 2013 13:21 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Here's a simple example showing it working in 3.7.2.



Michael

Developer Evangelist, Silanis
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1087536 is a reply to message #1087326] Thu, 15 August 2013 20:06 Go to previous messageGo to next message
Son Ton is currently offline Son TonFriend
Messages: 5
Registered: August 2013
Junior Member
Thanks, Michael! I had been looking at wrong places. I had looked at Filters for the Cube's primary dataset, not the cross tab's Filters.
Your sample showed me how it worked. Thanks a lot!!!

I modified your report to use a different dataset for the outer table, just to make your point clearer, in case other users want to take look.
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1087597 is a reply to message #1087536] Thu, 15 August 2013 22:08 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Great! Glad to help!

Michael

Developer Evangelist, Silanis
Previous Topic:Getting Primary Y-Axis to Match Secondary Y-Axis
Next Topic:page type default by locale
Goto Forum:
  


Current Time: Sun Dec 15 15:09:33 GMT 2019

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

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

Back to the top