Contents
The Layout Manager features and intuitive design that enables you to quickly build new or edit existing layouts.
•Drag & Drop design elements into your template
•To select an element click on it in the template or in the menu panel
•Configure and style the element to your needs
•Select multiple elements to get alignment options
Element |
Description |
Text |
A text element can consist of static text, parameters, a combination of both or an expression to be evaluated (see expression syntax). Predefined styles can be applied to text as well. Enable rich text to assign different styles to a single text element. Rich text also allows parameters but doesn't support expression evaluation. |
Horizontal line |
The horizontal line supports adjustable width, height and color. |
Image |
The Layout Manager supports two common image types: PNG and JPG. File extensions accepted: PNG, WEBP, JPG, and JPEG. Ways to add images1. Upload a static image: Simply upload your image file directly 2. Define an image parameter: Utilize an image parameter to dynamically include images Printing and Scaling- During printing, ReportBro ensures optimal image quality by scaling images proportionally. - Aspect ratio is maintained to prevent distortion and preserve printing quality. - Images can be resized up to their actual height and width, ensuring no stretching occurs. |
Table |
A table is used for presenting lists of values, such as invoices, statistics, or shipping items. To print dynamic data a table needs a parameter list as its data source. Selecting and NavigatingA single click on the table selects the table itself. A double click within the table selects a content element for detailed configuration. Configuration and StylingConfigure and style table contents in the same way as text elements. Table Configuration Levels1. Table Element: - Contains the data source definition. - Allows enabling/disabling table header and footer. - Sets the amount of content rows for grouping purposes (see next paragraph Data grouping for details). - By default, a table contains 1 content row to iterate through the parameter list. 2. Table Content Element: - Configure content settings. - Set "Always on the same page" within print settings to prevent row splitting on a page break. 3. Table Header and Footer Element (if enabled): - Table header can be repeated on every page if the table spans multiple pages.
Data groupingGrouping rows within a table in ReportBro adds a powerful layer of organization to your data.
1. Content Rows Requirement: - To perform grouping, your table needs a minimum of 2 content rows. - One content row is dedicated to applying the group expression. - The other content row holds the actual data. 2. Configuring Content Rows: - Click on the table to access the "Content Rows" settings. - In the menu panel, each content row is represented. - Select the first content entry and enter a "Group expression" in the print settings. - This row will be printed only when the group expression value changes. 3. Group Header and Footer: - For each group, decide whether you want to show a header or footer. - To display a header for each group, ensure that the content row with the "Group expression" is positioned above the actual content row (without any "Group expression"). - To show a footer for each group, place the content row with the "Group expression" below the actual content row.
Hiding a table columnCustomize your table display by controlling the visibility of table columns based on conditions. 1. Select Header Column: - Click on the header column you want to conditionally display. 2. Define Print Condition: - In the print settings, set a condition to display the entire column only when the specified condition applies. 3. Adjusting Space: - If you want other columns to take up the space of hidden columns, define the grow weight for each header column. - If no grow weight is defined, the column width remains as predefined in the layout. Dynamic table columnsWhen your data doesn't have a fixed set of columns, and you need the table to grow both horizontally and vertically, opt for dynamic columns. You can achieve this flexibility by using simple list parameters. |
Barcode |
ReportBro supports various codes: 1. Code128: One of the most versatile barcodes and supporting all 128 ASCII characters. See ASCIItable.com for a list of supported characters.
2. Code39: defines 43 characters, consisting of uppercase letters (A through Z), numeric digits (0 through 9) and a number of special characters (-, ., $, /, +, %, and space).
3. EAN-13 / UPC: Standards identifying a specific retail product internationally. It consists of 12 numbers plus a checksum number. EAN-13 codes beginning with 0 are actually 12-digit UPC codes with prepended 0 digit.
4. EAN-8: derived from EAN-13 for smaller packages. It follows the same logic (7 numbers plus a checksum number).
5. QR Code can contain any characters. Optimizing for scanning devicesChoose styling options that enhance code readability, considering the capabilities of scanning devices. •Display value: Opt to show the value in addition to the code; can be enabled for all codes except QR code. •Bar width: Adjust the width of each rendered bar of the printed bar code •Rotate: Prints the bar code vertically •Guard bars: Show reference points of EAN-8 and EAN-13 codes for scanning devices •Error correction: Apply level of error corrections on QR codes to withstand damage like scratches and smudging while still redirecting scanners to the embedded data |
Frame |
Frames in ReportBro serve as versatile containers for elements, providing organization and visual enhancements. Here's how to effectively use frames: •Container for elements: A frame acts as a container for other elements, creating a cohesive grouping. •Dynamic sizing: A frame acts as a container for other elements, creating a cohesive grouping. •Grouping elements: Use frames to group elements together, ensuring they stay connected and don't split on a page break. •Styling options: Apply borders or backgrounds to the entire frame, enhancing the visual presentation. •Positioning: Elements within a frame are positioned relative to the frame, while the frame itself is positioned in relation to the page. •Movement impact in report design: Moving the frame affects its contents, making it a convenient way to reposition and organize multiple elements simultaneously. |
Section |
Similar to tables, sections require a parameter list as a data source. The key distinction to a table is that sections are not limited to text elements, providing flexibility for grouping whereas a table displays data line by line. Section Configuration Levels1. Section element Configure the data source, position, and decide whether to enable or disable the section header and footer. 2. Section header, content, and footer Adjust the height of each element and choose whether to shrink content to fit the height. Set "Always on same page" to prevent element splitting on a page break. Optionally, repeat the section header on every page if the section spans multiple pages. |
Page break |
A manual page break |
•Document properties allow to define the overall settings for the report template:
•Choose a predefined page format and page orientation or use your own dimensions.
•Set the content height appropriately to allow sufficient layout space for designing reports that span multiple pages.
•Set margins for the printable area. Elements cannot be moved outside the printable area.
•Enable header and footer and configure their size and display option. Both header and footer can either be displayed always (on all pages) or on all pages but the first page.
•Enable text and image watermarks.
•Select the pattern locale, currency symbol, and thousands separator. The pattern locale is used to format a date or number according to language or regional standards, e.g. displaying 3,000.76 (en) or 3.000,76 (de). An individual thousands separator overrides the default one from the pattern locale.
To fill a report with dynamic data from an application ReportBro offers different parameter types.
Number and date parameters can be formatted using patterns. ReportBro displays a predefined set of patterns but any individual pattern according to the Number Pattern Syntax and Date Pattern Syntax can be used.
By activating the "Nullable" setting the parameter value can be set to the special value null instead of an actual value. A parameter that is not nullable and has no assigned value will automatically get a default value assigned (e.g. current date for date parameter, 0 for number parameter, '' for a text parameter).
Type |
Description |
Text |
Takes any string. |
Number |
Numbers but can be formatted using patterns. The sign $ with a number pattern is replaced by the currency symbol. |
Boolean |
True or false value. |
Date |
Takes datetime.date or datetime.datetime or string in ISO 8601 standard format (YYYY-MM-DD for date, YYYY-MM-DD HH:mm for datetime) Dates can be formatted using patterns. |
Image |
Image parameter instead of a URL or uploaded file |
Rich Text |
Formatted text which can be used in a text element with activated "Rich Text". The following tags are allowed: <strong>: bold <em>: italic <u>: underline <s>: strikethrough <a>: link with attribute href for the URL <p>: paragraph with optional text alignment which can be specified with a class <span>: tag to set class and style attributes (see below) The tags can contain style attributes for font-size, color and background-color. font-size needs a px value, the color attributes have to be valid rgb values.
The tags can contain a class attribute to set a font, where the class name must start with font- followed by the internal font name. The font name is case-insensitive, i.e. you can use courier or Courier for the Courier font. Default and fallback font is Helvetica. A <p> tag can contain a class attribute for text alignment. Possible values are align-center, align-right or align-justify. If no class is set the paragraph text is aligned left (default). A <p> tag must end with a closing </p> tag, nested paragraphs are not allowed. When using a rich text parameter with <p> tag the rich text field must only contain the rich text parameter and no additional formatting. Example for valid rich text: <span style="color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
Example for valid rich text with paragraphs: <p class="align-center"> |
List |
Contains a list of parameters. A list can only be used as a data source together with a Table or Section. |
Simple List |
Contains a list of parameters of one specific type (text, number, boolean or string). This is particularly useful to create tables with dynamic columns which can grow both horizontally and vertically. |
Collection |
Contains a logical grouping for text, number, date, sum and average parameters. |
Sum |
Provides the calculated sum of a list parameter of type number. |
Average |
Calculates the average of a list parameter of type number. |
Expressions must be valid Python statements and can contain parameters. Parameters used for expressions consider their respective type (e.g. a parameter text represents a string in Python, a parameter number represents a decimal.Decimal in Python). See below for supported operations and functions including examples when used in ReportBro. For more detailed information about writing Python statements, please refer to https://docs.python.org/3/reference/simple_stmts.html.
Operation |
Description |
Examples |
Arithmetic operation |
+, -, /, *, % |
${NetPrice} + ${Vat} |
Comparison operators |
<, >, <=, >=, ==, != |
${Price} > ${Budget} |
Logical operators |
and, or, not |
${Weight} > 0 and ${Capacity} <= 200 |
Conditional statement |
value if cond else other_value |
'ok' if ${Weight} <= ${Capacity} else 'not enough space'
'ok and plenty of space' if ${Weight} < ${Capacity}/2 |
Function |
Description |
Examples |
abs(x) |
Return the absolute value of a number |
abs(${Score}) |
ceil(x) |
Return the ceiling of x, the smallest integer greater than or equal to x |
ceil(${Score}) |
decimal(x) |
Convert x to a decimal.Decimal NOTE: number parameters are saved as decimals, so you cannot use floats when performing arithmetic operations with number parameters. Always pass a string parameter to decimal function to avoid any possible rounding issues with floats. e.g. decimal('3.4') instead of decimal(3.4), the latter would result in 3.3999... instead of 3.4 |
# bad, will not work because Price is a decimal |
floor(x) |
Return the floor of x, the largest integer less than or equal to x |
floor(${Score}) |
float(x) |
Convert x to a float NOTE: there can be rounding issues when using float types due to the way how floats are stored internally . |
float(${Price}) * 1.2 |
format_datetime(d, pattern) |
Format datetime parameter d with given pattern and return formatted value as string. The pattern must contain valid Date Pattern Syntax. |
format_datetime(${Birthday}, 'd.M.yyyy') |
format_decimal(n, pattern) |
Format number parameter n with given pattern and return formatted value as string. The pattern must contain valid Number Pattern Syntax. |
format_decimal(${TotalAmount}, '#,##0.00') |
int(x) |
Convert x to an int |
int(${Price}) |
len(x) |
Return number of elements in a list x or the length of a string x |
len(${Name}) |
rand() |
Return a random float between 0 and 1 |
rand() * 100.0 |
randint(x) |
Return a random int below x |
'random value between 1 and 3: ' + str(randint(3) + 1) |
str(x) |
Convert x to a str |
'Number of customers: ' + str(${CustomerCount}) |
Shortcut |
Description |
shift+select elements |
Select multiple elements |
ctrl+C(Windows, Linux) command+C(Mac) |
Copy the selected element(s) to the clipboard |
ctrl+V(Windows, Linux) command+V(Mac) |
Paste the content of the clipboard into the template |
ctrl+Z(Windows, Linux) command+Z(Mac) |
Undo the previous command and also undo multiple commands. This can also be done via the button in the menu bar. |
ctrl+Y(Windows, Linux) command+Y(Mac) |
Redo, reversing the undo command. You may also redo multiple commands. This can also be done via the button in the menu bar. |
esc |
Close a popup window shown for selecting parameters, patterns or to enter test data for lists. Content provided within a popup window is always saved. |
Backspace |
Delete the selected element. This can also be done via the button next to the element in the menu panel. |
Arrow Keys |
Move the selected element pixel by pixel. You may also enter the exact position of the element in the detail panel. |
ctrl+drag element |
Move the selected element(s) pixel by pixel (instead of 10 pixel steps when dragging an element with mouse or touchpad). |