FRX Reporting Reference

Including

Forena Reports XML

Forena reports are defined using the Forena Report XML (frx) template format. Templates are XHTML documents which are extended by some custom HTML tags and attributes. The result should be something familiar to anyone that uses HTML.

These reports are stored as .frx files on the reporting server, and may be edited with any text editor directly, or via the WYSIWYG reporting user interface .

This guide documents the available FRX elements and attributes, and is best used in combination with the Data Renderers Guide .

Anatomy of an FRX File

Creating a new frx file

To create a brand new report, just create a new .frx file in your report directory with a minimal set of XHTML content, as further explained below.

Each .frx file should start with the mandatory lines at the very top of any .frx file. These lines specify XML version, DOCTYPE and XML entities. Checkout default.frx in the root of the Forena module directory for a good sample to start from. Note that sometimes you may have more then just those 4 lines, i.e. when using HTML entities such as ® or ©. In such case an extra ENTITY line is added to those lines, to match the entity name with its entity number. Browse the .frx source file of this tutorial for a sample containing such extra ENTITY lines.

These mandatory 4 lines should be followed by a html tag, and a corresponding /html, which should include the lines starting from the head tag and ending with the /body tag, as in this example:

<html id="frxsrc-16">
<head>
  <title>
  </title>
  <frx:category>
  </frx:category>
  <frx:options>
  </frx:options>
  <frx:parameters>
  </frx:parameters>
  <frx:docgen>
  </frx:docgen>
  <frx:fields>
  </frx:fields>
  <frx:menu/>
  <frx:cache/>
  <frx:data/>
  <style/>
</head>
<body>
</body>
</html>

Note: most of the tags shown above are optional, though it appears to be a good practice to have them available already in the .frx file whenever a reports requires some of them.

Example of an frx file

Here is an example of a report definition for a very simple report:

<html id="frxsrc-2">
<head>
  <title>A sample report</title>
  <frx:category>Sample</frx:category>
  <frx:options hidden="0" skin="skin_file_name"/>
</head>
<body>
<div frx:block="sampledb/states">
  <p frx:foreach="*">{code} - {name}</p>
</div>
</body>
</html>

Commonly used FRX elements and attributes

The above .frx example illustrates some of the most commonly used FRX elements and attributes (custom HTML tags), i.e.:

xmlns:frx element Defines the document as a Forena Report XML template document. It should appear at the top of every .frx file, and exactly as shown here.
frx:category attribute Set the category that you want the report to appear when listing reports.
frx:options attribute Sets some specific options that apply to the entire report, e.g. to display the report using a specific skin. Refer to General Report Options for additional information about this FRX attribute.
frx:block attribute Loads data from the defined data block (in this case sample/sampleXML). Data blocks are usually parameterized queries. If you are a developer, you might want to read more about defining data blocks in the Forena Data source.
frx:foreach attribute Causes the containing tag to be repeated for every row returned in the data block. The attribute value can be any valid XPATH expression, but is often simply '*', which creates a repeating pattern for every row or element returned by the query.
frx:parameters when used in conjunction with the frx:block attribute overrides the parameters provided to the block that is run. When used these values are merged with the values of the current data context prior to calling the data block. Refer to Report parameters for additional information about this FRX attribute.
frx:renderer uses a custom class to render this object. How the tag is rendered is defined by implementation of the renderer. Typical syntax looks something like frx:renderer="FrxSVGGraph" or frx:renderer="FrxXML". Other attributes are interpreted directly from the Data Renderers Guide . Refer to the Data Renderers Guide for additional information about this FRX attribute.

Advanced FRX attributes

Some more advanced FRX attributes:

frx:skip_root attribute Causes the current node of the report to not be rendered, but children will be rendered as normal. This is most commonly used when you want the frx:foreach to not render the node containing the frx:foreach attribute.
frx:skip_id attribute To ignore the id of this element, use frx:skip_id="true". For more details check out the issue about Ability to have no id in frx:foreach elements . Thanks jamesdixon for your contribution via that issue.

