FreeReportv0.9.0한국어

Styles and borders

Fonts, sizes, colours, alignment, padding and per-side borders, and named styles that elements share with styleName.

Inline styles merge over a named style (styleName), which merges over the report font. Borders take a shorthand per side, so table cells can share edges.

"styles": {
  "th": { "bold": true, "align": "center", "background": "#eef1f6", "border": "0.2 solid #8a94a6" },
  "num": { "align": "right", "border": { "bottom": "0.15 solid #b9c1cd" } }
},
"bands": { "detail": { "height": 6, "elements": [
  { "type": "field", "x": 140, "y": 0, "w": 40, "h": 6, "expr": "amount", "format": "#,##0", "styleName": "num", "style": { "bold": true } }
] } }
NameTypeDescription
fontFamily, fontSizestring, numberFont family and size in points (default 9).
bold, italic, underline, strikebooleanFont styles.
color, backgroundstringText and background color.
align, valign'left' | 'center' | 'right' | 'justify'; 'top' | 'middle' | 'bottom'Horizontal and vertical alignment.
paddingnumber | [t, r, b, l]Inner padding in mm (default 1 horizontally, 0.5 vertically).
bordertrue | "0.3 solid #333" | { top, right, bottom, left }true = 0.2mm solid black; a CSS-like string; or per side.
lineHeightnumberMultiple of the font size (default 1.25).
wrapbooleanWrap long text (default true); false cuts at the box edge.
shrinkToFitbooleanShrink the font until one line fits.
letterSpacingnumberLetter spacing in mm (spaced titles like 견 적 서).