Introduction

For those crafting pixel-perfect reports with Oracle Analytics Publisher (OAP), the development process often involves meticulous local testing before deployment. This blog dives into a valuable tool – the Template Viewer within the OAP Desktop suite – that empowers you to streamline your template testing and ensure exceptional report quality.

By leveraging the Template Viewer, you can effectively test various aspects of your OAP templates directly on your desktop, eliminating the need for repeated uploads to the Analytics instance. This translates to significant time savings and a more efficient development workflow.

In this blog, you will see how to leverage Template Viewer to test OAP templates.

 

Prerequisites

  1. Install OAP Desktop Tools
  2. An OAP Template & Data (XML) File

 

Test OAP Templates

  1. Template Viewer is a Java executable file named tmplviewer.jar. It can be found in the following directory:

<<OAP Desktop Path>>/Template Viewer

To initiate Template Viewer, simply double-click the executable file (tmplviewer.jar).

 

  1. Upon successful launch, Template Viewer will present its user interface as depicted below.

 

  1. Change the ‘Working Directory’ to a folder containing templates and data files to test.

 

  1. On the Files tab, select the template format. Selecting the ‘All Formats’ option will display all templates from the Working Directory.

 

  1. Select the template to test from the Template section and the data file from the Data section.

 

 

  1. Analytics Publisher settings can be updated on ‘Setting’ tab by updating settings manually or by uploading a config file.

 

  1. To debug a template, select the appropriate Log Level from the ‘Log (debug) Level’ drop-down.

 

  1. XLIFF and Style Templates, as required, can be selected in Template Viewer.

 

  1. Select the required Output Format, Locale, and click on the ‘Start Processing’ button to test the template.

 

  1. On clicking the ‘Start Processing’ button, Template Viewer will process the template, data, XLIFF, and Style Template files, and generate an output file.

Template Viewer will also generate a detailed log of the report generation process. Any errors are highlighted in the log file to help debug the issues.

 

  1. With the Template Viewer Desktop tool, you can
    1. Effectively diagnose issues within templates and sub-templates.
    2. Gain insights into memory consumption when applying templates to data files.
    3. Verify the proper rendering of fonts within templates.
    4. Evaluate the accuracy of translations by selecting the corresponding XLIFF file.
    5. Utilize the integrated XSLT processor to validate XML documents.
    6. Analyze performance by identifying time spent executing specific XSL code sections.

 

Call to Action

This blog provides a comprehensive overview of utilizing Template Viewer to test both Analytics Publisher templates and associated sub-templates. For further details and advanced functionality, refer to the official documentation here. We encourage you to use Template Viewer and leverage the expertise of the  Oracle Analytics community for any questions that may arise.