General Report Options

The general options of a report are used to set these specifications of a report:

  • Report title.
  • Visibility options.
  • Menu options.
  • Report caching options.

Here is an example illustrating various general report options, which are further explained below.

<html id="frxsrc-11">
<head>
  <title>A sample report</title>
  ...
  <frx:category>Example</frx:category>
  ...
  <frx:options hidden="0" skin="skin_file_name"/>
  ...
  <frx:menu enabled="1" path="reports/my1strpt" args=":myparm1/:myparm2" type="normal-item" title="My 1st Report" weight="5" plid="270" menu_name="navigation"/>
  ...
  <frx:cache duration="+1 hour" per_user="1" per_doctype="1"/>
  ...
</head>
<body>
...
</body>
</html>

Report title

The title element specifies the report's page title and tab title.

Visibility options

The frx:category element specifies under which group the report appears under the My Reports list. A report without a category will not show up in the list.

The frx:options element specifies various options of the report, as shown in the above example. The following properties may be defined:

hidden Indicate if the report is to be included or excluded in the My Reports list, using either of the following values:
  • 0 - Include the report in the list of reports.
  • 1 - Exclude the report in the list of reports regardless of the Category set for the report.

Note that the frx:options element is also used to specify some of the Report Layout options of a report, i.e.:

skin Specify an alternate skin for the report, whereas skin_file_name is the filename of the skin, without the .skinfo file extension of it.
form This attribute has been deprecated and has been superseded by the skin= attribute.

Menu options

The frx:menu element specifies the properties of a Drupal menu link to be created pointing to the report, as shown in the above example. The following properties may be defined:

enabled Indicate if the menu item is to be enabled or disabled, using either of the following values:
  • 1 - Enable the report's menu item.
  • 0 - Disable the report's menu item.
path The site relative path for the menu item.
args Additional parameters that should be extracted after the menu path using a :parm syntax, e.g. :parma/:parmb.
type Use standard conventions for creating a menu item in the format of normal menu items, tabbed menus, etc.
title The title of the menu item to be created.
weight The weight of the menu item to be created.
plid The plid of the menu item to be created.
menu_name The name of the menu in which the menu item is to be created.

Note: changes to menu properties only become in effect after clearing the Drupal cache.

Report caching options

The frx:cache element specifies the caching properties of each report, as shown in the above example. The following properties may be defined:

duration The duration that a cached report remains in the cache. Use relative formats according to the php documentation.
per_user 1 indicates that caches will be maintained for each drupal UID.
per_doctype 1 indicates that caches will be maintained for each document type. CSV files will be rendered differently than other files.

Document Types

The normal output of any report is an HTML document. It which can optionally be exported in several common document formats. The document types options are used to set the available formats in which a report can be saved.

Here is an example illustrating some of the document types options

<html id="frxsrc-7">
<head>
  ...
  <frx:docgen>
    <frx:doc type="web"/>
    <frx:doc type="csv"/>
    <frx:doc type="email"/>
    <frx:doc type="html"/>
    <frx:doc type="svg"/>
    <frx:doc type="doc"/>
    <frx:doc type="xls"/>
    <frx:doc type="xml"/>
  </frx:docgen>
  ...
</head>
<body>
...
</body>
</html>

The frx:docgen element specifies the document types options of the report, as shown in the above example. Add a frx:doc element for each format to be allowed for the report as follows:

web Web page (= the entire content of the webpage containing the report).
csv Comma Separated Values.
email eMail message.
html HyperText Markup Language (= the body part of the webpage containing the report).
pdf Adobe PDF document requires either use of third party libraries (mPDF or PrinceXML) or a subscription to DocRaptor document generation services.
svg Scalable Vector Graphics.
doc MS Word format.
xls MS Excel format.
xml eXtensible Markup Language.

