Help: SQL Report Template
For more help, visit the WebGUI Community Wiki.
- columns_loop
- A loop containing information about each column.
- column.number
- An integer starting with 1 and counting through the number of columns.
- column.name
- The name of this column as returned by the query.
- rows.count
- The total number of rows returned by the query.
- rows.count.isZero
- A boolean indicating that the query returned zero rows.
- rows.count.isZero.label
- The default label for rows.count.isZero.
- rows_loop
- A loop containing the data returned from the query.
- row.number
- An integer starting with 1 and counting through the total list of rows.
- row.field.__NAME__.value
- The data for a given field in this row where __NAME__ is the name of the field as it is returned by the query.
- row.field_loop
- A loop containing all of the fields for this row.
- field.number
- An integer starting with 1 and counting through the number of fields in this row. This is the same as column.number in the column_loop.
- field.name
- The name of the field as it is returned by the query.
- field.value
- The data in this field.
- hasNest
- A boolean indicating whether query2 has returned any results.
- queryN.columns_loop
- A loop containing information about each column for queryN.
- column.number
- An integer starting with 1 and counting through the number of columns.
- column.name
- The name of this column as returned by the query.
- queryN.rows.count
- The total number of rows returned by queryN.
- queryN.count.isZero
- A boolean indicating that queryN returned zero rows.
- queryN.rows.count.isZero.label
- The default label for rows.count.isZero.
- queryN.rows_loop
- A loop containing the data returned from queryN.
- queryN.row.number
- An integer starting with 1 and counting through the total list of rows.
- queryN.row.field.__NAME__.value
- The data for a given field in this row where __NAME__ is the name of the field as it is returned by the query.
- queryN.row.field_loop
- A loop containing all of the fields for this row.
- field.number
- An integer starting with 1 and counting through the number of fields in this row. This is the same as column.number in the column_loop.
- field.name
- The name of the field as it is returned by the query.
- field.value
- The data in this field.
- queryN.hasNest
- A boolean indicating whether the queryN+1 has returned any results. This variable
will always be false for query5.
- pagination.firstPage
- A link to the first page in the paginator.
- pagination.firstPageUrl
- The url component of pagination.firstPage broken out.
- pagination.firstPageText
- The text component of pagination.firstPage broken out.
- pagination.isFirstPage
- A boolean indicating whether the current page is the first page.
- pagination.lastPage
- A link to the last page in the paginator.
- pagination.lastPageUrl
- The url component of pagination.lastPage broken out.
- pagination.lastPageText
- The text component of pagination.lastPage broken out.
- pagination.isLastPage
- A boolean indicating whether the current page is the last page.
- pagination.nextPage
- A link to the next page in the paginator relative to the current page.
- pagination.nextPageUrl
- The url component of pagination.nextPage broken out.
- pagination.nextPageText
- The text component of pagination.nextPage broken out.
- pagination.previousPage
- A link to the previous page in the paginator relative to the current page.
- pagination.previousPageUrl
- The url component of pagination.previousPage broken out.
- pagination.previousPageText
- The text component of pagination.previousPage broken out.
- pagination.pageNumber
- The current page number.
- pagination.pageCount
- The total number of pages.
- pagination.pageCount.isMultiple
- A boolean indicating whether there is more than one page.
- pagination.pageList
- A list of links to every page in the paginator.
- pagination.pageLoop
- Same as pagination.pageList except broken into individual elements.
- pagination.url
- The URL of a page in the page loop.
- pagination.text
- The number of a page in the page loop.
- pagination.range
- Displays the range of available pages, in a start - end format.
- pagination.activePage
- A boolean which will be true if the this page in the pageLoop is the currently viewed page.
- pagination.pageList.upTo20
- A list of links to the 20 nearest in the paginator relative to the current page. So if you're on page 60, you'll see links for 50-70.
- pagination.pageLoop.upTo20
- Same as pagination.pageList.upTo20 except broken into individual elements.
- pagination.url
- The URL of a page in the page loop.
- pagination.text
- The number of a page in the page loop.
- pagination.range
- Displays the range of available pages, in a start - end format.
- pagination.activePage
- A boolean which will be true if the this page in the pageLoop is the currently viewed page.
- pagination.pageList.upTo10
- A list of links to the 10 nearest in the paginator relative to the current page. So if you're on page 20, you'll see links for 15-25.
- pagination.pageLoop.upTo10
- Same as pagination.pageList.upTo10 except broken into individual elements.
- pagination.url
- The URL of a page in the page loop.
- pagination.text
- The number of a page in the page loop.
- pagination.range
- Displays the range of available pages, in a start - end format.
- pagination.activePage
- A boolean which will be true if the this page in the pageLoop is the currently viewed page.
- templateId
- The ID of the template to display the SQL Report to the user.
- cacheTimeout
- The amount of time in seconds the output will be cached.
- paginateAfter
- The number of rows or entries to show on each page of the report.
- dbQuery1
- The first database query.
- prequeryStatements1
- The first set of prequery SQL statements.
- preprocessMacros1
- A conditional indicating whether or not the first query will have embedded Macros processed before being executed.
- placeholderParams1
- A conditional indicating whether or not the first query will have embedded Macros processed before being executed.
- databaseLinkId1
- The identifier which describes which database the first query will be executed against.
- dbQuery2
- The second database query.
- prequeryStatements2
- The second set of prequery SQL statements.
- preprocessMacros2
- A conditional indicating whether or not the second query will have embedded Macros processed before being executed.
- placeholderParams2
- A conditional indicating whether or not the second query will have embedded Macros processed before being executed.
- databaseLinkId2
- The identifier which describes which database the second query will be executed against.
- dbQuery3
- The third database query.
- prequeryStatements3
- The third set of prequery SQL statements.
- preprocessMacros3
- A conditional indicating whether or not the third query will have embedded Macros processed before being executed.
- placeholderParams3
- A conditional indicating whether or not the third query will have embedded Macros processed before being executed.
- databaseLinkId3
- The identifier which describes which database the third query will be executed against.
- dbQuery4
- The fourth database query.
- prequeryStatements4
- The fourth set of prequery SQL statements.
- preprocessMacros4
- A conditional indicating whether or not the fourth query will have embedded Macros processed before being executed.
- placeholderParams4
- A conditional indicating whether or not the fourth query will have embedded Macros processed before being executed.
- databaseLinkId4
- The identifier which describes which database the fourth query will be executed against.
- dbQuery5
- The fifth database query.
- prequeryStatements5
- The fifth set of prequery SQL statements.
- preprocessMacros5
- A conditional indicating whether or not the fifth query will have embedded Macros processed before being executed.
- placeholderParams5
- A conditional indicating whether or not the fifth query will have embedded Macros processed before being executed.
- databaseLinkId5
- The identifier which describes which database the fifth query will be executed against.
- debugMode
- A conditional indicating whether or not the SQL Report can have debug information in the output.
- displayTitle
- A conditional variable for whether or not the title should be displayed.
- description
- The description of this wobject.
- styleTemplateId
- The assetId of the template for displaying the Asset.
- printableStyleTemplateId
- The assetId of the template for displaying the Asset for printing.
- assetId
- The unique identifier for this Asset, in base64 encoding.
- assetIdHex
- The unique identifier for this Asset, in hexadecimal format.
- title
- The title of the Asset
- menuTitle
- The title of the Asset used in Navigations.
- url
- The Asset's URL.
- isHidden
- A boolean that will be true if this Asset is set not be displayed in Navigations.
- newWindow
- A boolean that will be true if this Asset is set open in a new browser window.
- encryptPage
- A boolean that will be true if this Asset is set to be served over SSL.
- ownerUserId
- The ID of the user who owns this Asset.
- groupIdView
- The ID of the group that is allowed to view this Asset.
- groupIdEdit
- The ID of the group that is allowed to edit this Asset.
- synopsis
- A short description of the contents of the Asset.
- extraHeadTags
- Extra tags that will be added to the header of the page containing the Asset. These will be included by default so you do not need to add them youself, unless you want them to be in there twice.
- isPackage
- A boolean that will be true if this Asset is set to be a Package.
- isPrototype
- A boolean that will be true if this Asset is set to be a prototype.
- status
- With respect to version control, the status of this Asset. Typically these are the English strings "approved", "pending", "committed".
- assetSize
- How big this asset is in bytes. The sum of all database fields and attachments.
- keywords
- This will be a string with the keywords for this asset. Individual keywords will be joined with spaces, unless the keyword contains spaces, in which case it will be quoted.
- webgui.version
- The version of WebGUI on your site.
- webgui.status
- The release status for this version of WebGUI (stable, beta, gamma, etc.)
- session.user.username
- The current user's username.
- session.user.firstDayOfWeek
- From the current user's profile, the day they selected to be the first day of the week.
- session.config.extrasurl
- From the WebGUI config, the URL for the extras directory.
- session.var.adminOn
- This variable will be true if the user is in Admin mode.
- session.setting.companyName
- From the WebGUI settings, the company name.
- session.setting.anonymousRegistration
- From the WebGUI settings, whether or not anonymous registration has been enabled.
- session form variables
- Session Form Variables
Any form variables will be available in the template with this syntax:
<tmpl_var session.form.variable>
If there is more than 1 value in a form variable, only the last will be returned.
- session scratch variables
- Session Scratch Variables
Any scratch variables will be available in the template with this syntax:
<tmpl_var session.scratch.variable>
- controls
- These are the icons and URLs that allow editing, cutting, copying, deleting and reordering the Asset.
Admin Console