Banana.Report.ReportStyle

Deze documentatie is verouderd

De meest volledige en bijgewerkte documentatie is die van Banana Boekhouding Plus: Probeer het nu

In this article

The class Banana.Report.ReportStyle represent a single style in a stylesheet. It is used to set the style attributes.

Methods

setAttribute(attr_name, attr_value)

Set the attribute value. Attributes ids and values follow the CSS specification.

style.setAttribute("font-size", "24pt");

setAttributes(attributes)

Set attributes values. Attributes ids and values follow the CSS specification.

style.setAttributes("font-size:24pt;font-weight:bold;");

 

Supported attributes

font
font-family
font-size
font-style
font-weight

margin [top, right, bottom, left]
margin-top
margin-bottom
margin-left
margin-right

padding
padding-top
padding-bottom
padding-left
padding-right

hanging-ident
text-align
text-decoration
text-ellipsis
vertical-align
color
background-color

border
border-top
border-top-style
border-top-color
border-top-width
border-bottom
border-bottom-style
border-bottom-color
border-bottom-width
border-left
border-left-style
border-left-color
border-left-width
border-right
border-right-style
border-right-color
border-right-width

display
overflow
float
text-wrap
width
max-width
min-width
height

page-break-after
column-break-after
line-break-after
page-break-before
column-break-before
line-break-before
page-break-inside
line-break-inside

size
position
left
top
right
bottom

transform (matrix, translateX, translateY, translate, rotate, scaleX, scaleY, scale, skewX, skewY and skew)
transformOrigin

orphans

fill-empty-area

 

Non standard attributes and values

width-sym
This attribute contain a string. Columns with the same width-sym will be layouted with the same width.

layout-sym
This attribute is a string. Tables with the same layout-sym attribute will have the same layout for the width of the columns.

overflow
This attribute has the non standard value "shrink". The content of the node will be down scaled to fit given space.

style.setAttribute("overflow", "shrink");

overflow-shrink-max
This attibute the maximal down scaling factor (like 0.8). 

style.setAttribute("overflow-shrink-max", "0.6");

text-decoration
This attribute can also contains the values "double-underline" or "double-strong-underline".

style.setAttribute("text-decoration", "underline");

border-style
This attribute can also contain the values "double" and "double-strong".

style.setAttribute("border-style", "double");

flexible-width
This attribute can contain the value "always" and is only used with columns. If in a table one or more columns have the attribute "flexible-widht", only those columns are enlarged to get the desired table widht, untouching the other. Otherwise all columns are enlarged.

fill-empty-area
With this attribute you can fill the remaing space of your page with lines. Lines can be defined through the attribute, which is a string and contains the color, the style and the width of the line.

Style can be: solid, dash and dot.
Examples:

var style1 = stylesheet.addStyle("@page", "black solid 1");
var style2 = stylesheet.addStyle("@page", "green dash 0.5");

 

 

 

Share this article: Twitter | Facebook | LinkedIn | Email