Layout

The report layout options are used to set these specifications of a report:

  • Look and feel options.
  • Report specific CSS styles.
  • The layout of the report body.

Here is an example illustrating various general layout options, which are further explained below.

<html id="frxsrc-3">
<head>
  ...
  <frx:options hidden="0" skin="skin_file_name"/>
  ...
  <frx:fields/>
  <style>
    div.FrxTable {
      line-height: 2.5;
      color: #FF6633;
    }
  </style>
  <frx:menu/>
  <frx:cache/>
</head>
<body>
This is the very first line of the report body.
...
<div frx:block="sampledb/states" id="state-block" class="FrxTable">
  <table>
    <thead>
    <tr>
      <th>code</th>
      <th>name</th>
    </tr>
    </thead>
    <tbody>
    <tr frx:foreach="*" id="state">
      <td>{code}</td>
      <td>{name}</td>
    </tr>
    </tbody>
  </table>
</div>
...
And this is the very last line of the report body.
</body>
</html>

Look and feel options

The frx:options element specifies various options of the report, as shown in the above example. The following properties may be defined:

skin Specify an alternate skin for the report, whereas skin_file_name is the filename of the skin, without the .skinfo file extension of it.

Note that the frx:options element is also used to specify some of the General Report Options of a report, i.e.:

hidden Indicate if the report is to be included or excluded in the My Reports list, using either of the following values:
  • 0 - Include the report in the list of reports.
  • 1 - Exclude the report in the list of reports regardless of the Category.

Report specific CSS styles.

Use the style element within the head element to specify small CSS snippets that can be used anywhere in the report. Using a style content as in the above example will change the look-and-feel of the table content a little bit. In this specific case the height of the table rows will be higher then the height for standard table displays, while the color of the text in the table cells is shown in a kind of orange.

The layout of the report body.

The body element specifies the content of the HTML body. Using a body content as in the above example will create a report for which the actual body will start with a line like "This is the very first line of the report body ...", it will end with a line like "... And this is the very last line of the report body.".
The div tag in between those 2 lines is to include the actual data from the sampledb/states data block. In this case the data block is shown using a traditional table.

Parameters

URL query parameters can be passed directly into the SQL queries that drive the report. However, there are many circumstances where you may want to prompt users for specific data prior to generating a report. In such cases you can use a set of frx:parm elements contained in a frx:parameters element in the head section of the .frx file to define parameters, as in this example:

<head id="frxsrc-6">
  <title>My Report Title</title>
  <frx:parameters>
    <frx:parm id="state" label="State" require="1" desc="Select a state from the list." data_source="sampledb/states" data_field="" type="select">WA
    </frx:parm>
  </frx:parameters>
</head>

The id of each frx:parm element should match the parameters in the data block, and will further control how the user is prompted for each data element. The text contained in the frx:parm element defines the "default" value for the parameter. The following attributes are supported in the frx:parm element:

id The id of the parameter, which must match what is expected in the data block. This field is required.
label The parameter's label or prompt shown to the user.
desc The description provided for each label.
require Set to 1 to require this before form submission.
type Type of control to use for prompting the user. Supports the following values:
  • textfield normal text input box (default).
  • select - Normal select with a single value.
  • multiselect - Select box with multiple values possible. Only use this with sql parameters that can be used as arrays or "in" clauses.
  • selectajax - Select with an AJAX refresh on every selection change. This is good when you need to have one select statement's values dependent on another.
  • checkbox - Single checkbox returning a value of 0 or 1.
  • checkboxes - Multiple checkboxes that can be used to provide a list of options based on a data_source.
data_source The data block used to provide values for radio buttons, check-boxes or select lists. The value should be a data block that users of this report will have access to. Note: this is indeed assumed to be a data block, and not a data source.
data_field The name of the column from the data block in data source that is used for the select value. If omitted, then the 1st column of the data block is used as the data_field.
label_field The name of the column from the data block in data source that is used for the select label (description). If omitted, then the 2nd column of the data block is used as the label_field, provided such 2nd column exists (if not, then the 1st column is used instead).

