The Tag Editor allows you to create and edit tags. There are two ways you can open the Tag Editor:
- Click the Tag Editor button on the Blueprint tab
- Right-click a tag and select the Edit Tag... option in the contextual menu
The following, is the Tag Editor:
Tag Editor Panes
The Tag Editor has contains three main panes:
- The Data Source pane contains both data groups and data subgroups. A data group is a category of data and is represented by a box to the left of the icon; you can expand or collapse this group by clicking the + or – sign in the box.
A data subgroup, also known as a child group, is one type of data, and it cannot be expanded. When connected to XML data sources, the symbol next to the groups appears as in the image above. When connected to SQL data sources, the symbol next to the groups looks like a miniature table.
- The Attributes pane contains information about all the attributes, or features, of a particular tag. Attributes include items such as the tag's nickname, which is the text displayed in the Blueprint, or the tag type, which may be a number, date, image, or any of a dozen plus other types.
- The Evaluate Output pane displays data in the selected tag, and it contains information only after a user has created a select statement and clicked the Evaluate icon.
Tag Editor Tabs
The basic view of the Tag Editor contains two tabs:
- Tags tab
- Select tab
The Tags tab of the Tag Editor contains all the types of tags you can create. Tags are essentially commands that direct AutoTag to retrieve and place data where specified. AutoTag knows what data to retrieve based on how the tag is written, and it knows where to place the data based on the tag's location in the template.
<out>tag tells the template to go to the data source, grab a data subgroup and place it in the table. The
<out>tag is the most basic tag.
<End ForEach>tags: The
<forEach>tags tell the template that when the report is run, it should run through a loop, retrieving each piece of data in every tag between the two
<forEach>tags and placing all of that data in the report. We often refer to forEach loops. The
<forEach>tag goes at the beginning of the loop and the <end forEach> tag goes -- you guessed it -- at the end.
<end forEach>tags are quite common in Blueprints.
<if>tag allows you to display conditional information in your report. When you run a report, if the data retrieved meets a condition written into the template, the report will display information of your choosing. Each
<if>tag must be "closed" by an
<Else>tag: If the data retrieved by an
<if>tag doesn't meet the <if> tag's condition, you can tell the Blueprint to display something else with an
<else>tag is optional, and it is based on an
<if>tag. You can have an
<if>tag without an
<else>tag, but you can't have an
<else>tag without an
<Matrix>Tag: This tag lets you automatically generate a table with as many cells as the data calls for. Not all columns must have the same number of rows, and not all rows must have the same number of columns. A matrix tag has a built-in
<Row>tags: These tags work with a
<matrix>tag. Once the
<matrix>tag has been created, the
<column>tag is used to horizontally expand data in the table, and the
<row>tag is used to vertically expand data in the table.
<EndLink>tags: These tags let you insert a hyperlink into your document template. Each
<link>tag must be closed by an
<Import>tag: This tag lets you insert an external file into your template. The embedded document may be an image, a text file, a PDF file, or another template.
<Query>tag: Designed primarily to be used with large SQL databases,
<query>tags let you save the results of a query and then later refer to the data retrieved by that query without having to re-access the database.
<Set>tag: An internal variable tag, this tag lets you declare a variable name, assign it a value, and use the named variable elsewhere in the template.
<Function>tag: The function tag lets you take a set of data and perform one of five calculations upon it: count, minimum, maximum, total, and average.
- Other command icons: The three other icons found on the Tags tab are also on the Select tab. The Next and the Previous icons let you jump from tag to tag in the template without having to close and reopen the Tag Builder. The Save icon saves the current tag.
The Select tab of the Tag Editor provides the following information about the current tag:
- The Select bar contains the select statement, also known as a query, and it is often referred to simply as "the select." When you run a report, the select statement tells the data source exactly what data to retrieve.
Some of the ways you can create select statements are using the wizards, using the Data Bin, dragging and dropping groups from the data source pane of the Tag Editor into the select bar, or manually entering them.
The three icons to the left of the select bar describe the select statement, and you can ignore them for now.
- The Evaluate icon lets you see what data the select statement will call upon. It's a way to preview the data that will be inserted in a report.Keep in mind that when you click the Evaluate icon for an
<out>tag that sits in a forEach loop, you will see only the first item in the data source and not the entire group of items.
- The Wizard is either an XPath Wizard (for XML data sources) or SQL Wizard (for SQL databases.) It walks you through creating a complex select statement via a number of easy-to-use prompts.
- Other icons: The three other icons found on the Select tab are also on the Tags tab. The Next and the Previous icons let you jump from tag to tag in the template without having to close and reopen the Tag Builder. The Save icon saves the current tag.