Skip to main content



      Home
Home » Archived » BIRT » hiding an element in pdf output
hiding an element in pdf output [message #181673] Wed, 02 August 2006 04:06 Go to next message
Eclipse UserFriend
Originally posted by: fake.mail.pl

Hi!
I have a problem with pdf output using birt (version 2.0.1). I made a
report with some tables and I wanted to conditionally hide them, so I set
Visibility param in Property Editor of an element to something like
"Total.count(row.DATA_WPL != null) == 0" where DATA_WPL is a column from
defined by DataSet. It works almost as I expected: table is hidden when no
data is returned by DataSet, but it seems like birt is reserving space
form hidden element and shows blank space in place of hidden table. So
other items are placed lower than they should be, not immediatelly after
previous visible item. Furthermore, when hidden table would span on 2
pages (it starts at the end of one page ang ends on the next page) and I
wanted a page break befeore next element - that leads to a blank page in
the pdf output, because as I mentioned birt reserves space for a hidden
table.
Do you experience similar behaviour ? What should I do in order to
completely hide an element in report ?

--
regards
Adam
Re: hiding an element in pdf output [message #181903 is a reply to message #181673] Wed, 02 August 2006 09:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fake.mail.pl

I think I found a solution, I've tried that earlier, but somehow it didn't
work. For a table that I want to hide I define table.onCreate method to
sth like:
if (hide_table_condition) {
this.getStyle().display = "none";
} else {
this.getStyle().display = "block";
}
where hide_table_condition is the same as previously used in Visibility
param in the Property Editor of the same table. Is it correct ? I have
many tables (subreport) in my report nested inside another table
(masterreport). Anybody knows of some "magic" consequences of using such a
script ?

--
Adam
Re: hiding an element in pdf output [message #182023 is a reply to message #181903] Wed, 02 August 2006 15:09 Go to previous message
Eclipse UserFriend
Looks like a good use of scripting.

Jason

"Adam" <fake@mail.pl> wrote in message
news:7e0256b144a3979efc4cadc8cde3af8c$1@www.eclipse.org...
>I think I found a solution, I've tried that earlier, but somehow it didn't
>work. For a table that I want to hide I define table.onCreate method to sth
>like:
> if (hide_table_condition) {
> this.getStyle().display = "none";
> } else {
> this.getStyle().display = "block";
> }
> where hide_table_condition is the same as previously used in Visibility
> param in the Property Editor of the same table. Is it correct ? I have
> many tables (subreport) in my report nested inside another table
> (masterreport). Anybody knows of some "magic" consequences of using such a
> script ?
>
> --
> Adam
>
Previous Topic:BIRT and RAD
Next Topic:Same Report Design File for BIRT 2.0.1 and BIRT 2.1
Goto Forum:
  


Current Time: Tue Jul 22 02:48:40 EDT 2025

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

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

Back to the top