Fields

In the head section of the .frx file, you will find a series of frx:field elements contained in a frx:fields element. These elements define special formatting rules for report fields referenced in the .frx file, as in this example:

<html id="frxsrc-12">
<head>
  <title>A sample report</title>
  ...
  <frx:fields>
    <frx:field id="state" link="" format="" format-string="" target=""/>
    <frx:field id="name" link="" format="" format-string="" target=""/>
    <frx:field id="total" link="reports/sample.user_distribution_simple?state={state}#test" format="" format-string="" target="">OH
    </frx:field>
  </frx:fields>
</head>
<body>
...
</body>
</html>

Each report field allows for configuring various properties of it, i.e.:

  • The formatting of the field's output.
  • The field's links to be created.
  • The field's default value to be displayed if no value is present.

Each report field for which a frx:field element is specified, is identified by the required id attribute. The following reference describes the attributes availalabe in the

Attribute Description
add-query Forces add of all report parameters to the generated link.
calc Xpath expression used to calculate this field.
class The class to use on the link generated by the link attribute
context Context used by the calc attribute
format Indicates the formatter to be used with this field
format-string Provides further instructions to the formatter specified in format
id Indicates the token/field replacement for which this field definition applies.
link Makes an link out of the field using the path specified.
rel Indicates the rel attribute used when creating the link.
target When used with link specifies the link target.

These attributes are described in greater detail below.

Field output formatting

The frx:field element supports field formatting. Fields can be formatted a number of different ways by specifying the format and format-string attribute for a field. The following table illustrates the supported options:

Format Description Format String
drupal_date_format Formats a Drupal date. Drupal dates are natively large numbers that are expressed as the number of seconds since the UNIX epoch date. Use small, medium or large to specify any of the site defined dates, or alternatively specify a custom date format. See http://php.net/manual/en/function.date.php for possibilities for custom formatting.
drupal_node_content Loads content from the given nid and display it using teaser or full display. Specify teaser to get teaser view.
drupal_translation Use Drupal's translation API to translate the value prior to display. Specify a field that contains the serialized data used for translations (e.g. watchdog table). Normally you can leave this blank.
xhtml Field contains XHTML Data. Use this to decode any htmlencoded data in the element and treat it as valid XHTML. If you see html as source in your report consider using this format. Specify an input filter to run the data through after the XHTML decoding to use any of drupals input filter "markup extending" capabilities.
iso_date ISO standard dates are of the form, YYYY-MM-DD followed by a 24 hour timestamp (e.g. 2012-12-01 20:30:30). Dates in this format may be reformatted. Use small, medium or large to specify any of the site defined date formats, or alternatively specify a custom date format. See http://php.net/manual/en/function.date.php for possibilities for custom formatting.
number Use the PHP number formatter function. Indicate a sample numeric format for decimal places and thousands separator. (eg. 9.999.00).
sprintf Use PHP's sprintf function for adding labels and such. See http://us.php.net/manual/en/function.sprintf.php for possibilities.
template The field being referenced is a foreana template. The data is assumed to be valid xhtml with normal forena fields that will be replaced based on the current data context. Indicates the machine name of an input format that is used to process the data after bing run through forena's templating system.

Field linking

The frx:field element supports following attributes related to field linking:

link Specify the URL that the field is to be linked to as in this example. You can refer to any tokens in the current content using the normal curly brace syntax:
<html id="frxsrc-8">
      <head>
        ...
        <frx:fields>
          <frx:field id="profile" link="profile/{some_field_name}" format="" format-string="" target=""/>
        </frx:fields>
      </head>
      <body>
      ...
      </body>
      </html>
