Skip to main content



      Home
Home » Archived » 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 16:12 Go to next message
Eclipse UserFriend
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 01:18 Go to previous messageGo to next message
Eclipse UserFriend
Since the cube only gets created once, you'll have to filter the crosstab for each group based on the outer table value.
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1085973 is a reply to message #1083565] Tue, 13 August 2013 12:11 Go to previous messageGo to next message
Eclipse UserFriend
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 16:54 Go to previous messageGo to next message
Eclipse UserFriend
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 01:58 Go to previous messageGo to next message
Eclipse UserFriend
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?
Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1086725 is a reply to message #1086361] Wed, 14 August 2013 12:19 Go to previous messageGo to next message
Eclipse UserFriend
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 09:21 Go to previous messageGo to next message
Eclipse UserFriend
Here's a simple example showing it working in 3.7.2.

Re: How to pass dataSetRow[] values in a Crosstab Within a Table [message #1087536 is a reply to message #1087326] Thu, 15 August 2013 16:06 Go to previous messageGo to next message
Eclipse UserFriend
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 18:08 Go to previous message
Eclipse UserFriend
Great! Glad to help!
Previous Topic:Getting Primary Y-Axis to Match Secondary Y-Axis
Next Topic:page type default by locale
Goto Forum:
  


Current Time: Wed Mar 19 08:45:28 EDT 2025

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

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

Back to the top