Skip to main content



      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 10:15 Go to next message
Eclipse UserFriend
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 15:20] by Moderator

Re: crosstab in subreport [message #774354 is a reply to message #773427] Tue, 03 January 2012 13:57 Go to previous messageGo to next message
Eclipse UserFriend
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 15:11 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 19:33:57 EDT 2025

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

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

Back to the top