This will create a link to this some_field_name 's profile.
rel Relationship attribute to apply to the link.
class Class to be applied to the link.
target The value of the target attribute in the link to be created, such as _blank to open the link in a new browser window or tab. Target values that begin with popup will be opened in a new window using JavaScript.

Field default value

The frx:field element supports following attributes related to the default value of the field:

default value The value to be displayed in the report output when no value exists.

Field calculations

The frx:field element supports redefining fields as complex calculations using xpath expressions. These expressions are evaluated for the current selected data using PHP's DOMXMPATH evaluate method. Specify the the calculation you want to perform in the calc attribute of the field element. You can also use the forena field tokens in these calculations to further enhance the kinds of calculations you can perform.

Additional information on xpath expression syntax may be found in the XPath Operators seciton of the w3schools XPath Tutorial.

Data Contexts

Any data from any other section of a report may be used by referencing those data by their id. For example: if you place an id attribute on the tag that you place an frx:foreach attribute on (e.g id='state' frx:foreach='*'), then you can reference any data element in that data context using that id as follows:

<div>... {state.name} ...</div>

Additional data contexts may be added to the document in the head section of the document. Data in the head section of the document is preloaded before the report renders. The example below illustrates the syntax for preloading data in the head section:

<head>
  ..
  <frx:data id="state" block="sampledb/state"/>
</head>

Additional data that is only needed for the rendering of the report may be included by leaving of the block attribute and specifying XML data as child elements of an frx:data element as in the following example.

<head>
  ..
  <frx:data id="scale">
    <scale min="0" max="50" red="255" green="0" blue="0" red_scale="0" green_scale="255" blue_scale="0"/>
    <scale min="50" max="100" red="255" green="255" blue="0" red_scale="-255" green_scale="-100" blue_scale="0"/>
    <scale min="100" max="101" red="0" green="100" blue="100" red_scale="0" green_scale="0" blue_scale="0"/>
  </frx:data>
</head>

In addition, data in the head section can be loaded into drupals settings objects for use later in javascript. as in the following:

<head>
  ...
  <frx:data block="sampledb/users_by_state" json="stateSummary"/>
</head>

The data in the above example would be accessible to the javascript by referencing the object property Drupal.settings.forenaData.stateSummary.

The Site Context (site)

This predefined context provides useful information about the context of your drupal site. The following values are always available:

PropertySampleDescription
site.argsSee XML BelowThe path as returned by drupals args function
site.dirRoot Relative reference to your site. Useful when referencing assets.
site.base_path (deprecated)/Same as above but the raw result for drupal_base_path() call.
site.base_urlhttp://forena.orgFull url reference to the base url of your site
site.destinationreports/help.reportingfrxReturn of drupal_get_destination
site.languageSee XML BelowFull language object which can be converted to XML an caclulations based on it
site.page/reports/help.reportingfrxRoot relative reference to the current drupal page
site.theme_dirsites/all/themes/my_corollaDirectory of current theme.
site.theme_path/sites/all/themes/my_corollaRoot relative reference to the current theme.
site.uid0The id of the current user
site.user_nameThe name of the current user.

You can use the following XML as a reference for deriving calculations from this object.

<root>
  <base_path key="base_path">/</base_path>
  <dir key="dir"/>
  <theme_path key="theme_path">/sites/all/themes/my_corolla</theme_path>
  <theme_dir key="theme_dir">sites/all/themes/my_corolla</theme_dir>
  <base_url key="base_url">http://forena.org</base_url>
  <user_name key="user_name"/>
  <uid key="uid">0</uid>
  <language type="object">
    <language key="language">en</language>
    <name key="name">English</name>
    <native key="native">English</native>
    <direction key="direction">0</direction>
    <enabled key="enabled">1</enabled>
    <plurals key="plurals">0</plurals>
    <formula key="formula"/>
    <domain key="domain"/>
    <prefix key="prefix"/>
    <weight key="weight">0</weight>
    <javascript key="javascript"/>
  </language>
  <args type="array">
    <element key="0">reports</element>
    <element key="1">help.reportingfrx</element>
  </args>
  <page key="page">/reports/help.reportingfrx</page>
  <destination key="destination">reports/help.reportingfrx</destination>
