jBEAM_Logo_2020_150px_outline.png

Unknown macro: floating-toc

Batch Report Generator

The Batch Report Generator provides a simple way to create complex graphics and ASCII1 reports based on different layouts, datasources and selection files.

Basics

Template creation

The Batch Report Generator can use ASCII templates, jBEAM layouts and jBEAM projects as templates. To use a template with Batch Report Generator, some requirements have to be observed to ensure the correct report generation.

Important: To keep it simple and to avoid a lot of problems, create a Datasource Manager (click on jBEAM menu “File”->“Data Sources (Import)”->“New…”) and load a datasource file into it that is used later in Batch Report Generator. This step needs to be done before doing any template creation. At the next step, the creation of templates can be started - it is described in the following chapters.

It is very important to use only the Datasource Manager component, its result dataobjects and some service components (ex. Dataview service) in the templates. The reason for this is that the Batch Report Generator knows only the Datasource Manager component and the service components. Other components which are available during the template creation are not visible to the Batch Report Generator.

Keep in mind the name of the Datasource Manager (default name is “Datasources”) that is used for template creation, because this name is important for later use in Batch Report Generator.

ASCII templates

ASCII templates are created within the jBEAM ASCII exporter editor. Open the ASCII exporter editor by clicking on jBEAM menu “File”->“Export Values”->“ASCII”. To configure an ASCII template, only the two panels “Meta data” and “Channel data” are important. All the other configuration elements can be ignored completely. If the configuration is ready, save it by clicking on menu “Templates”->“Save as…”.

  • Meta data panel 

       In the Meta data panel the comment and the comment prefix can be set at the upper part of the dialog. At the bottom, system variables like date, time etc. and test properties are configurable. It is        important to choose only the Datasource Manager or service components in “Component” combo box - why? See chapter “Template creation”.

batchreport_asciiexporter_metadata.jpg

  • Channel data 

        At the upper part of the dialog, the view and the export channels can be choosen. The view can be set to any value but to keep it simple and to avoid a lot of problems, try to use only “0:Standard”.
        The export channels can either be selected or put in the “Available Channels” text field as following [name of Datasource Manager]#[channel name] (example “Datasources#Sinus”). If the channel is not available in jBEAM it will be red marked.
        Important: Select only export channels that are part of the Datasource Manager. As export component, select only the Datasource Manager.

batchreport_asciiexporter_channeldata.jpg

All the other elements in the user interface are self-explanatory - for further information see ASCII exporter documentation.

jBEAM layouts / jBEAM projects

To create jBEAM layouts or jBEAM projects that are compatible to Batch Report Generator, it is necessary to use only the Datasource Manager component, its result dataobjects and some service components (ex. Dataview service) as input objects for the components in the layout. For further information see chapter “Template creation”.

Protocol templates

Protocols are special graphical reports with header informations and one or more spreadsheets - see the protocol report in the following screenshot.

protocol_example.jpg

Protocol templates are jBEAM layouts or jBEAM projects with at least one “Interactive Table” (used as spreadsheet) and the first two characters of its name must be “PT” (PT - protocol table). If the Batch Report Generator finds such table in the jBEAM layout or jBEAM project then it knows that it is a protocol template. The Batch Report Generator supports the following features based on the “Interactive Table”:

  • resizes the table that it fits on page
  • tables are located automatically on pages and existing jBEAM graphic components are considered and won't be overlayed
  • splits the table horizontal in case there are too many columns that won't fit on page and therefore the columns would overlay. All columns that does not fit on the page are moved to a new table that is located behind the previous table.
  • splits the table vertical in case there are too many values that won't fit on page. All values that does not fit on the page are shown in a new table that is located on the next page with complete header.
  • in the case that the table must be horizontal split, the user can decide which column should be visible in all splitted tables
  • index columns can be created
  • automatically fill up the table with all dataobjects that are currently loaded from test or import file
  • user unit can be set and overwrite the default unit of the dataobject
  • decimal digits can be set
  • only columns with dataobjects (“Channel” column) are supported

 -> How to create a protocol template?

Editor

The Batch Report Generator editor can be found in jBEAM  menu “Auto-Sequences”->“Protocol Generators”->“Batch Report”

Menu_batchreport.png

Within the editor, the Batch Report configuration is done and consists of the following parts:

  • Templates (ASCII templates or jBEAM layouts)
  • Datasources
  • Selection files
  • Report output configuration

The Batch Report configuration can be saved/loaded to/from xml file. Therefore the menu “Batch Report” can be used. The last loaded Batch Report Generator configuration files (eight) are shown in the menu for quicklaunch.

batchreport_menu.jpg

Templates

The template configuration is shown in the following screenshot. There are buttons for loading multiple ASCII templates and jBEAM layouts at the same time, for removing templates and changing their order in the template list. Additionally, there is a menu item “Templates” which provides buttons for loading ASCII templates and jBEAM layouts and shows the last loaded template files for quicklaunch.

batchreport_template.jpg

