Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Manually control paging in BIRT
Manually control paging in BIRT [message #871559] Mon, 14 May 2012 12:19 Go to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
I'm attempting to manually control the paging on a report that is made up of a List with one group. The group band has a grid for the Headings of the group. The Detail band then has a grid that then contains a table holding a sub-report, the sub-report having its own headings. In the initialize event I have the following code:

initHght=.65; // This represents the height of the Master Page Header.

hght=initHght;
maxHght=11.00;


Then, on each printable row, I have the following code in the onCreate event:

rowHeight = this.height;
rowHeight = rowHeight.replaceAll("in","");
rowHeight = rowHeight.trim();

dRowHeight = new Double(rowHeight);
hght = hght + dRowHeight.doubleValue();


Where I would expect/allow a page-break, I then have this code as well in the onCreate.

if (hght>=maxHght)
{
hght=initHght;
this.getStyle().pageBreakBefore = "Always";
}


A few questions.

I have the Height property for my List detail row set to .2 inches. However, displaying the accumulated height for these rows shows that .4 is being added to each row rather than .2. Can anyone explain what's causing this?

Also, I'm getting a page break before I reach the maxHght of 11.00 even though there is still plenty of white space at the bottom of the page. Apparently this is being automatically forced by BIRT since on the next page, the displays of the accumulated height continues where it left off. (Why does BIRT do this automatically?) However, then after continuing for several more rows, my maxHght is reached because I see the variable hght re-initialized but there is no pagebreak. Why wouldn't I get my pagebreak in this instance?

I know this is rather esoteric and definitely not what how I want to be spending my time but once one creates a more complicated report, BIRT doesn't seem to provide the desired paging that I get without effort on my part in some of the other tools I've used in the past. I've attached a copy of the report...the display at the end of each row is for the accumulated height to that point in the report.

I'm using BIRT 2.3.2.

Thanks for any help you can provide.

Don
  • Attachment: oth250.pdf
    (Size: 99.83KB, Downloaded 656 times)
Re: Manually control paging in BIRT [message #871751 is a reply to message #871559] Mon, 14 May 2012 19:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Paging code in BIRT has undergone many changes since 2.3. Do you have
the option of upgrading? BTW how are you running the report?

Jason

On 5/14/2012 8:19 AM, c-dowood@xxxxxxxx.us Mising name wrote:
> I'm attempting to manually control the paging on a report that is made up of a List with one group. The group band has a grid for the Headings of the group. The Detail band then has a grid that then contains a table holding a sub-report, the sub-report having its own headings. In the initialize event I have the following code:
>
> initHght=.65; // This represents the height of the Master Page Header.
>
> hght=initHght;
> maxHght=11.00;
>
> Then, on each printable row, I have the following code in the onCreate event:
>
> rowHeight = this.height;
> rowHeight = rowHeight.replaceAll("in","");
> rowHeight = rowHeight.trim();
>
> dRowHeight = new Double(rowHeight);
> hght = hght + dRowHeight.doubleValue();
>
>
> Where I would expect/allow a page-break, I then have this code as well in the onCreate.
>
> if (hght>=maxHght)
> {
> hght=initHght;
> this.getStyle().pageBreakBefore = "Always";
> }
>
> A few questions.
>
> I have the Height property for my List detail row set to .2 inches. However, displaying the accumulated height for these rows shows that .4 is being added to each row rather than .2. Can anyone explain what's causing this?
>
> Also, I'm getting a page break before I reach the maxHght of 11.00 even though there is still plenty of white space at the bottom of the page. Apparently this is being automatically forced by BIRT since on the next page, the displays of the accumulated height continues where it left off. (Why does BIRT do this automatically?) However, then after continuing for several more rows, my maxHght is reached because I see the variable hght re-initialized but there is no pagebreak. Why wouldn't I get my pagebreak in this instance?
>
> I know this is rather esoteric and definitely not what how I want to be spending my time but once one creates a more complicated report, BIRT doesn't seem to provide the desired paging that I get without effort on my part in some of the other tools I've used in the past. I've attached a copy of the report...the display at the end of each row is for the accumulated height to that point in the report.
>
> I'm using BIRT 2.3.2.
>
> Thanks for any help you can provide.
>
> Don
>
Re: Manually control paging in BIRT [message #872016 is a reply to message #871751] Tue, 15 May 2012 09:59 Go to previous message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Thanks Jason for the response.

I'm running the report using the BIRT Viewer.

Unfortunately, at the current time I'm tied to BIRT 2.3.2...a client limitation. However, this could be a reason to encourage them to upgrade to a newer version of IBM Rational Developer (with a newer version of Eclipse which will allow us to use later versions of BIRT).
Previous Topic:scripted data set; bug in the BIRT plugins?
Next Topic:Deploy BIRT Viewer 3.7.1 into Tomcat Server 7.0
Goto Forum:
  


Current Time: Thu Apr 25 14:07:07 GMT 2024

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

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

Back to the top