Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » how can i hide colomn in crossTabs
how can i hide colomn in crossTabs [message #809784] Wed, 29 February 2012 09:03 Go to next message
marina tzerluk is currently offline marina tzerlukFriend
Messages: 13
Registered: February 2012
Junior Member
Hi
i need to hide column of some of the summary feilds in cross tab acording user input.
when i use the visibility option it hides only the mesurer itself but the column still can be visible(it becomes very narrow) in the overveiw window.


does any one has any idea how can i hide the entire column?
Re: how can i hide colomn in crossTabs [message #810817 is a reply to message #809784] Thu, 01 March 2012 15:35 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You should be able to use a crosstab oncreate script to look for a cell
and set its style display to "none". Look at the attached example.
Also have a look at:

http://birtworld.blogspot.com/2010/02/birt-crosstab-scripting.html

Jason

On 2/29/2012 4:03 AM, marina tzerluk wrote:
> Hi
> i need to hide column of some of the summary feilds in cross tab
> acording user input.
> when i use the visibility option it hides only the mesurer itself but
> the column still can be visible(it becomes very narrow) in the overveiw
> window.
>
>
> does any one has any idea how can i hide the entire column?
Re: how can i hide colomn in crossTabs [message #810822 is a reply to message #809784] Thu, 01 March 2012 15:35 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You should be able to use a crosstab oncreate script to look for a cell
and set its style display to "none". Look at the attached example.
Also have a look at:

http://birtworld.blogspot.com/2010/02/birt-crosstab-scripting.html

Jason

On 2/29/2012 4:03 AM, marina tzerluk wrote:
> Hi
> i need to hide column of some of the summary feilds in cross tab
> acording user input.
> when i use the visibility option it hides only the mesurer itself but
> the column still can be visible(it becomes very narrow) in the overveiw
> window.
>
>
> does any one has any idea how can i hide the entire column?
Re: how can i hide colomn in crossTabs [message #810915 is a reply to message #810822] Thu, 01 March 2012 17:22 Go to previous messageGo to next message
Steve Schafer is currently offline Steve SchaferFriend
Messages: 1
Registered: July 2009
Junior Member
I just wanted to comment that the technique of hiding a cell doesn't really work for dimension columns because the dimension column itself gets hidden but the heading above doesn't shrink so all the headings are then misaligned. That was my experience recently in BIRT 3.7.
Re: how can i hide colomn in crossTabs [message #810924 is a reply to message #810915] Thu, 01 March 2012 17:33 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Correct Steve, but you should be able to check if it is a header cell in
script and hide it as well.

if( cellInst.getCellType() == "header" ) {
//Get data values see binding tab on crosstab
//if( cellInst.getDataValue("PRODUCTLINE") == "Planes" ){
if( reportContext.evaluate("dimension['ProductGroup']['PRODUCTLINE']")
== "Planes" ){
cellInst.getStyle().display = "none";
}

}


Jason

On 3/1/2012 12:22 PM, Steve Schafer wrote:
> I just wanted to comment that the technique of hiding a cell doesn't
> really work for dimension columns because the dimension column itself
> gets hidden but the heading above doesn't shrink so all the headings are
> then misaligned. That was my experience recently in BIRT 3.7.
Re: how can i hide colomn in crossTabs [message #872675 is a reply to message #809784] Wed, 16 May 2012 15:20 Go to previous messageGo to next message
Prashant Jha is currently offline Prashant JhaFriend
Messages: 18
Registered: September 2011
Junior Member
This is acting weird. I want to hide and shrink the dimension column.
if i write this code:
if(  cellInst.getCellType() == "header" ){
      cellInst.getStyle().display = "none";
}


This hides and shrinks all the headers. But also hides the dimension column on left of cross tab.
However, if I check for the dimension type as here in this code:

if(reportContext.evaluate("dimension['grp_row']['RowNumber']")=="RowNumber") {
			cellInst.getStyle().display = "none";}


This hides the left dimension column header but doesnot shrink it. What am i doing wrong.
Re: how can i hide colomn in crossTabs [message #873171 is a reply to message #872675] Thu, 17 May 2012 16:13 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Row headers are considered headers as well. Why not use the
cellInst.getCellID() for the if statement which will allow you to
control which cell you want to hide. You can get the cell id by looking
at the general properties for the cell (not label or data item). It
will be listed as element id.

Jason

On 5/16/2012 11:20 AM, Prashant Jha wrote:
> This is acting weird. I want to hide and shrink the dimension column.
> if i write this code:
> if( cellInst.getCellType() == "header" ){
> cellInst.getStyle().display = "none";
> }
>
> This hides and shrinks all the headers. But also hides the dimension
> column on left of cross tab. However, if I check for the dimension type
> as here in this code:
>
> if(reportContext.evaluate("dimension['grp_row']['RowNumber']")=="RowNumber")
> {
> cellInst.getStyle().display = "none";}
>
> This hides the left dimension column header but doesnot shrink it. What
> am i doing wrong.
Re: how can i hide colomn in crossTabs [message #896748 is a reply to message #873171] Thu, 19 July 2012 15:01 Go to previous messageGo to next message
Durga Ravi Santhosh Gurajada is currently offline Durga Ravi Santhosh GurajadaFriend
Messages: 6
Registered: February 2012
Junior Member
To hide any column in crosstab,

function onPrepareCell( cell, reportContext )
{
if(cell.getCellID()==95) { //In place of 95 give the column element ID which
//you are going to hide.
cell.getStyle().setDisplay("none");
}
}
Thanks Jason,
It really helped me alot.
Re: how can i hide colomn in crossTabs [message #1614566 is a reply to message #810915] Fri, 13 February 2015 10:29 Go to previous messageGo to next message
Warren Moxley is currently offline Warren MoxleyFriend
Messages: 1
Registered: February 2015
Junior Member
Steve Schafer wrote on Thu, 01 March 2012 17:22
I just wanted to comment that the technique of hiding a cell doesn't really work for dimension columns because the dimension column itself gets hidden but the heading above doesn't shrink so all the headings are then misaligned. That was my experience recently in BIRT 3.7.


I'm experiencing the same issue as you. Did you ever figure out a solution?
Re: how can i hide colomn in crossTabs [message #1621328 is a reply to message #1614566] Tue, 17 February 2015 20:54 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Hi Warren,

Can you describe your issue in more detail and also attach a design that shows your issue that I can test on? Thanks.
Re: how can i hide colomn in crossTabs [message #1704171 is a reply to message #1621328] Fri, 07 August 2015 20:39 Go to previous messageGo to next message
benjamin pittman is currently offline benjamin pittmanFriend
Messages: 2
Registered: August 2015
Junior Member
Hi,

I have hidden dynamically the second level of a cross tab columns, but i have a problem with the colspan of the first level.

I attached images.

Please, i hope your help.

index.php/fa/22835/0/

index.php/fa/22838/0/

index.php/fa/22839/0/

Regards
  • Attachment: Image1.png
    (Size: 35.74KB, Downloaded 1382 times)
  • Attachment: Image2.png
    (Size: 55.47KB, Downloaded 1376 times)
  • Attachment: Image3.png
    (Size: 25.99KB, Downloaded 1373 times)
Re: how can i hide colomn in crossTabs [message #1709140 is a reply to message #1704171] Thu, 24 September 2015 12:30 Go to previous messageGo to next message
benjamin pittman is currently offline benjamin pittmanFriend
Messages: 2
Registered: August 2015
Junior Member
Please, any help?
Re: how can i hide colo mn in crossTabs [message #1714618 is a reply to message #1709140] Sat, 14 November 2015 02:28 Go to previous messageGo to next message
Colin Sutton is currently offline Colin SuttonFriend
Messages: 89
Registered: July 2009
Member
benjamin pittman <forums-noreply@xxxxxxxx> wrote:
> Please, any help?
>

hide every item in the column and set the column width to zero

--
Colin Sutton
Re: how can i hide colomn in crossTabs [message #1746754 is a reply to message #873171] Fri, 04 November 2016 09:06 Go to previous message
Devpriyo Bhattacharya is currently offline Devpriyo BhattacharyaFriend
Messages: 12
Registered: October 2016
Junior Member
Hi,

I have a cross-tab (image01). I am trying to hide the Row dimension Year. I am using the following piece of code in the onPrepare script for the Crosstab:

function onPrepareCell( cell, reportContext )
{
if(cell.getCellID()==977)
{
cell.getStyle().setDisplay("none");
}
}


But this does NOT seem to work. Also, I selected the same crosstab cell and in its Advanced properties, I set Diplay = None. But the cell was still showing.

What am I doing wrong?

Best Regards
  • Attachment: image_01.png
    (Size: 90.70KB, Downloaded 17 times)

[Updated on: Fri, 04 November 2016 09:12]

Report message to a moderator

Previous Topic:Show Parameters on Report Viewer Page!
Next Topic:Change ODA datasource parameter on runtime
Goto Forum:
  


Current Time: Fri Dec 09 17:45:36 GMT 2016

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

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