Out tag

Overview

An out tag is the most basic and most common tag. It tells the template to go to the data source, grab one piece of data – such as a number, a last name, an image, (and so on) – and place it in the template. Unless told otherwise, the out tag will retrieve one data item from the data group.

Use the out tag to display the contents of a node or variable in your report. The contents are formatted based on the attributes you set. The out tag can be used to display images in almost any format, including png, gif, tiff, jpg, bmp, dib, and more. The out tag is also used to display HTML by using type='TEMPLATE'.

If the location (that is, filename or URL) of the image or HTML is in the data source (and not the actual data itself), you would instead use the import tag.

Video: Creating a context-sensitive title page using Out tags

This video demonstrates how to create a context-sensitive title page using Out tags.

Let's see how this works in practice. Suppose you have a data group called "Contacts" that contains contact information for four people: Lisa, En-jay, Tomas and Kamala. That contact information is further organized into three subgroups: first name, last name, and city. Your template has three out tags, one for each of these subgroups.

Your template might have a table that looks like this:

Contacts

First Name

Last Name

City

<out tag>

<out tag>

<out tag>

When you run your report, you would see something like this:

Contacts

First Name

Last Name

City

Lisa

Harris

Roma

Note: Tags in templates typically have surrounding angle brackets that denote them as tags. You can change that by giving a tag a nickname, but we recommend you include angle brackets to make it easier to see what is a tag and what is plain text.

Attributes

One of these three attributes must be set:

These attributes are optional:

Limitations

In the case of value=, no intelligent parsing of the string occurs. It performs a simple text substitution for all ${variable} entries and then outputs the final value to the report. The string is not passed to the data source provider for evaluation. All of the optional attributes can be used in this case. For example, if value= is a number, it can be output as a currency or date.

Several attempts are made to parse the input string. (Parsing is when Autotag reads the text in the data source element and attempts to determine its value.) For a NUMBER/CURRENCY/PERCENT, it first attempts to parse the string using the appropriate NumberFormat.parse() method and using NumberFormat.applyPattern(). If this fails, it tries Double.parseDouble(). If that fails, it throws a NodeFormatException.

For DATE/TIME/BOTH six parsing passes occur. First, Autotag tries DateFormat.parse() using DateFormat.applyPattern(). If that fails, it triesDateFormat.parse() using the patterns FULL, LONG, MEDIUM and SHORT without using applyPattern(). If that fails, it assumes the data is a LONG and tries DATE (Long.parseLong()) which is the number of milliseconds since 01-01-1970. If it is not a LONG, it throws a NumberFormatException.

For more information on patterns and parsing, please view the java documentation for the java classes DateFormat, DecimalFormat, NumberFormat, and SimpleDateFormat.

Supported HTML and CSS for Type="Template"

Autotag supports a limited subset of HTML 4.01 for use in templates. The supported tags, attributes, and units/formats are listed below.

Supported Tags and Attributes

Tag​

​HTML Attributes

CSS Attributes​

​<a>

​href, style

color, font-size​

<b>​

style​

color, font-size​

​<body>

style​

color, font-size​

<br/>​

 

 

<em>​

style​

color, font-size​

<font>​

color, face, size, style​

color, font-size​

<i>​

style​

color, font-size​

<img/>​

alt, src

 

<li>​

style​

color, font-size​

<ol>​

style​

color, font-size​

<p>​

align, class, style​

color, font-size​

<strike>​

style​

color, font-size​

<strong>​

style​

color, font-size​

<sub>​

style​

color, font-size​

<sup>​

style​

color, font-size​

<table>​

border, style, width​

color, font-size, width​

<tr>​

 

 

<td>​

colspan, rowspan, style, width​

color, font-size, width​

<u>​

style​

color, font-size​

<ul>​

style​

color, font-size​

Supported Formats for HTML Attributes

Supported Formats for HTML Attributes

HTML Attribute

Supported Formats

alt

  • Any text.

align

  • left, center, right, justify

border

  • px values

class

  • Any text.

color

  • Hex values, eg, #F03, #FF0033
  • black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua

colspan

  • An integer.

face

  • Any text.

href

  • Any text.

rowspan

  • An integer.

size

  • 1-7 (standard HTML sizes)
  • pt and px values

src

  • Any text.

style

  • CSS

width

  • px values
  • percent values
  • numbers (px)
Supported Formats for CSS Attributes

CSS Attribute

Supported Formats

color

  • Hex values, eg, #F03, #FF0033
  • black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua
  • rgb(R,G,B) where R, G, B are integers

font-size

  • 1-7 (standard HTML sizes)
  • pt and px values

width

  • px values
  • percent values
  • numbers (px)

Learn More

About tags

The Tag Editor