How Do I Use Clean Template?

Running this tool will make changes to your template such as fixing expressions, or helping by upgrading any code changes between versions. Make sure to try it first on a copy of your original template. It creates a new template which it scrubs, closes your existing template, opens the new scrubbed template, deletes the old file, and renames the new file to the name of the original file. (Version 10 and later. This replaced Convert Tags)

For information on using Clean Template on batches of templates, see the pages for each Engine: 

.NET and RESTful Engines

Java Engine

Using Clean Template in Report Designer

Click on the Clean Template tool:

You will be prompted with:

Data Source Parameters Section

These settings specify how you will instruct Designer to apply parameters to select statements. 

  • Substitution: substitutes variable references "${var}" with their values (in single quotes)
  • Parameters Plus: for variables of the form "${_var}" (with a leading underscore), perform Substitution, otherwise perform Parameters Only
  • Parameters Only: variable references "${var}" are replaced in the select with @pn (1..n), then setParameter (“@p1”, “value”) is called to set this value. Single quotes are added to the arguments of setParameter() as required. 

Write Tags Section

All Tags on output will be written in the form selected:

  • Field
  • Fields, 2007+
  • Controls, 2007+
  • Hyperlinks

Other Options

  • Smart Quote: add/remove the tic marks around a ${var} reference
  • Remove unused styles, etc.: remove any styles, fonts, etc. specified in a template that are not used 
  • Retain POD framing: if checked, all POD framing is kept in the output. If unchecked, it’s removed. 
  • Template version 9 or earlier: check if the template was created for version 9 or earlier.
  • Template version 14 or earlier: check if the template was created for version 14 or earlier. 
  • Attempt fix expressions: see below

Setting the correct value in the "Template version 9 or earlier" checkbox is critical. Check this box if the template you are cleaning was created in version 9 or earlier of the Designer. Do not check this box it if the template was created in version 10 or later - use "Template version 14 or earlier" as appropriate.

This tells Clean Template whether the Tags use select/evaluate/value (version 9 and earlier) or the Tags use select only (version 10 and later).

This scrubbing includes:

  1. All Tags are written in the default format.

  2. All Tag properties are updated to the latest syntax.

  3. Selects that have ...'${var}'... are converted to ...${var}... (removing the the tic mark that is no longer needed with setParameter).

Fixing Expressions

Any old templates that have select expressions that do not start with the '=' may fail to correctly determine the type of select expression. 

 To fix this, in the Clean Template window check the box next to "Attempt to fix expressions"

By checking this box, the Designer will attempt to fix unrecognized expressions during the template cleaning.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.