</root>

The Report Context (report)

The Report data context is always available to help provide information regarding the current report.

PropertySampleDescription
report.namehelp/reportingfrxMachine name of the current report.
report.dir/sites/all/modules/forena/repos/reports/helpDirectory of the current report.
report.linkreports/help.reportingfrxThe site relative path where you will find this report.
report.languageenThe language code of the current report.
report.formatwebThe document format that the report is being viewed.
report.time2017-04-13 07:16:45The time that this report was rendered.

The Skin Context (skin)

The Skin data context is always available to help provide information regarding the current skin for the report. In addition to the tokens below, arbitrary varialbes may be defined in the skin and used in the report for skin specific variables.

PropertySampleDescription
skin.nameDocumentation Tutorial SkinThe display name of the current skin.
skin.dir/sites/all/modules/forena/repos/reportsDirectory of the current skin. Useful for including skin assets.

The FrxReport Context (FrxReport)

A custom FrxReport context is provided to allow you to embed reports easily. For example, consider the Simple Table of States report, which is located the report repository in a subdirectory named sample, in report template states.frx. This report may be embedded in another report simply by including the string FrxReport.sample.states, enclosed by curly braces, anywhere in a report, as in this example:

<div>... {FrxReport.sample.states} ...</div>

It is important to understand that the data from the current context will be used as parameters to the report when this context is used.

The FrxReport Context (FrxReport)

A custom FrxReport context is provided to allow you to embed reports easily. For example, consider the Simple Table of States report, which is located the report repository in a subdirectory named sample, in report template states.frx. This report may be embedded in another report simply by including the string FrxReport.sample.states, enclosed by curly braces, anywhere in a report, as in this example:

<div>... {FrxReport.sample.states} ...</div>

It is important to understand that the data from the current context will be used as parameters to the report when this context is used.

Custom Contexts

Modules may provide their own custom data contexts either by adding them in a hook_forena_parameters_alter implementation or by implementing a custom context class of their own.

Conditional Element Rendering

By adding the frx:if="some_test" attribute to any HTML tag, that HTML tag is only rendered if some_test evaluates to true. The normal php rules apply to values specified here: frx:if="0" evaluates to false, while frx:if="1" evaluates to true.

Using token replacements in frx:if attributes

Normally you would use token replacements in the attribute to map this to some column in the database or value of a tag in case of data stores in XML format. As an illustration, consider this example:

<div id="frxsrc-1">
  ...
  <sometag frx:if="{my_column}">something surrounded by sometag</sometag>
  ...
</div>

This would cause the tag sometag and its children only to be rendered if the my_column field in the database returned true.

Using conditions in frx:if attributes

Here is a variation of the previous example:

<div id="frxsrc-13">
  ...
  <sometag frx:if="{type[text()='article']}">something related to article and surrounded by sometag</sometag>
  ...
</div>

In the above example the tag sometag and its children would only be rendered if the type field in the SQL query were article.

Using negations in frx:if attributes

You may use an exclamation point to indicate negation as in this example:

<div id="frxsrc-14">
  ...
  <sometag frx:if="!{my_column}">something surrounded by sometag</sometag>
  ...
</div>

This frx:if attribute would only evaluate to true if my_column was not present or zero.

Combining multiple conditions in frx:if attributes

Because of the way PHP string expressions work, listing multiple conditions in an frx:if attribute is interpreted as an OR. As an illustration, consider this example:

<div id="frxsrc-4">
  ...
  <sometag frx:if="{my_column}{your_column}">something surrounded by sometag</sometag>
  ...
</div>

