|
Re: how can i hide colomn in crossTabs [message #810817 is a reply to message #809784] |
Thu, 01 March 2012 15:35 |
|
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 |
|
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 #810924 is a reply to message #810915] |
Thu, 01 March 2012 17:33 |
|
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 #873171 is a reply to message #872675] |
Thu, 17 May 2012 16:13 |
|
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 #1746754 is a reply to message #873171] |
Fri, 04 November 2016 09:06 |
Devpriyo Bhattacharya 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 280 times)
[Updated on: Fri, 04 November 2016 09:12] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04701 seconds