Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » BIRT dimensional fidelity, inherited 1pt padding, accumulation of error(Hoping to stimulate discussion on how to make BIRT output more pixel perfect)
BIRT dimensional fidelity, inherited 1pt padding, accumulation of error [message #1220641] Thu, 12 December 2013 19:32 Go to next message
Larry Talley is currently offline Larry TalleyFriend
Messages: 7
Registered: December 2013
Junior Member
In my instance of BIRT created objects inherit padding of 1pt. (All four paddings seem to default to 1pt, paddingTop, paddingLeft, paddingBottom, paddingRight.)

With a report of significant complexity, this results in objects failing to line up due to the fact that they are at different levels in the container hierarchy. For a simple example, create a report where the body contains a grid. In the first row of the grid and the first column place a text label. In the second row of the grid, first column, insert another grid, and inside it's first row and column, insert another grid, and in the inner-most grid's first row and column put a text label. In my opinion it should line up with the label in the row above, but it won't, because of multiple inherited paddingLeft of 1pt.

I am sure there must be some way to make these padding settings default to zero, and to make that the inheritable setting for contained objects. But I am having trouble finding the secret.
Re: BIRT dimensional fidelity, inherited 1pt padding, accumulation of error [message #1220645 is a reply to message #1220641] Thu, 12 December 2013 20:05 Go to previous messageGo to next message
Larry Talley is currently offline Larry TalleyFriend
Messages: 7
Registered: December 2013
Junior Member
I understand that I can resolve this in each report by navigating to each level of the hierarchy and setting the paddingTop, etc., to zero.

I have also tried to import css style sheets with broad-stroke settings, for example, setting the padding to zero for all elements, or children of html, but BIRT won't let me import css with those types of settings.
Re: BIRT dimensional fidelity, inherited 1pt padding, accumulation of error [message #1220808 is a reply to message #1220645] Fri, 13 December 2013 18:02 Go to previous messageGo to next message
Larry Talley is currently offline Larry TalleyFriend
Messages: 7
Registered: December 2013
Junior Member
I have made a simple test report and confirmed that I can resolve this issue by explicitly (through property editor or editing XML) setting the padding properties to zero at each object in the hierarchy.

I believe I have also confirmed that I cannot achieve this with style settings that are not explicit on each object. That is, I have created a library with a new theme and that theme has defined style/box/padding 0pt for each predefined style, and I applied that theme to my report, and it didn't fix the problem.

I also made a CSS file and defined styles .report { padding: 0px; } and also tried it with other "broad brush" CSS selectors, none of the approaches I tried had any results except the explicit setting of padding properties on each object.

I now believe this may be a symptom of a known bug in BIRT:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=327957#c4
Re: BIRT dimensional fidelity, inherited 1pt padding, accumulation of error [message #1220833 is a reply to message #1220808] Fri, 13 December 2013 23:19 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Thanks for the update! Smile

Michael

Developer Evangelist, Silanis
Re: BIRT dimensional fidelity, inherited 1pt padding, accumulation of error [message #1220838 is a reply to message #1220641] Sat, 14 December 2013 01:16 Go to previous messageGo to next message
Larry Talley is currently offline Larry TalleyFriend
Messages: 7
Registered: December 2013
Junior Member
In case it is useful here is the XML of a minimal report design that exhibits this defect. It renders correctly in preview mode, but exhibits the inability to apply inherited padding when rendered via an external tomcat birt-viewer.



<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 4.3.1.v201309091055 Build &lt;4.3.1.v20130917-1035></property>
<property name="units">in</property>
<property name="theme">unpadded.Unpadded</property>
<property name="iconFile">/templates/simple_listing.gif</property>
<property name="cheatSheet">org.eclipse.birt.report.designer.ui.cheatsheet.simplelisting</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<list-property name="libraries">
<structure>
<property name="fileName">Libraries/unpadded.rptlibrary</property>
<property name="namespace">unpadded</property>
</structure>
</list-property>
<styles>
<style name="report" id="24">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="leftMargin">1in</property>
<property name="rightMargin">1in</property>
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<property name="headerHeight">1in</property>
</simple-master-page>
</page-setup>
<body>
<grid id="450">
<column id="451"/>
<row id="454">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<cell id="455">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<label id="466">
<text-property name="text">Label inside grid with explicit padding everywhere</text-property>
</label>
</cell>
</row>
<row id="458">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<cell id="459">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<grid id="467">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<column id="468">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
</column>
<row id="471">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<cell id="472">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<grid id="483">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<column id="484">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
</column>
<row id="487">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<cell id="488">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<grid id="499">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<column id="500">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
</column>
<row id="503">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<cell id="504">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<label id="515">
<property name="paddingTop">0pt</property>
<property name="paddingLeft">0pt</property>
<property name="paddingBottom">0pt</property>
<property name="paddingRight">0pt</property>
<text-property name="text">Label deep inside multiple levels</text-property>
</label>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
<grid id="516">
<column id="517"/>
<row id="520">
<cell id="521">
<label id="522">
<text-property name="text">Label inside grid with implicit padding</text-property>
</label>
</cell>
</row>
<row id="525">
<cell id="526">
<grid id="527">
<column id="528"/>
<row id="529">
<cell id="530">
<grid id="531">
<column id="532"/>
<row id="533">
<cell id="534">
<grid id="535">
<column id="536"/>
<row id="537">
<cell id="538">
<label id="539">
<text-property name="text">Label deep inside multiple levels</text-property>
</label>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</body>
</report>
Re: BIRT dimensional fidelity, inherited 1pt padding, accumulation of error [message #1222203 is a reply to message #1220838] Thu, 19 December 2013 22:29 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You say you did define a style with 0pt set for the padding on each element type? If you go to the outline in the designer, you can choose the predefined style of data or label or whatever element and go to the box section and set the padding to 0. Then, each element in the report does switch to have 0 as the padding.

Michael

Developer Evangelist, Silanis
Previous Topic:Setting Style of data element in scripting
Next Topic:BIRT Report Viewer 4.3.1 won't run on Webshere 7
Goto Forum:
  


Current Time: Tue Mar 19 02:39:21 GMT 2024

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

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

Back to the top