To change an ASCII template, jBEAM layout or jBEAM project, choose a template in the list and click on the button “Change template”. In case of ASCII template, the ascii export editor dialog is shown. If a jBEAM layout or jBEAM project has to be changed, a new dialog is opened that shows the jBEAM layout or jBEAM project. In this dialog, only jBEAM text components like “Plain String”, “Plain Text”, “Formatted Text” and “Variable as Text” can be modified in the footer, header and the basic layout sections. All the other visual components has to be modified in jBEAM itself by importing the layout or project in jBEAM, doing the modifications, saving it and afterwards loading the modified jBEAM layout or jBEAM project into the Batch Report Generator editor template list. Within the dialog, all modifications can be saved by clicking on the button “Save template”. If the layout is a protocol template then the button “change protocol template” is enabled. Informations regarding protocol templates can be found in chapter “Protocol templates”.

Attention: The modifications (if not explicitly saved by clicking on button “Save template”) remain until the Batch Report Generator is deleted. If the batch generator is deleted in any way, all the template modifications are discarded - nothing is saved. The modifications are never saved into project file.

batchreport_ascii_template_changed.jpg        batchreport_jbeamlayout_template_changed.jpg

Datasources

In the following screenshot, the datasource configuration is shown. The main functionality is described in the Datasource Manager documentation. The checkbox “Name/unit mapping:” activates or deactivates the channel unit mapping service - see Channel Mapping. There is a menu item “Datasources” which contains the last loaded datasource files for quicklaunch.

Important: The name which has to be put into the datasource name textfield (at the top of the dialog) must be the same name of the Datasource Manager component that has been used to create the templates. For futher information see chapter “Template creation”.

batchreport_datasources.jpg

Selection files

In the following screenshot, the selection file configuration is shown. The main functionality is described in the Dataview documentation. There is a menu item “Selection files” which contains the last loaded selection files for quicklaunch.

Important: The view numbers of the selections in the selection files must be the same as used in templates. Example: If an ASCII template with selected view number 0 should be used in a Batch Report, the selection files that are choosen in that Batch Report must contain at least one selection with view number 0 otherwise the selections cannot be applied and all the values of the choosen export channels are exported.

batchreport_selectionfiles.jpg

Output (report generation)

The output configuration is divided into three parts (see the following screenshot):

  1. Configuration of the graphic report
  2. Configuration of ascii report
  3. Output log that shows the report generation process

example_editor12.jpg

First, it has to be configured in which order the datasources and selection files should be processed. Therefore it is possible to apply all datasources/selection files at once or each datasource/selection file separately. Additionaly the output can be sorted by datasources and selection files and it is considered in the following example.
Example: Assume there is a batch configuration with two jBEAM layouts (“Layout 1” and “Layout 2” - one page), two datasources “Datasource 1”, “Datasource 2” and two selection files “SelFile 1” and “SelFile 2”. Each datasource and selection file is applied separately:

Case: output should be sorted by datasources and selection files:

  1. page: Layout 1 loaded, Datasource 1 applied, SelFile 1 applied, Export Layout 1
  2. page: Layout 1 loaded, Datasource 2 applied, SelFile 1 applied, Export Layout 1
  3. page: Layout 1 loaded, Datasource 1 applied, SelFile 2 applied, Export Layout 1
  4. page: Layout 1 loaded, Datasource 2 applied, SelFile 2 applied, Export Layout 1
  5. page: Layout 2 loaded, Datasource 1 applied, SelFile 1 applied, Export Layout 2
  6. page: Layout 2 loaded, Datasource 2 applied, SelFile 1 applied, Export Layout 2
  7. page: Layout 2 loaded, Datasource 1 applied, SelFile 2 applied, Export Layout 2
  8. page: Layout 2 loaded, Datasource 2 applied, SelFile 2 applied, Export Layout

Case: output should NOT be sorted by datasources and selection files:

  1. page: Layout 1 loaded, Datasource 1 applied, SelFile 1 applied, Export Layout 1
  2. page: Layout 2 loaded, Datasource 1 applied, SelFile 1 applied, Export Layout 2
  3. page: Layout 1 loaded, Datasource 2 applied, SelFile 1 applied, Export Layout 1
  4. page: Layout 2 loaded, Datasource 2 applied, SelFile 1 applied, Export Layout 2
  5. page: Layout 1 loaded, Datasource 1 applied, SelFile 2 applied, Export Layout 1
  6. page: Layout 2 loaded, Datasource 1 applied, SelFile 2 applied, Export Layout 2
  7. page: Layout 1 loaded, Datasource 2 applied, SelFile 2 applied, Export Layout 1
  8. page: Layout 2 loaded, Datasource 2 applied, SelFile 2 applied, Export Layout 2
Graphic output

The graphic output can be done on the following medias:

  • Screen: a new popup window is shown with the complete report. Inside this window, jBEAM text components like „Plain String“, „Plain Text“, „Formatted Text“ and „Variable as Text“ can be modified in the footer, header and the basic layout sections. Furthermore, the values can be changed temporarily without saving back to datasource and the report can be printed and exported as pdf.
  • Print
  • PDF export
ASCII output

The ascii output can be exported into an ascii file. For each processing step, a new file can be created or the complete report is stored into one ascii file (therefore, activate “Merge output into one file”).

batchreport_output.jpg

  1. ^ American Standard Code for Information Interchange
jBEAM » jBEAM » Batch Report Generator
Tags:

Copyright by Kistler Chemnitz GmbH 2021
XWiki Enterprise 4.4 - Documentation