Skip to main content



      Home
Home » Archived » BIRT » Hide a column in runtime
Hide a column in runtime [message #155028] Thu, 20 April 2006 21:50 Go to next message
Eclipse UserFriend
Originally posted by: riannacmw.yahoo.com.hk

Hi,

I want to hide a column in a report at runtime. What I do is to set
visibility for the column according to a parameter passing at runtime. I
have 3 columns in the report, column1, column2, column3. My method work to
hide a column.

The problem is if column2 is hidden, there is empty space left between
column1 and column3. The emtpy space is the column2. How can I shrink
column2 if it is invisible?

Rianna
Re: Hide a column in runtime [message #155347 is a reply to message #155028] Fri, 21 April 2006 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Are you talking about PDF or HTML output?

Jason

"Rianna" <riannacmw@yahoo.com.hk> wrote in message
news:24034b23c9b13d95d51ec2f5a94d4e6a$1@www.eclipse.org...
> Hi,
>
> I want to hide a column in a report at runtime. What I do is to set
> visibility for the column according to a parameter passing at runtime. I
> have 3 columns in the report, column1, column2, column3. My method work to
> hide a column.
>
> The problem is if column2 is hidden, there is empty space left between
> column1 and column3. The emtpy space is the column2. How can I shrink
> column2 if it is invisible?
>
> Rianna
>
>
Re: Hide a column in runtime [message #155954 is a reply to message #155347] Tue, 25 April 2006 05:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: almasalki.hotmail.com

in both html and pdf
Re: Hide a column in runtime [message #157271 is a reply to message #155954] Sat, 29 April 2006 03:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: almasalki.hotmail.com

anyone help me
Re: Hide a column in runtime [message #157899 is a reply to message #157271] Tue, 02 May 2006 15:35 Go to previous messageGo to next message
Eclipse UserFriend
select the column and then in the Script associated to the column type
(want2displayColumn is a parameter used here to switch between showing the
column or not):

if(params["want2displayColumn"]==true)
this.getStyle().display="block";
else
this.getStyle().display="none";
Re: Hide a column in runtime [message #157979 is a reply to message #157899] Wed, 03 May 2006 05:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: almasalki.hotmail.com

thank you that is good
Re: Hide a column in runtime [message #158251 is a reply to message #157899] Thu, 04 May 2006 10:15 Go to previous messageGo to next message
Eclipse UserFriend
When I select a column in my table and open the Script tab, it says "This
element has no methods". Which I interpret as "columns do not have
methods". So I am confused about the instructions below ("select the column
and then in the Script associated..."). I want to hide the column, thereby
shrinking the table width.

"Cristian" <ceol.gael@gmail.com> wrote in message
news:313168dddbd2d0aad9516c65406a5273$1@www.eclipse.org...
> select the column and then in the Script associated to the column type
> (want2displayColumn is a parameter used here to switch between showing the
> column or not):
>
> if(params["want2displayColumn"]==true)
> this.getStyle().display="block";
> else
> this.getStyle().display="none";
>
Re: Hide a column in runtime [message #158883 is a reply to message #158251] Fri, 05 May 2006 15:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: birt_user.yahoo.com

I am also having a similar problem:
When I select a column in my table and open the Script tab, it says "This
element has no methods".
Please advise.
Re: Hide a column in runtime [message #159140 is a reply to message #158251] Mon, 08 May 2006 13:36 Go to previous messageGo to next message
Eclipse UserFriend
Hi. There is a filter associated to the table, Try to use that instead of
this.display="none"/"block"
Re: Hide a column in runtime [message #159146 is a reply to message #158883] Mon, 08 May 2006 13:38 Go to previous messageGo to next message
Eclipse UserFriend
hi. the script is associated to the element inside the cell rather than
with the cell.
Re: Hide a column in runtime [message #159160 is a reply to message #159140] Mon, 08 May 2006 15:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: birt_user.yahoo.com

Thanks for the help! When I set the visibility condition individually on the header "label" cell and the detail "data" cells it worked fine. I chose the "Visibility" property - selected the checkbox to "Hide Element" , "For all outputs". I used the same expression to evaluate (either "true" or "false") on both the cells. The column (header + detail rows) then disappeared in runtime, based on the return value of the expression.
Re: Hide a column in runtime [message #159599 is a reply to message #159160] Tue, 09 May 2006 08:51 Go to previous messageGo to next message
Eclipse UserFriend
Yes, this works, but (for me) it does not shrink the table width. I would
like to BOTH hide the column and shrink the table width. 'birt-user'...are
you able to shrink the table width? What version of Birt are you using?
Thanks.

"birt_user" <birt_user@yahoo.com> wrote in message
news:11272006.1147117783035.JavaMail.root@cp1.javalobby.org...
> Thanks for the help! When I set the visibility condition individually on
> the header "label" cell and the detail "data" cells it worked fine. I
> chose the "Visibility" property - selected the checkbox to "Hide Element"
> , "For all outputs". I used the same expression to evaluate (either "true"
> or "false") on both the cells. The column (header + detail rows) then
> disappeared in runtime, based on the return value of the expression.
Re: Hide a column in runtime [message #159835 is a reply to message #159599] Wed, 10 May 2006 13:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: birt_user.yahoo.com

Yes, when the column disappeared, the table width also shrank.
Also, I tried without setting the Visibility condition and included "Data" expression on both the header and the detail rows. When the expression does not return any value(based on the conditional expression), the table displays with the rest of the columns and completely hides this column and shrinks the table width.

I am using BIRT 2.0.1 version.
Re: Hide a column in runtime [message #159964 is a reply to message #159835] Wed, 10 May 2006 15:52 Go to previous messageGo to next message
Eclipse UserFriend
Ahh...the dilemma! I have some columns that should be narrow, and others
that should be wide. If specify column-widths, then my report looks nice,
but when the user selects a column to hide, the table-width does not shrink
(groan). If I do not specify column-widths, then the report looks ugly
(groan) but when the user selects a column to hide, the table-width shrinks
nicely. You can't have it both ways!

The remedy is to allow column-widths to be set at runtime. Looks like an
enhancement request to me.

"birt_user" <birt_user@yahoo.com> wrote in message
news:12487745.1147282466489.JavaMail.root@cp1.javalobby.org...
> Yes, when the column disappeared, the table width also shrank.
> Also, I tried without setting the Visibility condition and included "Data"
> expression on both the header and the detail rows. When the expression
> does not return any value(based on the conditional expression), the table
> displays with the rest of the columns and completely hides this column and
> shrinks the table width.
>
> I am using BIRT 2.0.1 version.
Re: Hide a column in runtime [message #160702 is a reply to message #159599] Fri, 12 May 2006 14:19 Go to previous message
Eclipse UserFriend
if you want to shring the table, try to add a highlight filter on the rows
or columns. each table has associated the highlight filters.
Previous Topic:Store Procedure in dataset
Next Topic:Change data source and/or set at runtime
Goto Forum:
  


Current Time: Thu May 08 23:37:12 EDT 2025

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

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

Back to the top