EnglishFrenchSpanish

OnWorks favicon

jodreports - Online in the Cloud

Run jodreports in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command jodreports that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


jodreports - use libjodreports-java directly from the command line to merge OpenDocument
text with data

SYNOPSIS


jodreports <template-document> <data-file> <output-document>

DESCRIPTION


jodreports is a java program that merge OpenDocument text with data by using
libjodreports-java. The command line tool is especially useful to test templates while you
are adding instructions to them. You use a .properties or .xml file to contain the <data-
file> to be merged into the template. The <template-document> needs to be an existing
OpenDocument text with simple fields. A field that will be replaced with the value of a
variable passed can be specified using the standard FreeMarker expression notation by
typing the variable name into the document as follows

Hi ${name}!

here name will be replaced with the value passed in at runtime.

However, mixing processing instructions and normal text into the document may become
confusing and clutter the layout. So JOOReports provides an alternative way of inserting
fields. You can insert a visual field in OpenOffice.org Writer from the menu Insert /
Fields / Other... (or just press Ctrl+F2), then click on the Functions tab and select
Input field. Change the field Reference to JOOScript and in the following field Content
enter the variable name (e.g. "$name"). This field will typically be displayed by Writer
as a grayed rectangle with the variable name, while moving the mouse over it will reveal
the field reference.

This is a nice way of keeping processing instructions separate from the document layout
and is thus the recommended approach. Whatever you specify as the field Reference will be
treated as a FreeMarker ${...} expression, so it could also be something more complex than
a simple variable name.

To insert more advanced instructions, e.g. for conditionally displaying a portion of text,
or repeating a table row for each item in a collection, you can use FreeMarker directives.

A simple directive is assign. You can use it to define a new variable, for example

[#assign totalPrice = unitPrice * quantity]

Note that we always use the alternative (square bracket) syntax for FreeMarker directives.

While it may be possible to insert this directive directly as text into the template, this
does not always work (for reasons we'll see below) and as mentioned mixing instructions
into the document is a practice we want to avoid anyway. For this reason, JOOReports lets
you insert FreeMarker directives as scripts. You can insert a script in Writer from the
menu Insert / Script..., then change the Script type to JOOScript and insert any
FreeMarker directives in the script Text box. A script will be displayed by Writer as a
small green rectangle, and you can double click on it to open it and modify it.

So you directive will be executed at the point where the script has been inserted. This is
ok for something like assign but as we'll see will not work for something like list.

Alternatively, you can insert a FreeMarker directive in OpenOffice.org Writer from the
menu Insert / Fields / Other... (or just press Ctrl+F2), then click on the Functions tab
and select Input field. Change the field Reference to JOOScript and in the following field
Content enter the directive (e.g. "[#assign title='Mr.']"). Sample Open Document Template

Again this provides a nice way to insert processing instructions and keept them separate
from the document layout.

The <output-document> is also an OpenDocument text and will be created as the result of
the merge.

JOOReports uses FreeMarker as its template engine.

Use jodreports online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Image Downloader
    Image Downloader
    Crawl and download images using
    Selenium Using python3 and PyQt5.
    Supported Search Engine: Google, Bing,
    Baidu. Keywords input from the keyboard
    or input from ...
    Download Image Downloader
  • 2
    Eclipse Tomcat Plugin
    Eclipse Tomcat Plugin
    The Eclipse Tomcat Plugin provides
    simple integration of a tomcat servlet
    container for the development of java
    web applications. You can join us for
    discussio...
    Download Eclipse Tomcat Plugin
  • 3
    WebTorrent Desktop
    WebTorrent Desktop
    WebTorrent Desktop is for streaming
    torrents on Mac, Windows or Linux. It
    connects to both BitTorrent and
    WebTorrent peers. Now there's no
    need to wait for...
    Download WebTorrent Desktop
  • 4
    GenX
    GenX
    GenX is a scientific program to refine
    x-ray refelcetivity, neutron
    reflectivity and surface x-ray
    diffraction data using the differential
    evolution algorithm....
    Download GenX
  • 5
    pspp4windows
    pspp4windows
    PSPP is a program for statistical
    analysis of sampled data. It is a free
    replacement for the proprietary program
    SPSS. PSPP has both text-based and
    graphical us...
    Download pspp4windows
  • 6
    Git Extensions
    Git Extensions
    Git Extensions is a standalone UI tool
    for managing Git repositories. It also
    integrates with Windows Explorer and
    Microsoft Visual Studio
    (2015/2017/2019). Th...
    Download Git Extensions
  • More »

Linux commands

Ad