Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Cross Tab parameter(Give parameter from a table to a crosstab in order to filter the crosstab)
Cross Tab parameter [message #834889] Mon, 02 April 2012 10:24 Go to next message
Fabien REMY is currently offline Fabien REMY
Messages: 10
Registered: April 2012
Junior Member
Hi !

I try to generate a pdf report with a table bound on 1 main dataset (60 rows) and a cross table based on each row of the main dataset (60 cross table).

How can I specify a parameter or a filter to my datacube in order to obtain one cross table by row of my main dataset ?


birt 3.7.2

Thank you.
Re: Cross Tab parameter [message #835744 is a reply to message #834889] Tue, 03 April 2012 12:06 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

You really do not need to do anything in the cube. Just put the
crosstab in the detail row of the table or group on some value and put
it in the group footer. See attached example. Look at the filter on
the crosstab.

Jason

On 4/2/2012 10:24 AM, Fabien REMY wrote:
> Hi !
>
> I try to generate a pdf report with a table bound on 1 main dataset (60
> rows) and a cross table based on each row of the main dataset (60 cross
> table).
>
> How can I specify a parameter or a filter to my datacube in order to
> obtain one cross table by row of my main dataset ?
>
>
> birt 3.7.2
>
> Thank you.
Re: Cross Tab parameter [message #836195 is a reply to message #835744] Wed, 04 April 2012 03:33 Go to previous messageGo to next message
Fabien REMY is currently offline Fabien REMY
Messages: 10
Registered: April 2012
Junior Member
Thanks a lot I will have a look at your example and let you know.

Regards
Re: Cross Tab parameter [message #837023 is a reply to message #836195] Thu, 05 April 2012 03:11 Go to previous messageGo to next message
Fabien REMY is currently offline Fabien REMY
Messages: 10
Registered: April 2012
Junior Member
Hi,

It work fine right now.

Thank you for your example.

Regards.
Re: Cross Tab parameter [message #901949 is a reply to message #837023] Wed, 15 August 2012 05:16 Go to previous messageGo to next message
Paul Cockerill is currently offline Paul Cockerill
Messages: 12
Registered: August 2012
Junior Member
Thanks for this example; it's exactly what I am looking for. However I am using a joint dataset to produce my cross tab with a full outer join on MID and OMID. First dataset reports the previous 12 months and the second the sales. I do this join in order to have all 12 months in my cross tab even when there are no sales for that month.

The cross tab works fine until I try to filter the data. When I filter on the data._outer("DelAdd") value it filters out the zero months as well. I can see why as the DelAdd are null for these months. However I really need to retain all 12 months in the cross tab. Sample joint dataset output is below. Is their anyway to retain the 12 months after applying the the cross tab filter?

I have attached a sample output from the joint dataset.

Thanks

[Updated on: Wed, 15 August 2012 05:21]

Report message to a moderator

Re: Cross Tab parameter [message #902071 is a reply to message #901949] Wed, 15 August 2012 14:02 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Paul

What does your filter expression look like?
You could also add a computed column to the joint data set that is based
on the DelAdd field. It could use an expression like"

if( row["DelAdd"] == null ){
0;
}else{
row["DelAdd"];
}

You could then use this field in your cube instead of the DelAdd column.

Jason

On 8/15/2012 5:16 AM, Paul Cockerill wrote:
> Thanks for this example; it's exactly what I am looking for. However I
> am using a joint dataset to produce my cross tab with a full outer join
> on MID and OMID. First dataset reports the previous 12 months and the
> second the sales. I do this join in order to have all 12 months in my
> cross tab even when there are no sales for that month.
>
> The cross tab works fine until I try to filter the data. When I filter
> on the data._outer("DelAdd") value it filters out the zero months as
> well. I can see why as the DelAdd are null for these months. However I
> really need to retain all 12 months in the cross tab. Sample joint
> dataset output is below. Is their anyway to retain the 12 months after
> applying the the cross tab filter?
>
> StartPeriod EndPeriod MID MDesc Customer OrderDate OMID DelAdd Qty
> 01/09/2011 30/09/2011 9 Sep
> 01/10/2011 31/10/2011 10 Oct
> 01/11/2011 30/11/2011 11 Nov
> 01/12/2012 31/12/2011 12 Dec
> 01/01/2012 31/01/2012 1 Jan
> 01/02/2012 29/02/2012 2 Feb
> 01/03/2012 31/03/2012 3 Mar
> 01/04/2012 30/04/2012 4 Apr
> 01/05/2012 31/05/2012 5 May
> 01/06/2012 30/06/2012 6 Jun 01/0001 15/06/2012 6
> Lei 10
> 01/06/2012 30/06/2012 6 Jun 01/0001 20/06/2012 6
> Man 20
> 01/07/2012 31/07/2012 7 Jul
> 01/08/2012 31/08/2012 8 Aug 01/0001 01/08/2012 8
> Lee 30
> 01/08/2012 31/08/2012 8 Aug 01/0001 01/08/2012 8
> Lei 40
> 01/08/2012 31/08/2012 8 Aug 01/0001 15/08/2012 8
> Lei 50
>
>
Re: Cross Tab parameter [message #902364 is a reply to message #902071] Fri, 17 August 2012 06:38 Go to previous message
Paul Cockerill is currently offline Paul Cockerill
Messages: 12
Registered: August 2012
Junior Member
Jason

Thanks for your quick reply. I had to just update my filter to include
"" and data._outer["DelAdd"].

I originally only had data._outer["DelAdd"]

Regards
Paul
Previous Topic:1st report, dependant tables
Next Topic:Is it a bug
Goto Forum:
  


Current Time: Fri Jul 25 11:27:59 EDT 2014

Powered by FUDForum. Page generated in 0.01773 seconds