Skip to main content



      Home
Home » Archived » BIRT » how can i hide colomn in crossTabs
how can i hide colomn in crossTabs [message #809784] Wed, 29 February 2012 04:03 Go to next message
Eclipse UserFriend
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 10:35 Go to previous messageGo to next message
Eclipse UserFriend
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 10:35 Go to previous messageGo to next message
Eclipse UserFriend
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 12:22 Go to previous messageGo to next message
Eclipse UserFriend
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 12:33 Go to previous messageGo to next message
Eclipse UserFriend
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 11:20 Go to previous messageGo to next message
Eclipse UserFriend
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 12:13 Go to previous messageGo to next message
Eclipse UserFriend
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 11:01 Go to previous messageGo to next message
Eclipse UserFriend
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 05:29 Go to previous messageGo to next message
Eclipse UserFriend
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 15:54 Go to previous messageGo to next message
Eclipse UserFriend
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 16:39 Go to previous messageGo to next message
Eclipse UserFriend
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 5055 times)
  • Attachment: Image2.png
    (Size: 55.47KB, Downloaded 4962 times)
  • Attachment: Image3.png
    (Size: 25.99KB, Downloaded 4991 times)
Re: how can i hide colomn in crossTabs [message #1709140 is a reply to message #1704171] Thu, 24 September 2015 08:30 Go to previous messageGo to next message
Eclipse UserFriend
Please, any help?
Re: how can i hide colo mn in crossTabs [message #1714618 is a reply to message #1709140] Fri, 13 November 2015 21:28 Go to previous messageGo to next message
Eclipse UserFriend
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 05:06 Go to previous message
Eclipse UserFriend
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 307 times)

[Updated on: Fri, 04 November 2016 05:12] by Moderator

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


Current Time: Thu Jul 10 03:57:17 EDT 2025

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

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

Back to the top