This frx:if attribute would evaluate to true if either column my_column OR your_column contains data. If instead you need to use an AND operator, separate the conditions by &amp; as in this example:

<div id="frxsrc-5">
  ...
  <sometag frx:if="{my_column}&amp;{your_column}">something surrounded by sometag</sometag>
  ...
</div>

This frx:if attribute would evaluate to true only if both columns my_column AND your_column evaluated to true.

Token Replacement

Each field in the report is referenced by an XPATH expression enclosed by curly braces, as in this example:

<div>... {SomeXpathExpression} ...</div>

In its simplest form the XPATH expression can be thought of as the name of the field in the database, but when using more complex data sources, there is a lot that can be done using these XPATH expressions.

Loading Reports with Ajax

Ajax is the process of dynamically updating parts of a page's HTML based on data from the server. When a specified event takes place, a PHP callback is triggered, which performs server-side logic and may return updated markup or JavaScript commands to run. After the return, the browser runs the JavaScript or updates the markup on the fly, with no full page refresh necessary.

Here is an outline of the steps required to create a report that loads other reports via Ajax:

  • Modify the skin used by the report to include the required libraries. (e.g. system/drupal.ajax). Alternatively, you can add libraries for the purpose of just one report by creating an frx:skin in the HEAD section of your report that includes the libraries you need.
  • Alter the link in the report to use the drupal ajax callback. For example link="reports/myreport/nojs/id-to-replace/html" will assume that html at the element with an id of "id-to-replace" will be replaced using the jQuery html method. In addition to html, the keywords before, after, append, modal and replace are also supported.
  • Add the "use-ajax" class to any links that will be used to load the reports. The /nojs/ referenced in these links will be replaced with /ajax/ which will cause Forena to return the html and place it in the page.

Adding oher Ajax Commands on report load

When loading reports via Ajax, additional commands can be specified by using one or two frx:commands element in the head of the report. Each frx:commands element should contain an event attributes that indciates whether the commands should be run before or after the report is included in the dom. Each commands elemetn should contain frx:ajax elements to specify individual commands to be run. Specify options for each comand as attributes on the frx:ajax element.

The folliowing example demonstrates use the invoke command to invoke arbitrary jQuery methods to create a fade ou/in affect during the report load.

<head>
    <frx:commands event="pre">
      <frx:ajax command="invoke" selector="#ajax-wrapper" method="hide">
        [ 400 ]
      </frx:ajax>
    </frx:commands>
    <frx:commands event="post">
      <frx:ajax command="invoke" selector="#ajax-wrapper" method="fadeIn">
        [ 400 ]
      </frx:ajax>
    </frx:commands>
  </head>

Supported Commands

The following ajax commands are supported

command Description Attributes Elemetn Contents
add_css Add a css to the document. n/a Css text to add.
after Insert html after a selector. selector Html to insert
alert Show text in a javascript alert box. n/a Alert Text
append Append text to the children of the selected element selector Html to append
before Place html before selected element. n/a HTML to prepend
changed Add a change indicator to attribute selector, asterisk n/a
css Set CSS properties for selected objects selector JSON encoded arry of key value pairs to set.
data Call data method to add data to an element selector, name, value Alert Text
html Replace html contents of a slected element selector HTML to replace
invoke Invoke arbitrary jquery method selector, method JSON encoded array of arguments to paass to method.
prepend Prepend html content to the children of selected element selector Content to prepend.
replace Replace selected content. selector content to replace.
restripe Restripe the slected table rows selector n/a
settings Alter drupal settings variable. n/a JSON encoded data to set.

See Drupal API Documentation for additional information on these commands.

Report Specific Skin Overrides

To ovverride settings that are in the skin for a spcicific report, include an frx:skin element in the head section of your report. The contents of the frx:skin element should be the same as specified in the skin, but expressed as a JSON object.

<head>
    <frx:skin>{ "libraries" : [ "system/drupal.ajax"] }</frx:skin>
  </head>