Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » [SOLVED]crosstab in subreport([solved]passing parameter to crosstab as is done for tables)
[SOLVED]crosstab in subreport [message #773427] Sun, 01 January 2012 15:15 Go to next message
Prashant Jha is currently offline Prashant JhaFriend
Messages: 18
Registered: September 2011
Junior Member
I need to have crosstab in a sub report like we do for a table in this example http://eclipse.org/birt/phoenix/examples/reports/subreports/ By storing the current group value in a local variable, and binding the parameter to the dataset, it is possible to achieve the same. However, for a crosstab there is no such option.
What I tried to do:
1. I created the dataset to be used in datacube without any where clause in the sql query(as custId was in the example).
2. Next I stored the group value in a local variable as.. local = dataSetRow["Tables"]in the group row table cell.
3. In the filter of data set in data cube I add the filter condition... basically,
dataSetRow["Tables"] like table.
Now the data gets filtered only for the first value of the local. I get the same cross tab for the all the values of the group.
Is there any feasible way to achieve sub report with cross tab or is just not possible?

[Updated on: Tue, 03 January 2012 20:20]

Report message to a moderator

Re: crosstab in subreport [message #774354 is a reply to message #773427] Tue, 03 January 2012 18:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you try to put the filter on the crosstab and not the cube?

Jason

On 1/1/2012 10:15 AM, Prashant Jha wrote:
> I need to have crosstab in a sub report like we do for a table in this
> example http://eclipse.org/birt/phoenix/examples/reports/subreports/ By
> storing the current group value in a local variable, and binding the
> parameter to the dataset, it is possible to achieve the same. However,
> for a crosstab there is no such option.
> What I tried to do:
> 1. I created the dataset to be used in datacube without any where clause
> in the sql query(as custId was in the example). 2. Next I stored the
> group value in a local variable as.. local = dataSetRow["Tables"]in the
> group row table cell.
> 3. In the filter of data set in data cube I add the filter condition...
> basically,
> dataSetRow["Tables"] like table.
> Now the data gets filtered only for the first value of the local. I get
> the same cross tab for the all the values of the group. Is there any
> feasible way to achieve sub report with cross tab or is just not possible?
Re: crosstab in subreport [message #774383 is a reply to message #774354] Tue, 03 January 2012 20:11 Go to previous message
Prashant Jha is currently offline Prashant JhaFriend
Messages: 18
Registered: September 2011
Junior Member
BINGO!!!! I cannot tell you how many hours I wasted trying to work this one out!!!Eventually after giving up was trying to create crosstab dynamically.. Even found a few threads with the same problem but no solution... And of course, in the hindsight the filter should be on the crosstab and not the dataset!!! duh!!!!
Thanks Jason Smile
Previous Topic:Problem with starting application after eclipse + birt update
Next Topic:Change query Text based on the database type from JS Script event handler
Goto Forum:
  


Current Time: Fri Apr 26 18:10:30 GMT 2024

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

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

Back to the top