Home Page FO Designer user guide. XSL-FO tool for Oracle APEX and the Java[TM] platform
                                                    FO Designer guide
                                                  • First steps
                                                  • Introduction
                                                  • The user interface
                                                  • Working with the interface
                                                  • Structure of the template
                                                  • Executing the template to create PDF files
                                                  • Learn by doing
                                                  • The invoice IDOC example
                                                  • The Group by example
                                                  • The two columns example
                                                  • Barcodes
                                                  • Charts
                                                  • The running totals example
                                                  • Interactive forms
                                                  • Flavours
                                                  • The base template
                                                  • Long texts and HTML fields
                                                  • The memo field explained
                                                  • Advanced functionalities
                                                  • FOP Could Server
                                                  • Migration of existing XSL-FO files
                                                  • FAQS
                                                  • Troubleshooting
                                                  • Licenses
                                                  • The user interface

                                                    2. The user interface

                                                    The main window of the designer is divided in 3 areas:

                                                    1. On the left side there are 2 views:

                                                    • View 1 (left-top) is the Project explorer where the reports and the test files are located
                                                    • View 2 (left-bottom) is the object outline of the currently open report. The outline provides an overview of the structure and content of the report.

                                                    2. On the middle view (3) is located the report editor. Next to it (4) is the tools palette. Note if the palette is not visible you need to click on this icon:

                                                    3. On the right view (4) the properties of the selected object will be displayed.

                                                    The properties view

                                                    The properties view on the right side of the window will display the properties of the selected object grouped by section.

                                                    The selected object can be:

                                                    • the report
                                                    • the master
                                                    • the area
                                                    • the report fields

                                                    Areas and fields can be selected in the editor. For example you select an area by selecting the ruler (blue or grey header) or the area background. You can also select the area in the outline view.

                                                    you select an object and view the properties by click on the field:

                                                    Report and master properties can only be displayed by selecting them in the Outline view.


                                                    XML Schema folder

                                                    In the schema folder of the project

                                                    you can load the schema for the report. In the XML schema you have a tree structure which contains all possible elements of the input XML document.The schema file will be needed for the XPATH editor.

                                                    You need to load the schema into the folder by using the Settings tab of the editor and the „load schema“ button. Do not copy the schema file manually in the the folder, always use the button,

                                                    The XML test files folder

                                                    This folder contains the XML file that can be used for testing the report:

                                                    there can be one or several file in the folder. You can add files in windows by using copy and paste from windows explorer.

                                                    In order to use a file for testing the report you need to select the file in the report editor, setting tab.

                                                    Loaded files can be edited by double clicking on them:

                                                    Note however, the designer will not check the validity of the XML nodes you create or import, that is, you can create nodes that are not part of the schema or you can create them in the wrong sequence or position.

                                                    The editor view

                                                    By double clicking on the xre file in the project you open the report editor:

                                                    1. The ruler region. Click on this to display the properties of the area in the properties view.
                                                      The ruler contains the name of the area and the XML node element that has been assigned to the area:

                                                    2. The work panel itself. In this panel you place the fields and other objects of the template. In order to add an object you select one of the tools from the palette and drag it the position of the work area where you want to add the object.

                                                    3. To resize an area (the height of it) you can click on the area background and move the area anchors up and down. Note in order to change the width you must change the margins of the report.

                                                    4. The editor has 3 additions tabs
                                                      • the XSLT Code: will display the generated xsl code. This is the code that will be exported.
                                                      • the FO code: will display the generated FO (code). That is the result of applying the XML test file to the XSLT code. Here you can see the code with the test data instead of Xpaths expressions.
                                                      • The settings tab is used to select the schema file and the active test file.

                                                    5. Both the XSLT code and the FO Code will always highlight the currently selected object so you can check the generated code. In the example below the object „ProductName“ has been selected.

                                                      Selected code:

                                                    6. The tools palette next to the editor contains all the objects that can be placed in the report these are:

                                                      Column marker

                                                      Row marker

                                                      text field. Drag this field to the area in order to create a new output text field .

                                                      combo box object. Select this tool to add a combo box. A combo box is a list of pairs key/value. The value in the input XML document will be used as key to find the value in the list. The value will be output in the PDF document.

                                                      Memo field for rich text content

                                                      image object. Select this tool to add an image to the template.

                                                      line object. Select this tool to add an horizontal line.

                                                      Border box. Create a box object.

                                                      Table frame around existing fields

                                                      barcode object. Select this tool to add a 1D or 2D barcode. Note the designer includes the evaluation version of the barcoding components. This component requires the suite or enterprise license.

                                                      chart object. Select this tool to add a chart to the report. Note the designer includes the evaluation version of the charting component. This component requires the suite or enterprise license.

                                                      Link object. Use this object to add www links to your report. The value field can be a constant value or a XPath expression, it represents the www link. The "Link label" field will be the displayed value in the report, if empty the http link will be used. As example tasks.xre.

                                                      Free code object. Use this object to place you own XSL-FO in the output of the report.

                                                      Check box for input forms

                                                      action button for input forms

                                                    The toolbox bar

                                                    The actions available in the tool bar are:

                                                    Create new report project

                                                    Save report

                                                    Undo and redo actions

                                                    Delete, cut, copy and paste report objects

                                                    Open database

                                                    Database user administration (enterprise license only)

                                                    Open report from database

                                                    Open previous version of report from the database

                                                    this button generates the XSL-FO output for the document. This output can then be used in your runtime environment, using Apache FOP. Note this button might be disabled in the evaluation version.

                                                    Documentation button

                                                    save template to database (overwrite current version).

                                                    save template to database and create new version this button generates a PDF file using the current template. This button requires that you have loaded a test XML document in the test data panel. After generating the PDF document you have the option to open it manually or let the designer open the PDF document for you

                                                    Use this button to analyze the creation of the PDF file. This is a tool to assist debugging the PDF generation by tracing step by step the evaluation of the XPath expressions in the report. See the „Structure of the template“ chapter for a detailed description of this functionality.

                                                    this button generates a PDF file using the current template. This button requires that you have loaded a test XML document in the setting tab. After generating the PDF document it will be opened using the system‘s default reader.

                                                    Generate the Excel file locally (please read the restrictions on Excel files)

                                                    Generate the PDF file using a remote FOP server (J4L FOP Server or APEX Listener/Rest Data Services). See preferences window.
                                                    Generate the Excel file using the FOP Server. See preferences window.

                                                    Zoom editor work area

                                                    Toogle report‘s grid

                                                    Working with the database

                                                    You can work with the project on the file system however you can also use the database. If you are working in a enterprise environment it can be useful using a central database.

                                                    By default FO Designer will use the local database (db subdirectory of the installation) however for team work you would probably use a central database (installed as part of the J4L FO Server). This can be setup it the Windows→preferences dialog. A central database can be set in the enterprise version (license) only.

                                                    use the button for connecting to the database, the default user and password for the local installation are admin/admin

                                                    Once connected to the database you will be able save your projects:

                                                    • The xre file will be saved in the database
                                                    • together with the currently selected schema (in the report`s settings page)
                                                    • XML test files must be saved separately using the context menu:

                                                    Note files saved to the database have the database icon, the update of the icon is however not immediate.

                                                    The button should be used to retrieve projects in the database , the following screenshot shows the open report dialog:

                                                    Finally the user administration button can be used in a team work environment

                                                    Versioning system

                                                    The designer can keep track of the different versions of your templates by using a versioning system. Furthermore it keeps track of the modification date and the user that made the changes.

                                                    • You use this button to save your current template to the database and overwrite the current version.
                                                    • You use this other button to save the template to database creating a new version.

                                                    Whenever you want to open a template, the system always proposes the last version. As in this example it proposes version 2 for the EmployeesGroupFooter template.

                                                    You can however open an previous version of the currently open template using the button

                                                    . In the example below you would be opening version 1

                                                    SVN plugin

                                                    A more powerful alternative to our central database is using Apache Subversion (https://subversion.apache.org/) which is a generic tool for code management. If your enterprise is already using subversion, this section will show how to install the plugin for the FO Designer.

                                                    1. Download the file site-1.8.22.zip from https://dl.bintray.com/subclipse/archive/release/zipped/

                                                    2. Select Help→Install new software

                                                    3. Select „Add“ and create a new repository. The location should be the downloaded zip file (use the archive button)

                                                    4. Make sure you select these items:

                                                    5. Click next, accept the license and finish
                                                    6. Accept also the security warning

                                                    7. After restart there will be a new item in the windows menu:

                                                    8. In the SVN setup perspective the link to the central repository can be added (Contact your system administrator for details).