Go Back   Forum - BIRT Exchange > Designing BIRT Reports Forums > Designing BIRT Reports

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-07-2009, 05:35 AM
Junior Member
 
Join Date: Apr 2009
Posts: 3
Angry Being able to change an attribute based on output type (i.e PDF,HTML) @ runtime

The pageBreakInterval has been an obstacle for my team as the have to identify how many rows each page must have or set the value of the "pageBreakInterval" to 0 which will automatically break the page for PDF.

The issue I have seen and read is that for HTML if the "pageBreakInterval" is 0 while PDF will auto pageBreak, then all the data is displayed on one screen in one single HTML page.

A team member have found a script that can identify to me which output I am currently running but it seems that this check while works well in the designer running a PDF, does not work in the WebViewer. It seems to show HTML as the output even when generateing PDF be using cache data.

---> I would like to know if there is a way to change a value of pageBreakInterval to 0 at runtime if the requested output is PDF.

----> If there is any other advise on how to better handle pageBreaks, please let me know.
Attached Files
File Type: rptdesign test.rptdesign (33.0 KB, 3 views)
Reply With Quote
  #2 (permalink)  
Old 07-07-2009, 09:26 AM
Senior Member
 
Join Date: May 2008
Posts: 4,493
Send a message via Yahoo to mwilliams
Default

Hi rafidwahab,

What version of BIRT are you using?
__________________
Regards,

Michael
http://twitter.com/mwilliams_actu
Reply With Quote
  #3 (permalink)  
Old 07-07-2009, 12:16 PM
Junior Member
 
Join Date: Apr 2009
Posts: 3
Default

Hi Michael,

I am currently using two version 2.2.2 and 2.5. We are looking to upgrade and I was evaluating if this many have been solved, handled differently in 2.5.

Please let me know if you need anything further.

Regards,
Rafid
Reply With Quote
  #4 (permalink)  
Old 09-15-2009, 11:37 AM
Junior Member
 
Join Date: Apr 2009
Posts: 3
Default

Michael,

Has there been any update on the query above, or is there something I can do in the design file to identify the type of execution I am doing inside of the Report Design at runtime when exporting to PDF.

----
The issue is that the PDF only Auto PageBreaks when you have the pageBreak set to Zero, but this then creates only one HTML page with all th values.

I think a good idea would be to create a checkbox/options which would allow you to control the pagebreak independly for different output types.

I am not sure how this would affect the implementation of your emitters though.


Regards,
Rafid Waab
Reply With Quote
  #5 (permalink)  
Old 09-15-2009, 12:23 PM
Senior Member
 
Join Date: May 2008
Posts: 4,493
Send a message via Yahoo to mwilliams
Default

Rafid,

Sorry for the delay. If you put the following script in your beforeFactory script, you should be able to change the page break interval of your table to whatever value you specify, depending on output.

format = reportContext.getOutputFormat();
if (format = "pdf"){
reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("mytable").setProperty("pageBreakInterval",0);
}

The table in this example was named "mytable". This test was done in BIRT 2.5.0.
__________________
Regards,

Michael
http://twitter.com/mwilliams_actu
Reply With Quote
Reply


Thread Tools
Display Modes




All times are GMT -7. The time now is 11:38 AM.
Powered by vBulletin Copyright © 2000-2010 Jelsoft Enterprises Limited.


Content Relevant URLs by vBSEO 3.1.0