Content Server WebReports Standard 10.0 User Guide
Content Server WebReports Standard 10.0 User Guide
User Guide
Rev.: 2010-Dec-23
Open Text Corporation
275 Frank Tompa Drive, Waterloo, Ontario, Canada, N2L 0A1
Tel: +1-519-888-7111
Toll Free Canada/USA: 1-800-499-6544 International: +800-4996-5440
Fax: +1-519-888-0677
E-mail: [email protected] or [email protected]
FTP: ftp://ftp.opentext.com
For more information, visit http://www.resonatekt.com or http://www.opentext.com
Contents
1 Purpose ................................................................................................................................... 5
2 Introduction ............................................................................................................................ 6
2.1 Why Use WebReports?....................................................................................................... 6
2.2 How Do WebReports Work? ............................................................................................... 7
3 Getting Started Using WebReports ...................................................................................... 8
3.1 Overview ............................................................................................................................. 8
3.2 Creating a WebReport ........................................................................................................ 8
3.3 Editing a Reportview – Online ............................................................................................. 9
3.4 Adding a New Reportview ................................................................................................. 10
3.5 Data Source Configuration ................................................................................................ 10
3.6 Changing the associated Data Source for a WebReport .................................................. 14
3.7 Property Tabs .................................................................................................................... 15
3.8 WebReports “Run As” Feature .......................................................................................... 15
4 Running WebReports .......................................................................................................... 17
4.1 Overview ........................................................................................................................... 17
4.2 Passing Parameters .......................................................................................................... 17
4.3 Form Submission Mechanism ........................................................................................... 17
5 Reportview File .................................................................................................................... 19
5.1 Overview ........................................................................................................................... 19
5.2 Structure of the Reportview .............................................................................................. 19
5.3 Example Reportview ......................................................................................................... 20
5.4 Default Reportviews .......................................................................................................... 22
6 Reportview Tags .................................................................................................................. 25
6.1 Overview ........................................................................................................................... 25
6.2 Tag Definitions................................................................................................................... 26
6.2.1 Content Control Tags ........................................................................................... 26
6.2.2 Column Data Tags................................................................................................ 39
6.2.3 Sub-Tags .............................................................................................................. 48
7 Exporting Report Data ....................................................................................................... 114
7.1 Overview ......................................................................................................................... 114
7.2 Exporting to Desktop ....................................................................................................... 114
7.3 Exporting to Livelink – New Document ........................................................................... 114
7.4 Exporting to Livelink – New Document Version .............................................................. 115
7.5 Exporting to E-Mail .......................................................................................................... 116
7.6 Exporting to a WebForm ................................................................................................. 117
7.7 Exporting to a Workflow .................................................................................................. 118
7.8 Exporting to the Livelink Server ...................................................................................... 119
7.9 Exporting to a FTP Server............................................................................................... 119
7.10 Configuring Default WebReport Behavior ................................................................ 119
8 PDF Conversion ................................................................................................................. 121
8.1 Overview ......................................................................................................................... 121
8.2 How to Convert a Document ........................................................................................... 121
8.3 XML Job Tickets .............................................................................................................. 122
8.3.1 Creating an XML Job Ticket ............................................................................... 122
8.3.2 The $DEFAULT_PATH ....................................................................................... 123
Page i
WebReports User Guide
Page ii
WebReports User Guide
Page iii
WebReports User Guide
Page iv
WebReports User Guide
1 Purpose
This document is a user guide for the Open Text WebReports Standard module. Its purpose
is to provide descriptions of the features provided by WebReports and to enable users to
create useful WebReports as quickly as possible. The intended audience is business users
and developers who wish to create or use WebReports.
WebReports also includes full reference documentation within the Livelink ECM – Enterprise
Server on-line help system. Further help may be found on the Open Text Knowledge Center
including a WebReports discussion group:
https://knowledge.opentext.com/knowledge/llisapi.dll?func=ll&objId=3684835&objAction=view
Installation and administration are covered in a separate document. This user guide assumes
that installation has already been completed.
Page 5
WebReports User Guide
2 Introduction
WebReports also provide some useful features related to the execution and storage of report
data. For example, WebReports provides:
• The option to export the report output within Livelink to a Livelink Node, a Livelink
Version, a Livelink WebForm or a Livelink Workflow.
• The option to export the report output externally to E-mail, the users’ desktop and if you
are the Livelink Admin user, to the actual Livelink Server.
• The ability to set varying default behaviors for execution.
• The option to schedule reports for delayed delivery of data via email or Livelink storage.
• The option to run reports in the background without holding up the user's browser.
Page 6
WebReports User Guide
The following diagram illustrates the relationships between WebReports, LiveReports and the
Livelink database. WebReports reflects and complements the WebForms and WebForm
Templates paradigm. Users familiar with the concept of a custom view for a WebForm will be
at ease with WebReports, which uses the same approach.
1
LiveReports allow direct access to the Livelink database, so access to creating LiveReports
is nearly always restricted to Administrators. A WebReport does not allow direct database
access (instead it uses existing LiveReports, search queries or other data sources).
Therefore WebReports may be safely used by business users and developers who are not
Administrators.
Page 7
WebReports User Guide
3.1 Overview
The WebReports module provides a new Livelink node type called WebReport, which can be
added to a Livelink workspace from the Add New Item drop down menu. When creating a
new WebReport, the user is prompted to
A WebReport has all the standard properties of other Livelink nodes, such as a document
node, but it also includes functions appropriate to reporting (for example, Edit Reportview).
Modify the Name field to an appropriate title for the new WebReport. As per all Livelink items,
an optional Description can be added. This information does not appear anywhere in the
WebReport output. The Data Source is an optional field which allows a report source to be
selected. To populate this field, click the Browse Livelink button, navigate to an appropriate
data source and then click its select link. Valid options are:
Page 8
WebReports User Guide
• Folder, Compound Document, Task List, Task Group, Channel, Discussion – all show the
children when selected.
• External Application, typically via HTTP.
(Note that if no data source is selected, the row section of the Reportview is ignored.)
If the Go To Source Tab option is selected, after clicking the Add button the Source tab is
displayed so that other non-Livelink data sources can be selected, or more specific data
source settings can be modified.
The Reportview File is a mandatory field. Selecting a reportview from the Use a Default
Reportview drop-down list allows a simple pre-written reportview to be used. This default
reportview can be edited using the Edit Reportview function option once the WebReport has
been created. If a default reportview has not been selected, the Browse... button can be used
to select a pre-written reportview from the user's desktop. Once a file has been selected, the
file details are automatically inserted into the corresponding form field.
The Categories field is optionally used to associate any pre-defined attributes with the newly
created WebReport. The Create In field optionally allows the user to select an alternative
Livelink location to store the new WebReport.
The Edit Reportview option in the WebReport function menu opens the reportview editor.
The editor presents the reportview file in three sections: the header, row template, and footer
2
(see the screen shot below) . Section 5.2 of this document explains the purpose of these
sections in more detail.
After making the desired changes to the reportview, clicking Add Version (or Add Version &
Continue) generates a new version of the reportview using the newly edited text. The new
reportview will be used the next time the WebReport is run.
2
Please note the STARTROW and ENDROW tags are not visible. They do NOT need to be
added as the editor will insert them when editing is complete.
Page 9
WebReports User Guide
To configure the data source for a WebReport, choose Properties and Source from the
function menu.
Livelink Query This is used for any of the Livelink objects which provide data from
either SQL or search index queries. The most common examples of this
Page 10
WebReports User Guide
Livelink File This allows files within Livelink that have HTML tables or delimited data
to be used as data sources. It provides some configuration parameters
to allow correct interpretation of the data file. These are:
• File Type - This parameter allows the user to select which file
type is being used as a data source. Currently the two choices
are: Separated Values (CSV, tab delimited etc.) and HTML
Table.
Page 11
WebReports User Guide
Livelink Category This allows Livelink Categories to be used as data sources. One or
more Livelink Categories may be selected. The number of Livelink
Categories that may be selected is limited by the Livelink Administrator.
When a Livelink Category has been selected, the page will refresh and
all of the Category's Attributes will be displayed on the page. Use the
checkboxes to select one or more Attributes to be included in the
report results.
Each record in the report data will include the item DataId, SubType and
a value for each selected Category/Attribute. Multi-valued attributes will
be concatenated using a value delimiter, as defined by the Livelink
Administrator.
Select the Filter Permissions checkbox if you would like the report
results to be limited based on user permissions to SEE each node item.
Select the View SQL button to view the SQL Query that will be
performed to retrieve the Category/Attribute data.
Page 12
WebReports User Guide
External File This allows files outside of Livelink (typically in a folder that is visible to
the Livelink server) to be used as data sources. These files must
contain tabular or delimited data as per the Livelink File data source
type and the same configuration options are provided.
FTP This allows files to be accessed via an ftp server. The configuration
options are the same as for the Livelink File data source type with
additional parameters to determine details of the the ftp server.
• FTP File Path - The path to data source file relative to the FTP
Root Folder. E.g. /data.txt.
• FTP Port - The server port configured for FTP access (standard
configuration is port 21).
Important Notes:
The ftp server should provide access to a file in the correct format.
Depending on the source operating system and type of file being
transferred, the Row Separator value may vary from "r\n" and "\n" for
proper display of results.
External Application This allows files to be accessed via an external server (usually a Web
Server). The configuration options are the same as for the Livelink File
data source type with additional parameters to determine details of the
external server. The external server should either provide access to a
file in the correct format, or to an appropriate server side script to invoke
software necessary to return a file in the correct format. The supported
parameters are:
Page 13
WebReports User Guide
• Server Path - The fully formed file path (can include URL
parameters) to access the application
Search Query Launch This is used to define WebReports that can be invoked from the
standard Livelink search launch screen. This is the screen that users
normally see when they select Advanced Search in Livelink.
WebReports using Search Query Launch will be available and listed for
any users that have the appropriate permissions. No additional
parameters are required.
Request Datasource This datasource can not be selected from the Source tab. It is
implementented by providing data in predetermined parameters when a
WebReport is invoked.
Page 14
WebReports User Guide
Specific
The specific tab for a WebReport is similar in functionality to the specific tab for a document.
The document properties such as Current Version, Max Versions and MIME Type are used to
manage version control for the Reportview associated with the WebReport. Besides these
options there is always one additional option called Run/Export Audits Enabled. This option is
unchecked by default and allows each WebReport to have additional audit events enabled so
that every RUN or EXPORT event will generate an entry in the AUDIT log.
In some cases there may also be an additional option called Oscript Scripting Enabled. This
option will only appear when the Reportview includes tags related to the Server Side Scripting
feature. It is used to enable or disable the execution of any scripts which may be defined and
executed with the Reportview.
Constants
The Constants tab allows the creation and management of values that can be used in the
Reportview (or other designated fields).
Destination
The Destination tab allows the developer to specify where a report is delivered to. This could
be email, workflow initiation, or several other destinations.
Parameters
The Parameters tab allows the developer to define parameter behavior for the WebReport.
This is used to control things like the prompt order, the default value and whether a parameter
is mandatory or not.
Source
The source tab allows the developer to specify different types of data sources and the format
which the source data will appear in.
This feature enables a WebReport developer to specify which user the WebReport should run
as. Everytime the report is run, it will be executed using the specified user's permissions and
UserID.
As an example, any files that the Run As user doesn't have permissions to "See" will not show
up in the output, regardless of who executes the WebReport. Each WebReport can have its
own "Run As" setting, which can be set on the Specific tab of any WebReport (Function Menu
> Properties > Specific). For security reasons, this feature can only be enabled by a user with
Admin privileges.
Page 15
WebReports User Guide
On the Specific tab of the WebReport, click the user icon ( ) next to the "Run As" field:
In the User selection window, choose the user that will be used to run this report. Click the
Update button to save your changes.
The next time this report is run, it will be run as if the user in the Run As field executed it. All
permissions and any tags within the WebReport will be run like it was executed by the Run As
user. This includes tags like [LL_REPTAG_USERID /] - no matter who runs the report, this tag
will always resolve to the USERID of the Run As user for that WebReport.
Page 16
WebReports User Guide
4 Running WebReports
4.1 Overview
By default, running a WebReport causes the combined output of the processed reportview
and any data source to be delivered to the user's browser. WebReports can also be
'delivered' to other destinations using a variety of Export options. There are three co
commonly
used ways to run a WebReport:
• Selecting the WebReport link from Livelink. Where a WebReport is visible in a Livelink
container, the name link can be clicked to run the current version of the WebReport. This
approach can also be used for versions that have been listed using the Properties->
Properties
Versions option from the function menu of a WebReport object. This differs from normal
documents where this action would cause a view or open option to be executed. Note:
the behavior of the WebReport link can be altered by chchanging
anging the defaults through the
Destination tab.
Properties->Destination
• Selecting the Open option from the function menu . This performs the same action as
clicking the name link.
• Invoking the appropriate WebReport URL. This option can be used to create complex
relationships between different objects in Livelink. For example, a Livelink customview
c
can invoke a WebReport to collect data for display; a Livelink WebForm
WebForm could invoke a
WebReport to build form information such as pick lists etc.; a WebReport can invoke
another WebReport to create relational database type applications. This option can also
be used to invoke a WebReport from a Livelink URL object. The reasoneason for using this
approach is that it is possible to create unique URLs which include parameters that can
be used in the reportview. Any parameters passed in the URL can be referenced within
the reportview using special tags (e.g. [LL_REPTAG_&parmname /]). ). Thus multiple
URLs can be created to allow a single WebReport to behave in different ways. It is also
possible to include input parameters to be passed directly to the underlying data sources
(see below).
Initiate WebReport requires only two configuration options which are set on the specific tab of
the form.
In each case the SEQ from the form just submitted is available as a parameter
[LL_REPTAG_&SEQ /]. This can be used in the WebReport as a key to lookup additional data
associated with the form just submitted or it can be passed as a parameter to a separate
(sub) WebReport which has it's destination set to "Populate Form". This allows basic
relational tables to be maintained through a series of WebReports as the act of using a
WebReport to export data to a form will cause a further WebReport to initiate if the
submission mechanism is set appropriately.
The Initiate WebReport form submission mechanism is not visible until the "Manage
Relational Table" option has been used to configure an associated SQL table.
Form tags of the type [LL_FormTag_1_1_3_1 /] are support only when "Show WebReport" is
not selected. If needing to display data just submitted with "Show WebReport" checked then
the tag [LL_REPTAG_&SEQ /] must be used as a parameter to a sub WebReport/LiveReport
to retrieve the submitted data.
Page 18
WebReports User Guide
5 Reportview File
5.1 Overview
The reportview is a template for formatting the data source. It may be any language or syntax
that is supported by the end user's application (e.g. HTML, JavaScript, SpreadsheetML, etc.)
to build the structure and appearance of the output document. In order to be useful it must
also contain WebReport Tags which are similar to the format used by Livelink WebForms.
• A reportview is a file, often in HTML format, containing special tags which define how and
where data from Livelink should be inserted.
• Any text editor can be used to create the reportview.
• The standard Livelink header (including the dashboard and menus) is added to the
reportview by default but can be disabled using the
[LL_WEBREPORT_EXCLUDEHEADER /] tag.
• The standard Livelink footer is added to the reportview by default but can be disabled
using the [LL_WEBREPORT_EXCLUDEFOOTER /] tag.
• Header Section - This section is used to provide any code that should be executed at the
beginning of the WebReport. It is only output once regardless of how many report rows
are being read from the underlying data source. For example if producing an HTML
document any opening tags like <TABLE> should be in this section; however, it is not
necessary to include <HTML> or <BODY> if the standard Livelink header is being
included. The Livelink header is included by default unless the
[LL_WEBREPORT_EXCLUDEHEADER /] tag is used.
• [LL_WEBREPORT_STARTROW /] – In the online editor this line cannot be edited. It is
only provided to show where the start row tag will be inserted so that users do not try to
add another one.
• Row Section - This section is used to define any code that should be applied to all data
rows. Any tags that are used to refer to data source column data will only work in this
section. It is important to note that anything in this section will be repeated for every row
of the data source. For example, if there are 10 rows of report data to be returned,
everything in this section will appear 10 times in the output of the WebReport. The only
exception to this is if conditional tags are used to exclude some data from the output.
(See the Tag Guide in chapter 6 for more information).
• [LL_WEBREPORT_ENDROW /] – In the online editor this line cannot be edited. It is only
provided to show where the end row tag will be inserted so that users do not try to add
another one.
• Footer Section - This section is used to provide any code that should be executed at the
end of the WebReport. It is only output once regardless of how many report rows are
being read from the underlying data source. Any closing HTML tags like </TABLE> would
normally be in this section.
Page 19
WebReports User Guide
Reportview Structure
[LL_WEBREPORT_STARTROW /]
[LL_WEBREPORT_ENDROW /]
FOOTER SECTION Footer section is output
once at the end of the
Report.
Page 20
WebReports User Guide
Example reportview:
<HTML>
<HEAD>
<TITLE>Sample Report</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<CENTER><H1>Sample Report</H1></CENTER>
<P><SMALL>Created by [LL_REPTAG_USERFULLNAME /], Username: [LL_REPTAG_USERNAME /]</SMALL></P>
<HR>
<TABLE BGCOLOR="#FFFFFF" BORDER="3" CELLPADDING="1" CELLSPACING="1" WIDTH="100%">
<TR BGCOLOR="#CCCCCC">
<TD ALIGN="CENTER" NOWRAP VALIGN="MIDDLE">ID</TD>
<TD ALIGN="CENTER" NOWRAP VALIGN="MIDDLE">Issue Title</TD>
<TD ALIGN="CENTER" NOWRAP VALIGN="MIDDLE">Issue Type</TD>
<TD ALIGN="CENTER" NOWRAP VALIGN="MIDDLE">Customer Name</TD>
<TD ALIGN="CENTER" NOWRAP VALIGN="MIDDLE" WIDTH="30%">Activity Record</TD>
<TD ALIGN="CENTER" NOWRAP VALIGN="MIDDLE">Form Link</TD>
</TR>
[LL_WEBREPORT_STARTROW /]
<TR>
<TD ALIGN="LEFT" NOWRAP VALIGN="MIDDLE">
[LL_REPTAG_1 /]
</TD>
[LL_WEBREPORT_ENDROW /]
</TABLE>
<HR>
</BODY>
</HTML>
Page 21
WebReports User Guide
Pre-packaged Reportviews
Page 22
WebReports User Guide
sequence.
As above but utilizing Oscript in the
csv_scripted defaultreportviews reportview to handle any number of
columns.
This reportview provides a
replacement to the WebForms List
Data functionality. The reportview
form_report defaultreportviews
also provides appropriately
permissioned links for the editing
and deletion of form data
This is an advanced reportview that
contains server side scripting (this
will need to be enabled by your
administrator). The reportview
form_scripted defaultreportviews
provides the user with dynamic
columns and filters meaning that it
can be applied to a form data
source with any number of fields.
A no frills HTML reportview giving
results in a tabulated format that
plainhtml_report defaultreportviews can be readily interpreted by
WebReports if the output were to
be used as a data source.
This reportview is a basic example
of SpreadsheetML with little
formatting. It places report data into
a simple table. The resulting file is
a complete and portable document
spreadsheetml_report defaultreportviews
that by default opens in MS Excel.
Note for Excel to open by default
the destination mime type must be
set to text/xml or
application/vnd.ms-excel.
Allows WebReports to view Livelink
data in a preformatted Word
document using WordML. This
format is only supported by newer
wordml_report defaultreportviews
versions of Microsoft Office. Note
that the destination mime type must
be set to application/msword or
text/xml for Word to open.
A very simple XML report that
might be used in an Ajax type
situation to pull back additional data
xml_report defaultreportviews to an application. It is important to
remember to set the destination
mime type to text/xml in this
situation.
Similar to the browse views in the
defaultreportviews folder but
contains optional drag and drop
functionality by providing a tab at
browse_97_drag&drop_report defaultreportviews
the top of the report; this is meant
to be used with one of the
draganddrop_view_webdav
reportviews.
This creates a page similar to the
drag and drop page provided by
draganddrop_view_webdav100_CS10 defaultreportviews
WebDAV, for use on Livelink
instances running WebDAV 10.0. It
Page 23
WebReports User Guide
Note that only reportviews contained in the defaultreportviews folder are available for
selection when a user creates a new WebReport. The reportviews in this folder can be
changed by the administrator. As an example, you could move one or all of the reportviews in
the examplereportviews folder into the defaultreportviews folder then all would be available on
the Add New WebReport screen.
The location field in the table above refers to a folder on the Livelink server. This is accessed
via <install path>module\webreports_5_x_x\ though this will only be available to the Livelink
administrator.
Page 24
WebReports User Guide
6 Reportview Tags
6.1 Overview
This section describes the different types of tags that can be used in WebReports:
1. Content Control Tags
These tags are always prefixed with: [LL_WEBREPORT_. They are used to control the way
in which the output content is built. For example, it is possible to enable or disable the
standard Livelink header and footer. The most important content control tags are used to
define which part of the reportview is applied to each row of data source Data.
2. Data Tags
Data tags are always prefixed with: [LL_REPTAG. They can further be broken down into
Column Data Tags and Static Data Tags:
a. Column Data Tags
For every column in the associated data source, column data tags exist to reference
which pieces of report data are to be included in the output. These tags allow either
the column number (e.g. [LL_REPTAG_2 /]) or the column name (e.g.
[LL_REPTAG=DATAID /]) to be used.
b. Static Data Tags
Static tags are used to insert information from Livelink that is not associated with
report rows. For example, the date and time, the name of the user running the
WebReport, or various URLs that might help with building hyperlinks in the report
output. (E.g. [LL_REPTAG_NEXTURL /]).
3. Sub-tags
Sub-tags are used to provide formatting or additional functions with any of the
[LL_REPTAG... tags. These sub-tags, separated by spaces, allow actions to be taken on the
actual data pulled from the data source. Further information about sub-tags can be found in
section 6.2.3.
All tags are case sensitive (always use uppercase) and space sensitive (ensure there is a
space before the “/]” at the end of the tag); however, column names can be mixed case. The
table in section 6.2 lists all of the tags currently available in WebReports and describes their
use.
Page 25
WebReports User Guide
Support: header
Page 26
WebReports User Guide
Support: header
Support: header
Page 27
WebReports User Guide
Expression Examples:
[LL_WEBREPORT_EXITIF "[LL_REPTAG_&var1 /]" != "[LL_REPTAG=DATAID /]" /]
[LL_WEBREPORT_EXITIF "[LL_REPTAG_ROWNUM /]" == "101" /]
[LL_WEBREPORT_EXITIF "[LL_REPTAG=dataid /]" NOTCHILDOF "[LL_REPTAG_&rootid /]" OR
"[LL_REPTAG=parentid /]" NOTCHILDOF "[LL_REPTAG_&rootid /]" /]
Page 28
WebReports User Guide
Page 29
WebReports User Guide
(See Additional notes for the EXITIF tag or chapter 14 for more detail)
• This tag affects the number of rows that are actually returned and displayed. For this reason, this
tag has an impact on the ROWNUM tag which should not be used as part of the conditional logic
for INCLUDEIF.
• This tag does not change the TOTALROWS tag which will always reflect the number of rows that
were actually available from the database table. To access the number of rows which are
actually returned (i.e. that pass the conditional test), the ACTUALROWS tag should be used.
See the specific syntax information for these tags.
Expression Examples:
[LL_WEBREPORT_INCLUDEIF "[LL_REPTAG_&var1 /]" != "[LL_REPTAG=DATAID /]" /]
[LL_WEBREPORT_INCLUDEIF "Admin" == "[LL_REPTAG_USERNAME /]" /]
[LL_WEBREPORT_INCLUDEIF "1234" NOTIN "[LL_REPTAG_1 /]" /]
[LL_WEBREPORT_INCLUDEIF "*DELETED*" IN "[LL_REPTAG=keyfield /]" /]
[LL_WEBREPORT_INCLUDEIF "[LL_REPTAG_1 LENGTH /]" >= "10" AND "[LL_REPTAG=dataid /]"
CHILDOF "[LL_REPTAG_&rootid /]" /]
Page 30
WebReports User Guide
Notes:
• The matching for Distinct Keys is Case Insensitive
• Where there are rows with duplicate keys, the first row in the current order is kept and all
subsequent rows are discarded
• The order of rows used for duplicate comparison is based on the original data source order and
any WebReport SORT tags that are included in the row section
• The filtering of rows using this tag occurs before other row filter tags such as INCLUDEIF,
EXITIF and INCLUDERANGE
DataID Fruitname
12345 Apple
12346 Orange
12347 Apple
12348 Banana
12349 Orange
12350 APPLE
[LL_WEBREPORT_INCLUDEDISTINCT "FruitName" /]
This would result in only rows that had a unique value in the "FruitName" column:
DataID Fruitname
12345 Apple
12346 Orange
12348 Banana
The same result would occur if the column number 1 was used, e.g.:
[LL_WEBREPORT_INCLUDEDISTINCT "1" /] This tag also supports the use of WebReports tag/sub-
tag combinations. For example, using the original data example and this tag:
The following rows would remain after the filter was executed:
DataID Fruitname
12345 Apple
12346 Orange
In this example, the WebReports sub-tag DECODE converts any data that matches the string "Banana"
to "apple". As the data value "Apple" already exists in a previous row, the row that normally has the value
"Banana" in this column is no longer unique. This feature is most useful when sub-tags such as
NODEINFO and or CAT are used to translate dataid fields into other related data values that might not
be unique.
Page 31
WebReports User Guide
Notes:
At least one of the optional parameters: STARTROW:, ENDROW: or MAXROWS: must be specified.
These are treated as follows:
• If only STARTROW is specified (no MAXROWS or ENDROW parameters are included) then
ENDROW is assumed to be the last row of the data set
• If no STARTROW is specified then the first row in the data set is assumed as the starting point
• If MAXROWS and ENDROW are both specified then the more restrictive of these two
parameters is used. E.g. if STARTROW=1, ENDROW=10 and MAXROWS=5 only 5 rows would
be returned rather than 10
• If the STARTROW is less than 1 then 1 is assumed
• If the STARTROW is greater than the total number of rows in the data set then no rows will be
returned
• If the ENDROW is less than the STARTROW then no rows will be returned
The range of rows being returned is calculated after any other row filters (e.g. INCLUDEIF, EXITIF) have
been evaluated. For example, given the following source data set:
Source
Data
Row#
1 Apple
2 Orange
3 Pear
4 Banana
5 Strawberry
6 Mango
This would result in only even row numbers being returned. E.g.:
Source
Data
Row#
2 Orange
4 Banana
6 Mango
If an INCLUDERANGE filter was also used, then this set of rows is whittled down further. E.g. :
This would result in only 2 rows being returned, starting with row 2 from the data set returned after any
INCLUDEIF or EXITIF tags have been processed. Using the previous table examples, this set would be:
Source
Data
Row#
4 Banana
6 Mango
Page 32
WebReports User Guide
@BROWSECOLUMNS, @ALLDATASOURCE,
@ALLSTATIC, @ROWCOLUMNS, @FIELDS,
@ADDJSVAR, @ESCAPETEXT, @EXCLUSIVE
[LL_WEBREPORT_JSLIBS <list of libraries> /] This tag supports one or more quoted library
selectors (e.g. "COREMENU") that determine which
Support: header JavaScript libraries to insert into the output. The
libraries currently available are:
Page 33
WebReports User Guide
Library Description
(global.js,globalmenu.js,globalmenus.js,newsticker.js,functionmenu.js,menu.js)
BASE
Basic libraries used for standard Livelink menus and functions.
(checkall.js)
BASICBROWSE
Functionality related to multi object selection
(browsecoretable.js)
BROWSE
New functions (as of Livelink 9.7.1) used for browseview
(browsecorermenu.js)
COREMENU
New menu functionality (as of Livelink 9.7.1)
(otutilities.js)
COREUTIL
Miscellaneous utilities
(otajaxsupport.js)
COREAJAX
Ajax utilities
(minipaginationcontrol.js)
PAGINATE
Controls/functions used to display pagination options (as of Livelink 9.7.1)
(search.js,searchbar.js)
SEARCHBROKER
Search result utilities
The libraries currently available for Content Server 10 and greater are: (COREMENU and PAGINATE are
obsolete. Use BROWSE and COREAJAX instead.)
(webdav/global.js, menu.js)
BASE Basic libraries used for standard Content Server menus and
functions.
(checkall.js)
BASICBROWSE
Functionality related to multi object selection
(webnode/browsecoretable_en_US.js, webnode/browse.js)
BROWSE
Functions used for browseview
(core/ot_utilities.js)
COREUTIL
Miscellaneous utilities
(core/ajax_dhtml_util.js)
COREAJAX
Ajax utilties
(websbroker/search.js, websbroker/sortwidget.js)
SEARCHBROKER
Search result utilities
Page 34
WebReports User Guide
[LL_WEBREPORT_SORT "<Sort Key>": Used to sort the report data set according to a
[ASC/DESC] specified column. This tag must be used in the row
template section (between the STARTROW and
<Additional Sort Keys> [Global Direction] ENDROW tags). The column to be sorted can be
[“USECASE”] /] specified by either Column name or number. Either
the number of the data column (as returned from
<Sort Keys>: Each key is made up of either a left to right) or the name of the data column can be
column name/number reference, or a WebReports used to specify a column to sort by. Alternatively if a
tag and sub-tag combination enclosed in (single or report tag is used, the report will be sorted
double) quotes and optionally followed by a colon according to the result of the specified tag and sub-
and a direction parm as shown in the syntax tags. For example:
example.
[LL_WEBREPORT_SORT "DATAID" /]
<Global Direction>: Can be one of DESC/ASC
and defaults to ASC. The directions specified for [LL_WEBREPORT_SORT "DATAID"
each individual sort key override the global "[LL_REPTAG=DATAID NODEINFO:NAME /]" /]
direction.
[LL_WEBREPORT_SORT "PARENTID":DESC
<Directives>: Can be one or more "directives" in "[LL_REPTAG=DATAID NODEINFO:NAME
the format @PREDEFKEY , @PARMNAMES /]":ASC /]
along with any associated information. Used to
predefine sortkeys that can be associated with [LL_WEBREPORT_SORT "PARENTID"
simple URL values. E.g. &sortcol=col1 could be "[LL_REPTAG=DATAID NODEINFO:NAME /]" /]
used to trigger a sort key such as
[LL_REPTAG=DATAID CAT:cat1:attr1:display /]
The first example above would sort according to the
Support: row order of numeric data ids. The second example
would sort according to the node name even
though they are both using the same report column.
The third example would sort first on the parentid
column in descending order then on the name in
ascending order. The final example is the same as
the third with the parentid column sorted in the
default direction (ascending) Note, this tag also
supports a series of "directives" which allow
sortkeys to be pre-defined and associated with
simple URL parameters. Please refer to: (Advanced
Notes on Sorting) for more detail
Page 35
WebReports User Guide
Page 36
WebReports User Guide
Examples:
[LL_WEBREPORT_SUBWEBREPORT
NODEID:68873 PARM:InputLabel1:299
PARM:myStatus:"awaiting review" /]
[LL_WEBREPORT_SUBWEBREPORT
NODEID:[LL_REPTAG_$mySubReport /] /]
• The LL_WEBREPORT_SUBWEBREPORT
tag can be placed anywhere in the reportview,
but its use within the row section should be
treated with caution if either the parent or sub-
WebReport could return a large result set due
to the potential performance impact.
Page 37
WebReports User Guide
[/* ... */] Used to denote a block comment which can span
multiple lines. Using this tag rather than HTML or
Support: header, row, footer JavaScript comment tags will prevent the comment
being rendered in the output which is sent to the
user’s web browser. For large reports this has
considerable benefits in terms of restricting the
amount of data being sent to each browser.
Converting all comments to use WebReports
comment tags can provide performance benefits for
large reports.
Page 38
WebReports User Guide
[LL_REPTAG=name /]
[LL_REPTAG="name" /]
[LL_REPTAG="first name" /]
Page 39
WebReports User Guide
...?func=ll&objId=47478&objAction=RunReport&myparm=testdat
a&nexturl=....
The parameter, myparm, can be accessed by using:
[LL_REPTAG_&myparm /]. This tag will resolve to the value in
the URL (testdata in this example) where it can be used as output
or as part of a conditional statement e.g.
[LL_REPTAG_$MyConst /]
[LL_REPTAG_%MyVar /]
Page 40
WebReports User Guide
This tag type provides data functions. The result of each function
[LL_REPTAG_@<function> is inserted into the output; however, these tags are currently only
<reference options> /] supported in the header or footer of a reportview (i.e. before the
[LL_WEBREPORT_STARTROW /] or after the
Support: header, footer
[LL_WEBREPORT_ENDROW /] tag).
Page 41
WebReports User Guide
When one of the functions below is specified, the function will be executed against which ever data has
been referenced. For any math tags, if non-numeric values are found in the column then an error is
returned. Note that there are sub-tags (e.g. ROUND) which will help to format the values returned by these
functions.
Examples:
If the average of column 2 is required (rounded to two decimal places) the following syntax could be used:
[LL_REPTAG_@AVERAGE_2 ROUND:2 /]
If the sum of a column called "hours" is required, the following syntax could be used:
[LL_REPTAG_@SUM_hours /]
If the contents of a column called dataid from the last row of data is required, the following syntax could be
used:
[LL_REPTAG_@DATA[last]_dataid /]
Page 42
WebReports User Guide
This tag returns the correct name of a column from the associated
[LL_REPTAG_COLNAMEn /] data source, based on the number which is supplied after
[LL_REPTAG_COLNAME++ /] COLNAME. For example, [LL_REPTAG_COLNAME1 /] would
return the word: DATAID in a WebReport that is dumping the
Support: header, row, footer
Livelink DTREE using an Auto LiveReport.
Inserts the total number of hits from a search data source. This tag
[LL_REPTAG_INDEXTOTALHITS /] is useful when working with search data sources as it can provide
the user with an indication of the total result size without having to
Support: header, row, footer display them all. This tag can be used in combination with the
&maxrows URL parameter to limit the results to a low number and
get a value for the number of search hits very quickly with the
minimum of performance impact.
Page 43
WebReports User Guide
Returns a URL for the currently running WebReport but any URL
[LL_REPTAG_MYCACHEURL /] parameters that would ordinarily be included in the URL, are
cached and the cache ID is added to the URL instead. The cache
Support: header, row, footer ID is added to the URL in the format: &reqcacheid=nnnnnnnn. If
this URL is used to execute a request to Livelink, all of the cached
parms are added on to the request prior to any WebReports
processing.
Page 44
WebReports User Guide
Trigger Description
Page 45
WebReports User Guide
Page 46
WebReports User Guide
Page 47
WebReports User Guide
6.2.3 Sub-Tags
Any of the data tags (tags that start with [LL_REPTAG ) can contain a list of formatting sub-
tags separated by spaces which allow actions to be taken on the actual data returned by the
tag before it is inserted into the output.
Multiple sub-tags can be used for any tag and they are processed from left to right so that the
result of each tag becomes the input for the next tag in the list.
Some sub-tags use additional parameters. For example, in the following tag a sub-tag called
REPLACE is used which requires 2 parameters (one for the string to be replaced, and one for
the string to replace it with.)
[LL_REPTAG_1 REPLACE:dummy:genius /]
Any sub-tag parameters are added using the colon (:) symbol. Some parameters may need
to use quotes if they include spaces (or colons). For example, if the string to be replaced was
'test value', the syntax would be:
The following table lists these sub-tags and describes their behavior.
Sub-Tag Description
If the data item pulled from the data source is an ASSOC (a Livelink
ASSOC:<key> key-value data type) the value of the field specified by <key> is
returned (and only that value). This sub-tag can be used repetitively
Support: header, row, footer
or in combination with sub-tags like RECORD and LIST where those
data types are nested. In the following example a LiveReport is
returning columns from the WFFORMS table:
[LL_REPTAG=data ASSOC:data ASSOC:dataassoc ASSOC:ID /]
This tag returns a column called data which contains an ASSOC.
The ASSOC:data returns the value associated with the key data.
This value is also an ASSOC and ASSOC:dataassoc returns a
further ASSOC. From this ASSOC:ID extracts a single ID value
which is returned to the report.
Adds the value of the tag (after formatting by any previous sub-tags)
ADDVAR:<variable name> with the current contents of a variable which can later be referenced
using the specified variable name. This tag only works when
Support: header, row, footer
numeric values are returned by a tag. The first time this sub-tag is
used, it behaves as if the variable already existed with the value of
zero (0).
E.g. [LL_REPTAG=cost ADDVAR:subtotal /]
In this example if the values 26, 34, and 14 were returned as values
from the tag "cost" then, the variable tag: [LL_REPTAG_%subtotal /]
would return: 74. See also SETVAR, CONCATVAR and Using
WebReports variables.
Page 48
WebReports User Guide
Syntax Description
CAT:JSARRAY This is a unique option for the CAT sub-tag which results in
a JavaScript object representation of all the category and
attribute data (including full support for sets and multi-
values) for a specific node.
See the TOJSON sub-tag for how to convert this into a data
structure that can be interpreted by JavaScript in the client.
See related tags LLURL:FUNCTIONMENU:RAW and
LLURL:ADDITEM:ITEMMENU:RAW.
Page 49
WebReports User Guide
CAT:<catname>:<attname>:DISPLAY Will return the value in the attribute, <attname>, for the
category, <catname>. If <attname> is an attribute set or a
multi-value attribute a comma separated list of values will be
returned.
Page 50
WebReports User Guide
CAT:<catname>:SET:<setname>:<attna Will return the value in the attribute, <attname>, for the
me>:DISPLAY category, <catname>, if <attname> is an attribute within
<setname>. If <attname> is a multi-value attribute, a
comma separated list of the defined values will be returned.
If no defined value exists, either in a multi-value attribute, or
a standard attribute, an empty list will be returned.
CAT:<catname>:SET:<setname>:<attna Will return the ID of the attribute <attname> within the set
me>:ID <setname>. If <attname> exists outside <setname> it will
not be returned. <attname> can be either a regular or multi-
value attribute.
Page 51
WebReports User Guide
Page 52
WebReports User Guide
Page 53
WebReports User Guide
CATACTION Options
CATACTION:ADDVALUE:<cat
Appends a value to the end
egory>:<attribute>[:Index][:Se
of multi-valued attribute.
t Index]:<value>
This tag ignores the [:Index]
parameter.
For example, consider a "Test Category" schema. Use the following syntax to set the "Trial Name" attribute on
the Enterprise Workspace to "first": Page 54
[LL_REPTAG_"2000" CATACTION:SETVALUE:"Test Category":"TrialName":"first" /]
WebReports User Guide
CONCATVAR:<variable name> Concatenates the value of the tag (after formatting by any
or previous sub-tags) with the current contents of a variable which
CONCATVAR:<varname>:<joinstr> can be referenced using the specified variable name.
or
CONCATVAR:<varname>:<joinstr>:NO The second (optional) parameter can be used to specify a
BLANKS character or string of characters which are used before each new
or value added to the variable. If the special string @EMAIL is used
CONCATVAR:<varname>:<joinstr>:UN as the "join string" the standard email separator as defined for the
IQUE Livelink system will be automatically inserted.
Support: header, row, footer The third optional parameter can only be used if the join string has
been supplied. When used the syntax is always: NOBLANKS.
When NOBLANKS is used, no join strings will be added for empty
data cells. Alternatively (instead of NOBLANKS) the parameter
UNIQUE can be used to ensure that only unique values are
added to the concatenated variable. The first time this sub-tag is
used, it behaves as if the variable already existed with an empty
string. E.g.
[LL_REPTAG=NAME CONCATVAR:names:";" /]
When this sub-tag is used, the associated tag output will not be
displayed unless the SHOW sub-tag is also used.
Page 55
WebReports User Guide
DATE In the simplest form (with no parameters) this tag converts Date
or formatted data to a user defined format. If a parameter is
DATE:“<format list>” specified, the data can be formatted using any of the modifiers
below.
Support: header, row, footer
For example: [LL_REPTAG=createdate DATE:"%a - %b %d,
%Y" /] would provide a date similar to: Mon - Jan 31, 2004.
Page 56
WebReports User Guide
Modifier Description
%% A percentage sign
%p AM or PM
%P AD or BC
Page 57
WebReports User Guide
DECODE:"0":"Completed":"1":"Pending
Review":"2":"Open":"Unknown"
DECSTR:<encodingtype> Decodes the specified string using the selected decoding method.
Currently BASE64 is the only type supported.
Support: header, row, footer
DEF:<value> If the value returned by the main tag is undefined the value specified
here will be used.
Support: header, row, footer
DMEMBERSHIP Returns a comma separated list of Livelink Groups which the user is
a direct member of.
Support: header, row, footer
Page 58
WebReports User Guide
EMAILINFO:<property> Expects a valid dataID for an email message and returns email data
for that node (similar to the view in an Email Folder). The email
Support: header, row, footer needs to have been uploaded via the Livelink Explorer/Outlook
plugin in order to make use of this tag.
Format Description
Support: header, row, footer • If a comma exists in the text then the group of characters is
enclosed in double quotes
• If an end of line character exists in the text then the group of
characters is enclosed in double quotes
• If a double quote character exists in the text then it is
converted to two double quotes and the whole group of
characters is enclosed in double quotes
E.g.
If [LL_REPTAG_1 /] normally returns one "two", three, then
[LL_REPTAG_1 ESCAPECSV /] would return: "one ""two"",
three"
If the optional parameter: ALLCELLS is specified then all cells will
be quoted regardless of the contents of the data cell
Page 59
WebReports User Guide
[LL_REPTAG_1 ESCAPEHTML /]
ESCAPESTR Converts characters such as line feeds, carriage returns and quotes
to the standard C language syntax e.g. \r for carriage returns. This
Support: header, row, footer sub-tag is essential for any script variable assignments as carriage
returns and other characters like quotes will cause an error.
For example: Rows[x] = "[LL_REPTAG_1 ESCAPESTR /]";
[LL_REPTAG_1 ESCAPEURL /]
would return:
"https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww%2Ebogus%2Ecom%2Fsomefile"
ESCAPEWR Prevents any WebReport’s tag syntax that may be included in the
data from being interpreted as valid tax syntax.
Support: header, row, footer
EVEN Returns true if the data returned by the main tag is an even number.
Returns false otherwise. This can be used with a ROWNUM tag to
Support: header, row, footer create code that can alternate from row to row (e.g. row color). E.g.
Page 60
WebReports User Guide
This sub-tag is useful for correctly formatting long text fields in HTML
that would otherwise be missing carriage returns.
IMEMBERSHIP Returns a comma separated list of Livelink Groups which the user is
a direct or indirect member of.
Support: header, row, footer
INC
Increments a numeric value by 1 or a specified increment number.
number
or
By default this sub-tag
tag returns the current tag value plus one and
INC:<increment number>
errors if the tag does not contain a valid integer. If the optional
increment number has been specified, then the current tag plus the
Support: header, row, footer
decrement number is returned.
LENGTH Returns the length of the data returned in the main tag. For
example, if the data resolved by the main tag was 10 characters
Support: header, row, footer long, using this sub tag would cause the characters 10 to be returned
instead. This sub-tag
tag can be useful for determining data validity
(greater than a minimum number of characters) and HTML SIZE
parameters.
For a Livelink LIST data type, the item at the specified index can be
LIST:<index> retrieved (index starts at 1). For example,
Support: header, row, footer [LL_REPTAG_1 LIST:3 /]
Would return the third item in a list.
Adds the specified padding character to the left of the existing data
LPAD:<pad char><width> to make the result the specified final width. For example, given a
data tag returning the number 123
Support: header, row, footer
[LL_REPTAG_1 LPAD:0:6 /]
returns 000123
Modifier Description
WebReports User Guide
See the TOJSON sub-tag for how to convert this into a data
structure that can be interpreted by JavaScript in the client.
See related tags CAT:RAW and
LLURL:FUNCTIONMENU:RAW.
LLURL:FEATURED Returns the HTML for the featured items pane. The main tag
should be the DATAID of a folder.
LLURL:FORMADD Creates the URL to add a form. This LLURL variation can
only be used when the associated tag is a valid Form dataid.
This does not work with workflow related forms.
LLURL:FORMDELETE Creates the URL to delete a form record from the associated
SQL table. This LLURL variation can only be used when the
data source includes rows of data from a valid form SQL
table. It can only be used with a row template data tag or the
[LL_REPTAG_@DATA[x]_y /] tag. This does not work with
workflow related forms.
LLURL:FORMEDIT Creates the URL to edit a form record from the associated
SQL table. This LLURL variation can only be used when the
data source includes rows of data from a SQL table that has
been created by a form template. It can only be used with a
row template data tag or an LL_REPTAG_@DATA... tag.
When used with workflow forms, this LLURL variation
creates the appropriate URL to edit a form in a workflow and
supports an additional parameter to specify a form ID. E.g.
[LL_REPTAG=VOLUMEID LLURL:FORMEDIT:1 /]. If a form
ID is not provided, an ID of 1 is used by default.
LLURL:FUNCTIONMENU Inserts a fully operational function menu for the current node.
Page 62
WebReports User Guide
LLURL:GIF Inserts the complete HTML for the default node image.
Supports an optional PATH parameter which returns the path
of the image rather than the complete HTML source.
LLURL:MODIFIED Inserts the HTML for a new or modified image if the node
has been modified or added in the last x days.
LLURL:PROMOTED Returns a set of links for available actions specific to the type
of object specified by a node id. These links are similar to
those found on Livelink browse pages.
Page 63
WebReports User Guide
LLURL:SUBTYPEFILTER Returns all of the necessary code to display the subtype filter
list as seen in the standard Content Server 9.7.1 browse
view. This is currently only supported on Content Server
9.7.1 and above. Given the dataid of a folder, this feature will
actually provide the subtypes that are unique within that
folder. In addition, a comma separated list of subtypes ( E.g.
{0,144,30303,...} ) can be specified in the main tag to
indicate the subtypes that should appear in the filter list. The
code generated by this sub-tag will only work if the Content
Server browsecorermenu.js file has been included. This
can be done using [LL_WEBREPORT_JSLIBS COREMENU /]
to include the correct library. For Content Server 10 and
greater please use the 'BROWSE' library selector instead, as
the 'COREMENU' library selector is obsolete.
LLURL:UPALEVEL Inserts the HTML for a fully functional 'browse for parent'
image & link.
LLURL:WFFUNCTIONMENU Inserts a workflow function menu. Requires that the main tag
returns a subworkid.
MULTIPLY:<value> Multiplies an integer returned in the main tag by the value specified.
Other subtags can be used in conjunction with this tag, like ROUND
Support: header, row, footer to provide greater precision. For example:
Page 64
WebReports User Guide
Return the same column from the next row of data. If this sub-tag is
NEXT used on the last row of data, a blank string is returned.
Support: row
This sub-tag offers powerful capabilities to create, move, copy and
NODEACTION:<operation> delete content within Livelink and, as such, its effects should be
carefully understood before usage. The sub-tag behaves like the
other WebReports sub-tags in that, whilst you cannot access the
content of nodes that you do not have permissions to do so with
other sub-tags, NODEACTION will not allow the user running the
report to perform an action (e.g. a move) that they would not be
able to perform via the regular interface.
NODEACTION Formatting
Page 65
WebReports User Guide
The copy parameters above can be used in any combination and in any order.
See NODEACTION:MOVE below for an example of combining multiple
parameters.
Page 66
WebReports User Guide
See also
NODEACTION:PURGEVERSIONS
Page 67
WebReports User Guide
The move parameters above can be used in any combination and in any
order. E.g. [LL_REPTAG=DATAID
NODEACTION:MOVE:1234:INHERITATTRS:MERGED:INEHRITPERMS:NE
WNAME:"my node" /] to combine the source and destination categories,
inherit permissions from the destination and rename the moved node to my
node.
Page 68
WebReports User Guide
Page 69
WebReports User Guide
NODEINFO Formatting
Format Description
The ID of the user who has been assigned to this
ASSIGNEDTO
object (usually a task).
Returns a numeric value representing the object's
CATALOG catalog value (0 = listed, 1 = featured, and 2 =
hidden).
Page 70
WebReports User Guide
RESERVEDBY The ID for the user who has reserved the node.
ODD Returns true if the data returned by the main tag is an odd number.
Page 71
WebReports User Guide
Returns false otherwise. This can also be used as per the example for
Support: header, row, footer the EVEN tag.
ODDEVEN Returns either ODD or EVEN depending on the data returned by the main
tag. If the main tag data is not a valid integer then this sub-tag returns an
Support: header, row, footer empty string. This sub-tag can be used with a tag like ROWNUM to set an
appropriate style for each row. The ODDEVEN sub-tag also allows two
additional parameters to be specified - if provided these two parameters
will be returned alternately instead of ODD/EVEN. The example below
shows how to use the standard Livelink styles, BrowseRow1 and
BrowseRow2 to allow each row to have an alternating color. The class
statement for each row would alternate between BrowseRow1 and
BrowseRow2.
The following would be included in the <HEAD> of the reportview file:
<STYLE TYPE="text/css">
.BrowseRow1 {background-color: white; color: black; font-size: x-small; font-family: Arial, Helvetica, sans-serif;}
.BrowseRow2 {background-color: #ccff99; color: black; font-size: x-small; font-family: Arial, Helvetica, sans-
serif;}
</STYLE>
Each row includes the following TR statement:
<TR class=BrowseRow1>
or:
<TR class=BrowseRow2>
ONERROR:<parm> Used to specify alternative text to be used for any sub-tag error. Some sub-tags
will return an error message if the data and or one of the sub-tag's expected
Support: header, row, footer parameters does not have the correct type or value as required to perform the
sub-tag function. This sub-tag allows the default error message for a particular
tag to be displayed in several ways or defined by the developer. This sub-tag
should usually appear after whichever sub-tag might generate an error
condition. It is possible to have more than one ONERROR sub-tag in order to
handle errors differently for different sub-tags. In the event that only one
ONERROR sub-tag has been provided, the position in the sub-tag list is not
important and the ONERROR sub-tag will apply to any errors for any sub-tags
in the list. The following options for using this sub-tag include:
Format Description
This option will replace any standard error
message with a blank string, useful for
ONERROR:BLANK
preventing error messages from being
displayed.
This option will display a short version of the
ONERROR:SHORT error message consisting of the sub-tag in
question and an error number.
Page 72
WebReports User Guide
Example
In this example the message "Invalid list" would be returned for this tag if the
LIST sub-tag had returned an error. If the LIST sub-tag does not cause an error
but the INC sub-tag does, then the standard error message would be returned.
PATCHANGE:<find Returns a modified version of the main tag based on the find and replace
pattern>:<new pattern> patterns specified.
or
PATCHANGE:<find The find pattern is specified with a series of special operators as per the table
patt>:<new patt>: below. This is a simplified and slightly modified subset of UNIX's regular
<ignoreCase?> expression pattern matching. For Livelink developers this syntax is based on
the Oscript PATFIND and PATCHANGE bulletins. This is almost identical to the
Support: header, row, footer PATFIND syntax but includes the ability to specify parts of the find pattern which
can be referenced for substitution in the replace pattern. If no match if found,
the original tag contents is returned unchanged.
The replace pattern can also include some special characters which are also
shown below. The replace pattern is normally a fixed pattern of characters but
any characters to be retained from the find pattern are enclosed in the <...>
characters and then inserted in the replace pattern using the # symbol. By
default this sub-tag ignores the case of characters when matching. Specifying
FALSE as a third parameter causes the change operation to be case sensitive.
For more detailed information about PATFIND or PATCHANGE the Livelink SDK
documentation should be consulted.
Page 73
WebReports User Guide
PATCHANGE Examples:
This example of the PATCHANGE sub-tag assumes that the associated tag
contains the string:
In this example:
• Any characters which are matched (but not enclosed in < >) will not be
included in the replacement
• <t?+t> finds a match with the word "test". Because it is the first "tagged
substring", this word is substituted in place of #1 in the replace string.
• <[0-9]+> finds a match with the numbers "123". Because it is the
second "tagged substring", these characters are substituted in place of
#2 in the replace string.
• The part of the find pattern: sen[!0-9]+ finds the characters "sen"
followed by 1 or more characters which are NOT numbers.
Page 74
WebReports User Guide
PATFIND Examples:
This example of the PATFIND sub-tag assumes that the associated tag
contains the string:
PERMACTION:<operation This sub-tag provides the flexibility to add, remove and modify permissions of
> content within Livelink. Because of the powerful nature of this sub-tag, it's
effects should be carefully understood before usage. The sub-tag behaves like
Support: header, row, footer the other WebReports sub-tags in that you cannot modify the permissions of
nodes that you do not have permissions to do so via the regular interface. The
key difference is that using WebReports allows these changes to be automated
so they can be done much faster than through the interface.
Page 75
WebReports User Guide
PERMACTION Options
This sub-tag expects the data id of the content in Livelink the user wants to perform permission actions upon,
to be specified in the main tag. There are two ways to specify permissions for any action that requires
<perms>; either a decimal number representing a binary bit mask for Livelink permissions, which some
Page 76
WebReports User Guide
developers may be familiar with (and unfortunately is too much to display here), or instead the user can
specify a list of permissions using any combination of the following keywords:
SEE See
MODIFY Modify
The permissions specified in this sub-tag follow the permissions model of the Livelink interface, meaning that
selecting just one permission will also set the other required permissions, eg. choosing "MODIFY" will set the
"See", "See Contents" and "Modify" permisisons for an object.
To specify permissions for WPM objects (Eg. discussions, channels, task lists, etc), the following table displays
the keywords that can be substituted for <perms> in any of the applicable PERMACTION operations:
Keyword
NONE
READ
WRITE
ADMINISTER
To specify permissions for PPM objects (Eg. Projects), the following table displays the 3 types of roles that can
be substituted for <role> in the applicable PERMACTION operations:
Page 77
WebReports User Guide
Keyword
COORD
MEMBER
GUEST
Where COORD indicates a Coordinator. For the scenario where PUBLIC permissions can be updated for PPM
objects (PERMACTION:PUBLIC:UPDATE:<perms>), the acceptable values for <perms> in this case is
ENABLED or DISABLED.
Examples
If a user creating a WebReport wants to add a user with a user ID of 1234 to the ACL of an object (in this case
DATAID), with the permissions of See and See Contents, they could use either:
or
PERMCHECK:<parm> Takes the object id returned by the data tag and checks if the current user
or (or the specified user) has permission to perform the specified action for
PERMCHECK:<parm>:<userid> that object. Either TRUE or FALSE is returned depending on the result of
this verification.
<parm> = SEECONTENTS, EDIT
or DELETE
Page 78
WebReports User Guide
• When this tag is used, the value that would normally be returned by the main tag is replaced by either
TRUE or FALSE. E.g. if [LL_REPTAG=DATAID /] normally returns “123456”, [LL_REPTAG=DATAID
PERMCHECK:SEE /] would return either “TRUE” or “FALSE”
• This tag is only valid when used with a tag that normally returns a valid Livelink object id. For example,
IDs, DATAIDs and VOLUMEIDs. An invalid report tag will cause this sub-tag to return false.
• The specified actions (see, edit, delete) map to Livelink permissions as shown in the chart below. To use
this chart, find the highest level of Livelink permission that the user is expected to have to return true from
this tag. Then use the setting listed under PERMCHECK Action.
NONE
SEE
EDIT
EDIT STATIONERY MODIFY
DATA
USE SQL TABLE
EDIT
EDIT SUBMISSION
ATTRIBUTES
MECHANISM
DELETE
EDIT
VERSIONS
ADMINISTER
DELETE DELETE
FORM
DELETE RESERVE
EDIT
DELETE
PERMISSIONS
Page 79
WebReports User Guide
To make sure that a delete button is only visible for users who have “Administer Form” permission to an
associated form, the following WebReport declaration could be used (this assumes that form Dataid is being
returned in the underlying report data :
This could also be done using JavaScript code as below; however, this code will still be visible if a user “views
source” from their browser.
If ( “[LL_REPTAG=DATAID PERMCHECK:DELETE /]” == “TRUE” ) {
document.write(‘<INPUT TYPE=BUTTON NAME=”delbutton” VALUE=”Delete” ONCLICK=”deleteItem();”>’);
};
POCOPY:<parm>
Provides access to Physical Objects data associated with the main
Support:header, row, footer copy of the physical item. This information can usually be found
of the Circulation tab of Physical Items.
Description in
Modifier
Livelink interface
POCOPY:UNIQUEID Unique ID
POCOPY:BORROWEDBY Unique ID
POCOPY:OBTAINEDBY Borrowed By
POCOPY:COMMENT Comment
POCOPY:BOXID Box ID
Page 80
WebReports User Guide
POINFO:<parm>
Provides access to Physical Objects data found on Physical Items.
Support: header, row, footer
If the Physical Objects module is not installed this sub-tag returns
nothing for all options.
Description in
Modifier
Livelink interface
POINFO:KEYWORDS Keywords
POINFO:TO To Date
POINFO:FACILITY Facility
POINFO:AREA Area
POINFO:LOCATOR Locator
POINFO:TXID Transfer ID
POINFO:CLIENT Client
POINFO:TEMPID Temporary ID
PREV Return the same column from the previous row of data. If this sub-
tag is used on the first row of data, a blank string is returned.
Support: row
Page 81
WebReports User Guide
RANGE<start index> For any list - formatted as: {'item1','item2'} - , returns a range from
or the original list based on a specified start index and an optional
RANGE<start index>:<end index> end index. This sub-tag is identical to the SLICE sub-tag but only
works with LISTs. All indices count starting at 1 (one) so the slice
Support: header, row, footer will include all characters starting from and including the <start
index> and concluding with and including the <end index> (if one
is specified). If end index is omitted or exceeds the total length of
the string, then the remainder of the string is used. A LIST follows
the Livelink LIST convention where the first character is a {, the
last character is a } and each element is separated by a comma.
This output of this sub-tag is a list in the same format. A LIST can
be de-referenced using the LIST sub-tag.
RANGE Examples:
{'Apple','Pear','Orange','Mango'}
Page 82
WebReports User Guide
RMACTION:STATUS:<
Status
new value>
RMACTION:STATUSD
Status Date
ATE:<new value>
RMACTION:RECEIVE
Received Date
DDATE:<new value>
RMACTION:ESSENTI
Essential
AL:<new value>
RMACTION:OFFICIAL:
Official
<new value>
RMACTION:STORAG
EMEDIUM:<new Storage Medium
value>
RMACTION:ACCESSI
Accession
ON:<new value>
RMACTION:SUBJECT:
Subject
<new value>
RMACTION:AUTHOR:
Author or Originator
<new value>
RMACTION:ADDRESS
Addressee(s)
EE:<new value>
RMACTION:OTHERA
DDRESSEE:<new Other Addressee(s)
value>
RMACTION:ORIGINAT
Originating Organization
IONORG:<new value>
RMACTION:UPDATEC
Update Cycle Period
YCLE:<new value>
RMACTION:NEXTREV
IEWDATE:<new Next Review Date
value>
RMACTION:LASTREVI
Last Review Date
EWDATE:<new value>
Page 83
WebReports User Guide
Page 84
WebReports User Guide
RMCLASS Options
STATUS Status
ESSENTIAL Essential
RSI RSI
SUBJECT Subject
KEYWORDS Keywords
SELECTABLE Selectable
Page 85
WebReports User Guide
Page 86
WebReports User Guide
RMINFO Options
STATUS Status
ESSENTIAL Essential
OFFICIAL Official
ACCESSION Accession
SUBJECT Subject
ADDRESSEE Addressee(s)
Page 87
WebReports User Guide
Page 88
WebReports User Guide
RMTYPE Options
RSI RSI
Page 89
WebReports User Guide
RSI:RSI RSI
RSI:TITLE Title
RSI:DESCRIPTION Description
RSI:SUBJECT Subject
RSI:STATUS Status
RSI:DISCONTINUE Discontinue
RSI:DISCONTINUE
Discontinue Date
DATE
RSI:DISCONTINUE
Discontinue Comment
COMMENT
The URL required to access a specific
RSI:URL RSI.
E.g:...?func=RecMan.EditRSI&item=XX...
Page 90
WebReports User Guide
This sub-tag stores the value of the data tag in a form field (after
SETFORM:<field name> formatting by any previous sub-tags). It is used in conjunction
or with the Export to Form feature. Export to Form must be set as
SETFORM:<field name>:NEXTROW the export destination in order for SETFORM to have any effect.
or (update mode only) The field name identifies a column in the destination form to
SETFORM:NEXTSEQ receive the data in the data tag. There needs to be a SETFORM
or (update mode only) sub-tag for each column of data that is to be set in the form.
SETFORM:NEXTKEY:<column name> Each SETFORM sub-tag inserts data into the same record in the
destination form until one of the following occurs, causing
Support: header, row, footer
subsequent SETFORM sub-tags to write to the next record in
destination form:
Page 91
WebReports User Guide
Page 92
WebReports User Guide
Example:
[LL_WEBREPORT_IF "[LL_REPTAG=DATAID
NODEINFO:SIZE:BYTES ADDVAR:TOT CURRENTVAL /]" <
"500000" /]
[LL_REPTAG=DATAID SETEMAILATTACH /]
[LL_WEBREPORT_ENDIF /]
Here the DATAID column is being returned from the data source.
NODEINFO:SIZE:BYTES takes the dataid and returns the size of
the latest version of the node in bytes. ADDVAR takes the size in
bytes for each row and adds the new value to the user defined
variable TOT. CURRENTVAL is then used to get the running total
of the calculation (i.e. contents of TOT variable). A WebReport IF
checks if the total size of all the nodes so far is less than 500,000
bytes (~0.5MB). If the total size is less than 0.5MB the document
will be attached to the email.
This sub-tag stores the value of the tag (after formatting by any
SETVAR:<variablename> previous sub-tags) in a variable which can be referenced using
the specified name. E.g.
Support: header, row, footer
[LL_REPTAG=DATAID SETVAR:ID /]
This example would store the current dataid in a variable called
"ID". This variable could be referenced elsewhere using a tag
such as: [LL_REPTAG_%id /]
When this sub-tag is used, the associated tag output will not be
displayed unless the SHOW sub-tag is also used.
See also ADDVAR, CONCATVAR and chapter 0.
SETWFATTACH
Page 93
WebReports User Guide
SETWFATTACH Formatting
Action Description
SETWFATTACH:COPY:CURRENT When the node is copied only the latest version will be in
the new node. If this option is applied to a folder only the
latest version of all sub items will be copied.
SETWFATTACH:COPY:NEWNAME: When the node is copied it will receive the specified name.
<name>
SETWFATTACH:MOVE:NEWNAME: When the node is moved it will receive the specified name.
<name>
This sub-tag stores the value of the tag (after formatting by any
SETWFATTR:<fieldname> previous sub-tags) in a Workflow attribute. The sub-tag is used in
conjunction with the export to Workflow feature which must be
Support: header, row, footer
set as the export destination in order for this sub-tag to function.
Example usage, [LL_REPTAG_&POSTCODE
SETWFATTR:ADDRESS3 /]. In this case we are taking a
parameter called POSTCODE and storing it in a Workflow
attribute called ADDRESS3 which exists in the Workflow we are
initiating.
If the Attribute being populated is a multi-value, the optional MV
operator can be used. Example, [LL_REPTAG_&ORIGIN
SETWFATTR:MV:COUNTRY /]. In this case, the value of the
parameter ORIGIN is inserted in the first element of the multi-
value workflow attribute called COUNTRY. If we wanted to
populate subsequent elements in the same multi-value Attribute
we could use the ++ operator, Example [LL_REPTAG_&ORIGIN
SETWFATTR:MV++:COUNTRY /] would populate the second
element.
This sub-tag stores the value of the tag (after formatting by any
SETWFFORM:<formname>:<fieldname previous sub-tags) in a Livelink WebForm that is attached to a
> Workflow. The sub-tag is used in conjunction with the export to
Workflow feature which must be set as the export destination in
Support: header, row, footer
order for this sub-tag to function.
Behavior is slightly more complex than SETWFATTR as the
WebReport can write to any number of forms that are associated
with a Workflow. In addition to this, there is support for setting
form values that are within sets. To set a value in a form, the tag
might look as follows: [LL_REPTAG=ENTRYPOINT
SETWFFORM:ACCESSDATA:BRAVO /]. In this case the
column ENTRYPOINT is being inserted into a form called
ACCESSDATA at the field BRAVO.
Page 95
WebReports User Guide
Format Description
Page 96
WebReports User Guide
SLICE Examples:
Page 97
WebReports User Guide
SUBSTR Examples:
{A<1,?,'Name'=X,'URL'='/Livelink971/livelink.exe?func=ll&objId=1
389412&objAction=properties&nexturl=%2FLivelink971%2Fliveli
nk%2Eexe%3Ffunc%3Dll%26objid%3D1388531%26objAction%
3Dbrowse%26sort%3Dname'>,A<1,?,'Name'=X,'URL'='/Livelink9
71/livelink.exe?func=ll&objId=1389412&objAction=info&nexturl=
%2FLivelink971%2Flivelink%2Eexe%3Ffunc%3Dll%26objid%3D
1388531%26objAction%3Dbrowse%26sort%3Dname'>...
Page 98
WebReports User Guide
This subtag expects a date in the main tag and returns the time
TIMESINCE:<ref date> delta (<ref date> - <main tag date>). If no <ref date> is specified
then the current date is used by default. Negative values will be
Support: header, row, footer
produced if the <ref date> is before the <main tag date>. Dates
must be specified in the following format:
Examples:
[LL_REPTAG=DUEDATE TIMESINCE /]
[LL_REPTAG=MODIFYDATE TIMESINCE:'Jan 12 2010' /]
[LL_REPTAG_'Feb 2 2009' TIMESINCE:'D/2009/12/14' /]
[LL_REPTAG_'D/2009/12/20' TIMESINCE:'Fri Jan 01 00:00:00
2010' /]
The first example will return the difference between the current
date and the date in the column DUEDATE. The second example
returns the difference between 'Jan 12 2010' and the date in the
column MODIFYDATE. The third and fourth examples
demonstrate different acceptable ways to specify the date format.
Format Description
%% A percentage sign
%p AM or PM
Page 99
WebReports User Guide
%P AD or BC
Imagine you are starting with a custom date stored in the format:
2006-02-15T00:00:00
Use [LL_REPTAG=MY_DATE_COLUMN TODATE:"%Y-%m-
%dT%H:%M:%S" /] to put the date into a string representation of
a Livelink date.
At this point the date will look like Wed Feb 15 00:00:00 2006
which may or may not be useful.
For output formatting see DATE sub-tag. For the current date see
DATE and DATETIME tags.
For example, if the first column of a data table returns the string:
'apple','orange','pear';
For a tag that returns an OSCRIPT type data structure, this tag
TOJSON converts the structure into a JSON (JavaScript Object Notation)
structure that can be processed by a JavaScript interpreter. This
Support: header, row, footer
sub-tag converts OSCRIPT structures as follows:
Page 100
WebReports User Guide
Removes all leading and trailing white space from the specified
TRIM string. White space is defined as any combination of spaces,
form feeds, new lines, carriage returns, and horizontal or vertical
Support: header, row, footer
tabs.
Page 101
WebReports User Guide
For any valid URL this sub-tag converts the "GET" form URL into
URLTOPOST a POST request by creating a series of appropriately named
FORM fields with corresponding values. If the URL contains a
Support: header, row, footer
prefix (prior to any parameters) the prefix is abandoned and only
the parameters are converted into form fields. For example, the
following URL:
/Livelink971/livelink.exe?func=ll&objId=157220&objAction=Ru
nReport&reqcacheid=1005851343
Converts into the following lines of HTML:
<INPUT TYPE="HIDDEN" NAME="func" VALUE="ll">
<INPUT TYPE="HIDDEN" NAME="objId" VALUE="157220">
<INPUT TYPE="HIDDEN" NAME="objAction"
VALUE="RunReport">
<INPUT TYPE="HIDDEN" NAME="reqcacheid"
VALUE="1005851343">
USERACTION Formatting
Action Description
Creates a new group with the name returned from the main tag.
Supports an optional parameter to set the group leader. E.g.
[LL_REPTAG=newname
CREATEGROUP:<groupname>
USERACTION:CREATEGROUP:LEADERID:4526 /] creates a
new group called whatever is in the newname column and sets
the leader of that group to be the user 4526.
DELETE Simply deletes the user or group returned by the main tag
For a valid Livelink user ID or Livelink user name this sub-tag will
USERINFO:<format> return user information according to the format parameter that
has been provided.
Support: header, row, footer
Page 102
WebReports User Guide
USERINFO Formatting
Format Description
The full name of the user using the format which has been
FULLNAME globally defined for the Livelink system (e.g. Joseph R.
Smith)
Page 103
WebReports User Guide
USERPREF:<tab>:<setting>
For a valid Livelink user ID this sub-tag will return the users settings
Support: header, row, footer found in Tools > Settings. For example, [LL_REPTAG=USERID
USERPREF:GENERAL:STARTPAGE /] will return the user's Start Page
setting (Enterprise Workspace, My Workspace, About Livelink, or My
Home). Some subtags return an Oscript Assoc and can be further
manipulated using the TOJSON subtag.
Format Description
GENERAL Returns an Oscript Assoc containing the values of the General Tab.
Returns the users Navigation Style. This will return on of three values; a
GENERAL:NAVSTYLE
blank string (for no preference selected), 'trail', or 'dropdown'.
GENERAL:NEWDUR Returns the number of days set for the "New" Indicator Duration.
COLORS Returns an Oscript Assoc containing all the settings on the Color tab.
DISCUSSION Returns an Oscrip Assoc containing all the settings on the Discussion tab.
The "View Item Options" setting on the Discussion tab. Returns TRUE or
DISCUSSION:VIEWITEMOPTIONS
FALSE.
Page 104
WebReports User Guide
USERPREF Continued<
Format Description
WORKFLOW Returns an Oscript Assoc containing all the settings on the Workflow tab.
WORKFLOW:WFSTARTPAGE The Workflow Assignments > Starting Page setting on the Workflow tab.
WORKFLOW:PROXY The Workflow Assignments > Proxy setting on the Workflow tab.
WORKFLOW:SORTORDER The Workflow Statuses > Sort Order setting on the Workflow tab.
WORKFLOW:DFTWFTAB The "Default 'My Workflows' Tab" setting on the Workflow tab.
WORKFLOW:MAXITEMS The "Maximum Items Per Page" setting on the Workflow tab.
Page 105
WebReports User Guide
VERINFO Formatting
Format Description
Page 106
WebReports User Guide
WFACTION Formatting
Action Description
Page 107
WebReports User Guide
WFATTR Formatting
Format Description
Page 108
WebReports User Guide
Page 109
WebReports User Guide
WFFORM Formatting
Format Description
Page 110
WebReports User Guide
Page 111
WebReports User Guide
Page 112
WebReports User Guide
WFINFO Formatting
Format Description
FLAGS Flags.
PROJECT Project.
USERDATA Userdata.
CUSTOMDATA Customdata.
OWNERPERMS Ownerperms.
Page 113
WebReports User Guide
7.1 Overview
Besides being displayed in the browser, the resulting output from running a WebReport can
be exported to any of the following locations: Livelink (New document, Version, Workflow,
WebForm), Desktop, E-Mail or if you’re the Admin user, to the Livelink Server itself. The
export behavior is accessible, explicitly from the functions menu, by choosing Export or by
setting export to be the default report behavior through Properties → Destination on the
functions menu. When exporting to either Livelink or e-mail it is possible to separate the web
browser from the report so the user can carry on working whilst large reports are executed in
the background. This behavior is accessed via the Run in Background check box.
Export format
Specify categories
Return Browser
• Users are required to select an existing document or customview rather than a container.
• You have the option to insert the exported report into the document you are adding a
version to. This can be at the start or end, or, if using tags, anywhere in the body of the
document.
On clicking export a new version is added to the selected document, with the new mime type,
description and categories as specified on the export page.
WebReports User Guide
Specify categories
• E-Mails are only sent to direct members of the selected Livelink groups.
• The total address list must not exceed 10,000 characters (about 500 e-mail
addresses).
3
Each address is separated using whatever symbol has been defined as a system preference. The instruction for this
field will indicate this symbol (e.g. comma, semi-colon, etc.)
WebReports User Guide
The export to WebForm feature allows the user to update existing WebForm data, overwrite
the existing data or append more data to the existing data. In order to specify what pieces of
data from the WebReport are inserted into the WebForm the SETFORM sub-tag must be
used. [LL_REPTAG=USERID SETFORM:USER /] would, for example, take the id of the user
and insert it into the column USER. A slightly more advanced example might involve using
sub-tags to operate on the data before inserting it into the WebForm. [LL_REPTAG=USERID
USERINFO:GROUPID SETFORM:GROUP /] uses USERINFO with the GROUPID parameter
to retrieve the group of the current user, SETFORM then takes this and inserts it into the
WebForm field called GROUP. It's possible to use SETFORM to insert data for as many fields
as needed.
Livelink WebForm -
browse dialogue
• Replace Existing - The existing file will be overwritten with the new WebReport output.
• Unique Name - A unique number will be appended directly before the output file's
extension - example: 'WR_output1.html'.
• Skip Output - The WebReport output will not be transferred to the FTP server.
Useful tips:
• If the FTP server allows anonymous login, simply check the 'Anonymous User Login'
checkbox. The feature will attempt to login using the Anonymous username and use the
email address of the user executing the WebReport as the password.
Page 119
WebReports User Guide
Select an alternative
output destination
behaviour
WebReports User Guide
8 PDF Conversion
8.1 Overview
Several of the WebReports destinations support third party document conversion which can
be used to create PDF formatted reports. The destinations are:
• Livelink Node
• Livelink Version
• Server
In earlier versions of WebReports, PDF conversion was supported in a slightly different form.
The user had the option of selecting a PDF MIME type which, upon its selection, caused the
reportview to be converted into a PDF format. This had limitations in that the reportview being
converted to PDF could only be in HTML format.
From WebReports 4.0, the MIME Type and conversion process have been decoupled. This
means the user can use WebReports to create a document of any type e.g. WordML or
SpreadsheetML and then perform the conversion process on this document. This brings
much more flexibility to the look of the document being converted.
Note that PDF conversion is not instantaneous. The user may need to wait for several
minutes for a report to appear at the destination location.
Note: before PDF conversion can be used, your Livelink Administrator must configure options
in the Livelink Admin Pages:
If you are an Administrator, see the Manage WebReports Conversion section in the on-line
Admin help.
The following tables describe the tags recognized by WebReports. Not all tags are supported
in all sections of the reportview. The supported sections (header, row template, footer) are
indicated beneath each tag name.
• XML Job Tickets must be valid in order to be used. The following rules must apply to
each job ticket in order to be valid:
o Must contain an XML header at the very top, similar to <?xml version="1.0"
encoding="ISO-8859-1" ?>
o The XML header must be followed by the Adlib header tag containing version
of Adlib the ticket conforms to, such as <?AdLibeXpress applanguage="USA"
appversion="2.7.0" dtdversion="1.8" ?>
o Must contain a <JOBS> tag.
o Has to contain only one <JOB> tag. Although Adlib supports multiple jobs in
one ticket, this is not practical with WebReports conversion. Each converted
document will have its own job ticket.
o Must contain a <JOB:DOCINPUTS> tag with a <JOB:DOCINPUT .../> tag
nested inside of it. This contains information about where Adlib can find the
file to be converted. Similarily, <JOB:DOCOUTPUTS> must exist with a
<JOB:DOCINPUT .../> tag nested inside, as this contains information for
Adlib regarding where to place the converted file.
Page 122
WebReports User Guide
• The FOLDER attribute needs to contain a valid file path in order for the files to be
processed and delivered properly. The only exception to using a valid file path is
using the new $DEFAULT_PATH term.
This feature also supports the use of WebReports tags within the job ticket file. More
information regarding Job Ticket features can be found with Adlib Express documentation, as
feature availability depends on version of Adlib Express being used.
When used as part of a Job Ticket file in the FOLDER attribute, $DEFAULT_PATH will
dynamically insert the appropriate file path as specified in the Manage WebReports
Conversion administration page.
There are two sets of directories that can be specified in the administration page, and if the
set of directories for use with XML Job Tickets has been specified, the $DEFAULT_PATH term
will return those file paths; otherwise, if not specified, it will return the first set of conversion
directories specified for conversion.
Because this is not a constant, you can use this term as part of the FOLDER attribute in both
DOCINPUT and DOCOUTPUT tags. Using this will return the proper file path where used.
The interface for selecting a Job Ticket to be used when sending a file for conversion is found
alongside the ‘Use External Conversion Engine’ check box in the destination tab for any
WebReport. The interface will only be displayed if the ‘Use External Conversion Engine’
checkbox is checked and XML Job Tickets have been enabled in the admin pages.
• To select a Job Ticket to use during conversion, just click the ‘Browse Livelink...’
button, and browse for a job ticket file that a user has created and placed in Livelink.
• If you would like to change a WebReport’s settings so it is still sent for conversion, but
not use a job ticket anymore, simply press the clear button and update the page.
• If a job ticket has been selected and the destination page has been updated, there is
a function menu available to access the functions available to the job ticket file
selected.
Page 123
WebReports User Guide
" ?>
<!DOCTYPE JOBS SYSTEM "C:\AdLib eXpress\DTD\AdLibeXpress.dtd">
<JOBS xmlns:JOBS="http://www.adlibsys.com" xmlns:JOB="http://www.adli
bsys.com">
<JOB>
<JOB:DOCINPUTS>
<JOB:DOCINPUT FILENAME="" FOLDER="$DEFAULT_PATH" />
</JOB:DOCINPUTS>
<JOB:DOCOUTPUTS>
<JOB:DOCOUTPUT FILENAME="" FOLDER="$DEFAULT_PATH" D
OCTYPE="PDF" />
</JOB:DOCOUTPUTS>
</JOB>
</JOBS>
Page 124
WebReports User Guide
9.1 Overview
WebReport developers (i.e. users with reserve permission) can set up execution schedules
for individual WebReports to run without user intervention. Scheduled reports run in the
background and output their results to a Livelink document node or to e-mail. The schedule
allows for reports to run a fixed number of times or forever, starting from a specific date and
time. The time between repeated report runs can be from 5 minutes to 520 weeks. One
schedule can be set per user per WebReport.
• In the Next run after fields, set the date and time that the report should first run. Note
that actual execution times may be up to 5 minutes after the time set here. Typically,
report runs happen on the hour and 5, 10, 15 minutes etc. past the hour.
• In the Run field, either check Forever or enter the number of times the report should run
in Times.
• Set the interval between report runs in minutes, hours, days, and weeks.
• Click Update and the schedule will be set.
• Create a WebReport as normal and set its output destination to the desired location
• Create a second WebReport that has no data source and set it to run on a daily schedule
at the time you want the report to execute on the 25th
Page 125
WebReports User Guide
• Finally, wrapper the call to the sub WebReport with a [LL_WEBREPORT_IF statement
that checks the day of the month
Your second WebReport (the “master” report) should contain code something like this:
If a report has been scheduled to run a fixed number of times, the remaining number of times
and next run time will be updated by Livelink so you can see how many more runs are
expected and when the next one will happen.
Note that the Livelink Administrator has the power to disable or delete schedules created by
other users. This is achieved in the Livelink Administration pages (see the WebReports
Installation and Administration Guide for more details).
Page 126
WebReports User Guide
10 WebReport Constants
10.1 Overview
The Constants feature provides the capability to pre-define data which can be inserted into
the report output. This feature is typically used in the following situations:
• Where some text or information in the WebReport might require changing periodically,
a constant can be used to allow easy maintenance which can be performed by a non-
technical person.
• Where values must be manually defined (such as attribute numbers), constants make
it easy to define and maintain these parameters.
• Where the same reportview is to be used for multiple WebReports in different ways,
each WebReport can have different constant settings.
• Where a reportview is being created with references which may vary between
systems, constants allow system transparency to be managed. (Note, the XML
import/export feature attempts to translate any references to Livelink objects between
systems).
Use the procedure below where you have constants you want to define but have not yet used in
the WebReport. Once defined here you can reference them in the reportview.
• Select the Constants tab for the WebReport using the function option: Properties →
Constants.
• Select the + button to add a new constant (if no other constants have been defined
the 'Click here to add new constant' option can also be used).
• Using the new, blank row which is created add a constant name, constant value, and
optionally a constant description. Note: the constant name should not include spaces.
The constant value provides the optional capability to browse for a Livelink object.
This option automatically inserts an object ID into the value field.
Use this method where you have made reference to a constant or multiple constants in the
reportview and want to quickly populate them on the constants tab. This method saves time on
the method above as it allows the constants to be populated on mass. It also, where possible, will
determine the constant type programmatically. Where this is not possible, the constant will be of
type string.
• Select the Constants tab for the WebReport using the function option: Properties →
Constants.
Page 127
WebReports User Guide
• Select the button to add all the constants that are used in the reportview. Note that
this icon only appears when the reportview contains constants that are not defined on
the constants tab.
• For all the new constants, enter their constant value, and optionally a con
constant
description.
Example usage, if a constant called reportID had been stored to reference another
WebReport, the syntax used could be as follows:
?func=ll&objid=[LL_REPTAG_$reportID /]&objaction=
/]&objaction=runreport
A more appropriate example would be to use the same constant with LLURL as follows:
[LL_REPTAG_$reportID LLURL:REPORT /]
• You can drag and drop constants by selecting the appropriate constant from the
dropdown list and then dragging the icon to the point in the reportview where you
want to insert the constant.
• You can open the constants tab in a new window by selecting the constants hyperlink
before the dropdown.
• You can update the list of constants in the dropdown by clicking the icon. This has the
effect of updating the list without reloading the page.
WebReports User Guide
• Constants appearing in the dropdown list with a star (*) next to them are Global
Constants. These can be used the same as regular constants, the difference being that
they are defined in a different WebReport.
• Select the Constants tab for the WebReport using the function option: Properties →
Constants.
• Select the – (minus) button for the constant to be deleted and accept the warning
message by selecting OK.
Alternatively:
• Select the red X button to delete all the constant definitions for the entire WebReport.
The concept would be to have all WebReports for a particular application point to a single
WebReport that is used to manage the constants for the entire application. The benefit of this
is that once a constant is defined in your global report, it is available to all WebReports that
point to that WebReport. This is a big time saver when you consider that a WebReports
application may be built from 50 or more WebReports and other objects which all need to
refer to each other.
Global constants can be "daisy chained" so that one WebReport points to another and so on.
Even so, global constants adhere to Livelink permissions, so if a user does not have
permission to see a given WebReport they will not be able to make use of the constants
defined in it.
WebReports User Guide
When working in the online editor global constants appear with a star (*) next to them in the
dropdown list.
Page 130
WebReports User Guide
11 Using Parameters
11.1 Overview
When running a WebReport, parameters can be included in the URL for the WebReport itself
as well as for the associated data source. These two parameter types are described here.
WebReport parameters - There are several parameters which are used to control the
behavior of the WebReport. Many of these parameters are designed to allow WebReport
designers to construct unique URLs to modify the WebReport behavior according to
application requirements. In addition to these built-in parameters, the WebReports module
also supports the creation and use of unique parameters as defined by the WebReport
developers. These are passed by placing &parmname=data in the parameter list of the URL
where 'parmname' can be any string of standard alpha-numeric characters.
E.g. ...?func=ll&objId=47478&objAction=RunReport&myparm=testdata&nexturl=....
This data is then accessible within the reportview using the defined tag syntax. E.g.
[LL_REPTAG_&myparm /] would return "testdata" in the previous example.
(Note: sub-tags can be used to modify the data returned by a parameter tag.)
Data Source parameters - The data sources, LiveReports and Search Queries, allow input
parameters to be defined and collected when the report is run. When a LiveReport is being
used as a data source, the standard LiveReport prompting will be allowed prior to the
WebReport executing if no parameters have been supplied in the URL. In this scenario, when
the WebReport is run, the user is presented with the LiveReport prompts much as if they had
run the LiveReport directly. Once the user has entered the required prompts then the
WebReport continues as normal.
When a WebReport has been defined with a saved query as the data source, it is possible to
insert variables into the full text search specification of the saved query. For example, the
term %1 can be placed in the 'Full Text Search Terms' field of any full text search boxes.
These variables will be substituted with any corresponding parameters in the URL. URL
parameters follow the same convention as a LiveReport, i.e. inputlabel<x>=value (where x is
a number from 1 to 99 which corresponds with variables %1, %2, etc.) In the example below,
a variable such as %1 would be replaced with the word 'WebReport' by using a URL
parameter in the form: inputlabel1=WebReport. These variables can also be used in
complex queries as part of the Livelink Query Language (LQL). Additional information about
using search can be found in the online help.
E.g. ...?func=ll&objId=47478&objAction=RunReport&inputLabel1=WebReport&nexturl=....
If a WebReport is run by invoking its URL from a user developed page (e.g. HTML document
or another WebReport) then it is possible to supply the necessary input parameters for both
the WebReport and any data source in the URL that is used to invoke the WebReport. If all
required LiveReport parameters are passed within the URL, the user will not be prompted for
the input parameters in the normal way.
Default parameters WebReports provides a feature to allow defaults to be set for any
parameters that would normally be passed through the URL. When a default value is set for a
parameter, then this value will be used if no corresponding parameter is found in the URL.
Page 131
WebReports User Guide
Use the procedure below where you have parameters you want to define but have not yet
used in the WebReport. Once defined here you can reference them in the reportview.
• Select the + button to add a new parameter (if no other parameters have been
defined the 'Click here to add new parameter' option can also be used).
• Using the new, blank row which is created, add a parameter name, display text,
prompt order, default value, and other settings.
Use this method where you have made reference to a parameter or m multiple
ultiple parameters in
the reportview and want to quickly populate them on the parameters tab. In addition,
parameters defined in LiveReport data sources will also be populated on the tab. This method
saves time on the method above as it allows the parameters
parameters to be populated on mass. It also,
where possible, will determine the parameter type programmatically. Where this is not
possible, the parameter will be of type string.
• Select the Parameters tab for the WebReport using the function option: Properties
→ Parameters.
• Select the button to add all the parameters that are used in the reportview or
LiveReport data source.
source. Note that this icon only appears when the reportview or
LiveReport contains parameters that are not defined on the parameters tab.
• You can drag and drop parameters by selecting the appropriate parameter from the
dropdown list and then dragging the icon to the point in the reportview where you
want to insert the parameter.
• You can update the list of parameters in the dropdown by clicking the icon. This has
the effect of updating the list without reloading the page.
WebReports User Guide
• Select the – (minus) button for the parameter to be deleted and accept the warning
message by selecting OK.
Alternatively:
• Select the red X button to delete all the parameter definitions for the entire
WebReport.
Option Description
This is the name of the parameter as it will appear in the URL once the
user has selected their values and selected Run on the prompting page.
Parameter Name
The parameter name must not contain spaces
spaces or other characters which
cannot
not be passed in a URL. TThe
he end user will be largely unaware of this
value.
This is the text that the user will be prompted with. It differs from the
Display Text
parameter name in that is can be more descriptive and can contain
spaces.
This checkbox determines whether the user will see the prompt or not. If
the user it not prompted for a particular parameter, the default value will
Prompt be used. If turning off prompting for a parameter, make sure you do not
put the user in a situation where they are stuck. This might happen if
you make a parameter mandatory, turn the prompting off and don't
select a default value.
Prompt Order This field determines the order in which the parameter
parameterss will appear on
the prompt screen. The values can be alphanumeric.
Type This field will determine the type of parameter the user is prompted for.
This can be String, ObjectID, User, Number, Object, Date or Custom.
WebReports User Guide
See the separate parameter type table for details of each parameter
type.
This is the value that will be used if the user doesn't select a value on
Default Value the prompt screen. The value will appear pre-populated on the prompt
screen. The value will be used by WebReports that are running on a
schedule.
Show Descriptions This field determines whether the description text for all the parameters
appears on the prompt page.
When selected, the contents of this file will be rendered at the top of the
prompts page. This allows developers to quickly apply the same
branding or instructions to the top of all their prompting screens. A text
Prompt File based document or a separate WebReport may be selected to provide
this text. If using a WebReport this gives the developer the flexibility to
bring back dynamic content to the prompt screen. One use of this might
be to perform some summary counts on the data the user is about to
select from on the prompting screen.
Type Description
String The String parameter type will prompt the user with a free text field.
The ObjectID parameter type allows the report developer to specify types of
Livelink objects the user can select from on the prompt screen. One or more
ObjectID
items can be selected from the multi-value list and at least one type must be
selected before the developer can browse for a default value.
This field allows the report developer to create a user prompt. The
User developer can decide whether the user is allowed to browse for Users,
Groups or Users and Groups.
Number Similar to the String parameter but forces the user to enter a numeric value.
Allows the user to select a Livelink sub type. For example, select Document
Object
(144) or Folder (0).
Prompts the user with a date field. The developer can decide whether the
Date
time is displayed or not - also whether the user is prompted with a blank
Page 134
WebReports User Guide
Here the developer can browse for a WebReport that is being used to
Custom provide a custom prompt. The developer might use this to create a custom
pick list, for example.
Page 135
WebReports User Guide
12.1 Overview
WebReport data sources (LiveReports, Search Queries, Forms, etc.) can be manipulated
using special parameters called data source parameters. These parameters are passed in the
URL when a WebReport is executed and control things like the maximum number of results
on each page:
?func=ll&objId=1234&objAction=RunReport&sourceid=12345&DSstartrow=11&DSendr
ow=100&DSmaxrows=50
In this example, the data source identified by nodeid 12345 will be used to supply data for the
WebReport. The data used will end at row 50 (despite the DSendrow parameter being set to
100) because the DSmaxrows parameter is set to 50.
Page 136
WebReports User Guide
12.2 Pagination
One useful application of data source parameters is pagination. This is discussed in full detail
in the on-line help section called “Detailed Examples”.
Page 137
WebReports User Guide
13 Export Parameters
13.1 Overview
This section provides additional information on the use of Export Destinations. Specifically, it
provides detail on how various export types can be controlled using URL parameters. This is
particularly useful for developments where WebReport exports may be invoked from tailored
web pages instead of the standard export interface described in the basic export procedures
documentation. For each export type, all of the available URL parameters are described along
with an example of usage.
Each export destination has an explanatory table with the following columns:
• Parameter Name - the name of the parameter as it would appear in the URL.
• Name in interface - this is the name which will appear in the grey box on the left hand side
of the export screen.
• Mandatory - simply indicates whether the parameter is mandatory or not. An export will
fail if mandatory parameters are missing.
• Valid Values - these are the values which are supported for the specified parameter. Note
that when a value containing a space or other special character is passed, it must be
escaped appropriately.
Page 138
WebReports User Guide
Here WebReport 1234 exports to a new Livelink node with a Mime type of text/plain. The
resultant file will be placed in the folder with id 2000 with the name being the current date.
Page 139
WebReports User Guide
description
Here WebReport 1234 adds a new Livelink document version with a Mime type of text/plain to
the document id 5678.
*Only one of these is mandatory but it's possible to use all 3 if required.
**Replacement tags are supported to determine the value of newVersion_ID (which must be a
text document) but also can be contained within the document itself.
Page 140
WebReports User Guide
ee%20attached&mimetype=application%2Fvnd.ms-excel&nexturl=...
Here WebReport 1234 sends an email to [email protected] with the subject Status
Report. The report is attached to the email in Excel format with a default name (because
emailAttachmentName isn't specified) and the email body has the text Please see attached.
Name in Replacement
Parameter Name Mandatory Valid Values
Interface Tags
objection Yes RunReport No
export_location Output destination Yes form No
Populate Form Yes A valid Livelink WebForm id Yes
form_ID
(not template id)
appendForm Append Results Yes overwrite, append, update No
Yes An escaped URL where the No
nexturl
user will go following export
Here WebReport 1234 deletes the contents of WebForm 5678 and populates it with data
specified in the WebReport with SETFORM
Name in Replacement
Parameter Name Mandatory Valid Values
Interface Tags
objAction Yes RunReport No
Output Yes workflow No
export_location
Destination
workflow_id Initiate Map Yes A valid Workflow map id Yes
Attach Output to No “yes” or “no” No
attach
Workflow
Attachment Yes* The name of the report to Yes
nodeName
Name be attached
Workflow Title Yes Text to appear in the title Yes
workflow_title
of Workflow instance
Workflow No Text to appear in the Yes
workflow_description Description Workflow description
field
Attachment no All values as shown in No
mimetype MIME Type the Export MIME Type
field
duedate Workflow Due no Due_on, Due_in, no_due No
DueOn Due on No e.g. D/2014/1/15 No
Due in No Integer representing a No
Workflow_duein
number of days
Expcomment Attachment No Any valid description text Yes
Page 141
WebReports User Guide
Here WebReport 1234 initiates an instance of workflow map 5678 and sets the title to my new
workflow. The report itself is attached to the workflow with a name of report data and a Mime
type of text/html.
Replacement
Parameter Name Name in Interface Mandatory Valid Values
Tags
objAction Yes RunReport No
Output Yes server No
export_location
Destination
Server Path File Yes A valid path file on Yes
serverFilePath
the Livelink server
Export MIME type No All values as shown
mimetype in the Export Mime
Type field
Yes An escaped URL No
nexturl where the user will go
following the Export
Here WebReport 1234 adds a new file to the Livelink server file system at
C:\export_testing\test_export.xml.
Page 142
WebReports User Guide
14 Logical Expressions
14.1 Overview
WebReports provides several conditional tags to allow selective filtering of the output using
logical expressions. Examples of the tags which support logical expressions include:
[LL_WEBREPORT_EXITIF (logical expression) /],[LL_WEBREPORT_INCLUDEIF (logical
expression) /] and [LL_WEBREPORT_IF (logical expression) /]
Logic expressions for these tags are made up of one or more logical clauses which are
separated by a logical Boolean operator (AND, OR, &&, ||). For example: clause1 AND
clause2 OR clause3
Each one of these clauses is made up of two operands which are compared using one of the
comparison operators (see table below for a list of supported operators). For example, each
clause is in the form: "parmA" == "parmB"
In these clauses each operand can be either a constant value or one of the WebReports
report tags which is supported for use in a logic expression (currently variables are not
supported in IF/ENDIF expressions and the ACTUALROWS tag cannot be used within a row
section). For example: "[LL_REPTAG_TOTALROWS /]" >= "10"
Using these two concepts a logical expression with multiple clauses could look like this:
[LL_WEBREPORT_IF "[LL_REPTAG_TOTALROWS /]" >= "10" AND
"[LL_REPTAG_&reptype /]" == "parmB" /]
...
[LL_WEBREPORT_ENDIF /]
Operators
WebReports support a variety of logical operators which are described in the following table.
Page 143
WebReports User Guide
For certain operators ( <=, >=, <, > ) WebReports first attempts to convert the string operands
into integers. If conversion to integer is unsuccessful, WebReports attempts to convert the
operands into dates. (In reality operands cannot have a type as they are all raw strings;
however, strings conforming to a particular format can be interpreted as a type such as
integer or date). Only if the strings match any of the date formats described in the table below
will they be converted into dates and compared as dates. The supported formats match those
used by common WebReports tags and data source dates.
Page 144
WebReports User Guide
To illustrate how multiple clauses are evaluated, consider the following example:
Page 145
WebReports User Guide
Thus the end result of this logical expression is FALSE. From this example it should be
evident that the rightmost parameter has the highest precedence. For example, if the
rightmost clause resolves to FALSE and the preceding logical operator is AND, then the result
will always be FALSE regardless of any other parameters. Similarly, if the rightmost clause
resolves to TRUE and the preceding logical operator is OR, then the result of the expression
will always be TRUE.
If this logical expression was written out using brackets it would look like this:
( ( (("5" == "5") AND ("10" != "5")) OR ("10" == "2")) AND ("5" == "10"))
Page 146
WebReports User Guide
15 Sorting Results
15.1 Overview
The WebReport content control tag [LL_WEBREPORT_SORT <Sort Keys> <Global
Direction> /] makes it possible to sort data using one or more columns from the data source
specified as sort keys. There are three different ways to specify the column reference for each
sort key:
• Specify a column number from the data source. A numeric value representing the column
number from left to right in the data source can be used. E.g. [LL_WEBREPORT_SORT
"1" /].
• Specify a column name from the data source. A text value representing the name of one
of the columns used in the data source can be used. [LL_WEBREPORT_SORT "dataid"
/].
• Specify a WebReports tag and sub-tags to be used as a sort key. This function allows the
sort to be based on different criteria than the normal data returned by the column. For
example: [LL_WEBREPORT_SORT "[LL_REPTAG=DATAID NODEINFO:NAME /]" /]
In this example, rather than sorting on the DataId column, the sort will be based on the
name of the DTree object which is returned by NODEINFO:NAME.
Multiple sort columns can be specified allowing the user to sort within a sort and so on. As an
example, we could sort by the first column, and within this we could sort on the second
column, and within this the third column. Here is how the syntax might look followed by an
example of the output.
The methods above can be combined to provide sorting on multiple key values as shown in
the following examples:
This sorts by the first column explicitly in the ascending direction, then the name column, also
in the ascending direction (by default), then depending on the value in column 3, we either
sort on the column Active or Inactive, also ascending.
This sorts the first column ascending (by default), then the name column descending, then
sort on the third column having first converted any values of “1” to “Active” and any values of
“2” to Inactive.
In addition to the direction parameter that can be optionally specified for each sort key, the
SORT function also support a global direction parameter to specify the sort direction
(ascending or descending) to be used for all sort keys that don't have a direction specified.
Page 147
WebReports User Guide
DESC or ASC should be used (some older syntaxes are still supported). If this parameter is
not specified, the direction defaults to ASC (ascending). E.g.
In this example, the data set would be sorted in descending order of column 1 followed by
descending order of column 2.
When using a WebReports tag and sub-tags as the sort parameter, any results which are
numeric or in a valid date form as defined in the Livelink system, will be sorted as integer and
date types respectively.
When using the SORT tag, it is possible to use parameter or constant tags as part of the tag
syntax. This is useful to allow content to be sorted according to a value that has been passed
as a parameter or a constant. E.g.
[LL_WEBREPORT_SORT "[LL_REPTAG=DATAID
NODEINFO:[LL_REPTAG_&nodefield /] /]":[LL_REPTAG_&direction /] /]
In the example above, a URL parameter could be passed to specify which NODEINFO:
should be used. A direction could also be passed in this example. Note that for the
&nodefield parameter the tag would not work correctly if no value had been passed as
nodefield. The Parameter Default feature should be used to provide a default parameter in
situations like this.
• The name of one or more parameters that should be checked in the URL
• A series of reference words and their associated tag syntax
When this is setup correctly, each specified parameter is checked to see if one of the
predefined reference words has been found. If a specified reference word is found in the URL
parm then the corresponding syntax for this word is inserted into the SORT tag.
In order to provide this functionality, two "directives" are provided that can be included within
the SORT tag. The concept of a "directive" exists in other content control tags such as the
INSERTJSON tag. It refers to a syntax command preceded by an @ symbol. Each directive
may have one or more additional pieces of information. The two directives supported by
SORT are @PARMNAMES AND @PREDEFKEY. These directives are explained in depth
below.
Page 148
WebReports User Guide
Directive Description
@PARMNAMES One or more of these directives can optionally be
SORTCOL:<sortcolname> specified. If none of these directives are specified (and a
DIRCOL:<directioncolname> predefined key - as below - is specified) then it is
assumed that the parameters &sort and &direction will be
used to pass any sort or directional references. For each
@PARMNAME directive that is supplied, an alternative
URL parameter name can be specified for either the sort
column or the sort direction. The ability to specify more
than one @PARMNAME directive allows multiple sort
columns to be specified. These parameters are used in
the order of the @PARMNAME directives specified in the
SORT tag. For example, given the following set of
directives:
If the URL
contained:&sortcol3=parentid&sortcol1=Name&sortcol2=
dataid
@PREDEFKEY REF:col3
PARM:"[LL_REPTAG=DATAID
CAT:somecat:attr1:DISPLAY /]"
Page 149
WebReports User Guide
16 Using Variables
16.1 Overview
Various components in WebReports support the concept of variables. Variables provide the
ability to store and/or accumulate results from other tags for output into the reportview.
Variables are supported by the following tag and sub-tags:
• SETVAR – sub-tag which allows any tag result to be stored in a named variable.
• ADDVAR – sub-tag which allows any numeric tag result to be added to the numeric value
in a named variable.
• CURRENTVAL – sub-tag that returns the current value of a variable and/or the result of a
variable action sub-tag.
A more detailed description of these sub-tags and the variable tag are described in the syntax
guide. This section describes some guidelines and notes for the usage of this feature.
• All passed parameter tag values from top to bottom of the reportview
• All column name tag values from top to bottom of the reportview
• All static tag values from top to bottom of the reportview (e.g. any tags which return static
Livelink environment information which is not returned from the data source)
• All report tag values (columns of data from the data source) from top to bottom of the row
section from first row to last row (according to the sort order)
• All function and variable tags from top to bottom of the reportview (this is where the
current variable values will be resolved)
In general, for any concatenation or addition operations with variables where the order is
important, try to use the same type of tag. For example, if multiple function results (such as
@SUM) are being added together, this is supported because all function results are being
processed in sequential order as they appear in the reportview. If the requirement was to
concatenate a combination of parameters, constants, and math results then this would not be
Page 150
WebReports User Guide
processed in the order expected by the report designer. Currently to work around this
problem, a variable for each type of tag would have to be created and set with the results for
all tags of a specific type. Each of these variables could then be concatenated to provide a
cumulative result as shown in the next bullet:
• When variables are being resolved they can also set variables to be used in subsequent
variables by using the setting sub-tags (e.g. SETVAR)
e.g. given the following sequence of tags:
[LL_REPTAG_%subtotal /] ,
[LL_REPTAG_@SUM ADDVAR:subtotal SHOW /] ,
[LL_REPTAG_@subtotal ADDVAR:total /]
[LL_REPTAG_%total ROUND:2 /]
If the variable called subtotal started with a value of 10, a variable called total started with
a value of 20 and @SUM returned a value of 100.12345, the output of these tags would
be:
10 , 110.12345 , 130.12
Note that when the sub-tags SETVAR, ADDVAR and CONCATVAR are used they will
normally not return the result to the output unless the SHOW sub-tag is also used as in:
[LL_REPTAG_@SUM ADDVAR:subtotal SHOW /].
• Variables can be used within row sections to accumulate numbers or strings from multiple
rows. This is most useful for concatenating string values into a single string which can be
used anywhere that the variable tag can be used (including export fields such as the E-
Mail To: list).
Example 1:
[LL_REPTAG=USERID USERINFO:EMAIL CONCATVAR:tolist:"," /]
If this tag was used in a row section (between the STARTROW AND ENDROW tags), it
would build a string of e-mail addresses with a comma separating each e-mail address.
Example 2:
[LL_REPTAG=cost ADDVAR:subtotal /]
If this tag was used in a row section (between the STARTROW AND ENDROW tags), it
would add the value of the column "cost" for each row to the variable called subtotal.
Page 151
WebReports User Guide
17.1 Overview
A WebReport can use a saved search query as a data source. Saved queries are most
commonly created by saving an advanced search, thus creating a new object in Livelink. The
WebReport data source browser will recognize saved data queries as a selectable object.
The search queries can either use standard Full Text specifications (e.g. All Words) or
complex Livelink Query Language queries.
When a data source is selected, the corresponding search specification will be run whenever
the WebReport is run.
ModifyDate The date the object was last modified as stored in the
Livelink DTREE database table.
Record A full record of all the fields for the object that is stored
in the Livelink DTREE database table. These fields
are stored in a special (RECORD) structure which can
be accessed using the RECORD sub-tag. E.g.:
[LL_REPTAG=RECORD RECORD:SUBTYPE /]
[Optional Fields] In addition to the fixed fields above, any other system
attributes (regions) which have been enabled for
search display can also be referenced using a
WebReports data tag. As these fields are system
dependent it is necessary to ask the administrator to
provide a list of these attributes/regions.
Page 152
WebReports User Guide
For example, if the Full Text box contained: test %1, the parameter &inputlabel1=cat in the
URL would result in the search query looking for the words “test” and “cat”.
Page 153
WebReports User Guide
Each record returned from the query will contain the following values:
• DataID - The DataID for the object as stored in the Livelink DTREE database table.
• ParentID - The ParentID for the object as stored in the Livelink DTREE database
table.
• SubType - The Subtype for the object as stored in the Livelink DTREE database
table.
• Name - The Name for the object as stored in the Livelink DTREE database table
• Attribute Values - The current value for each selected Attribute as stored in the
Livelink LLAttrData table. The column header will be the attribute system name (i.e.
the original attribute name with spaces replaced by underscores).
• Browse Livelink Button - Use the Browse Livelink button to select a Livelink Category.
After a Category has been selected, the page will refresh with a display of all Attributes
within the Category.
• Select Attributes - Select the checkbox next to a specific Attribute to include the attribute
within the query results. When an attribute has been selected, the Parameter Menu will
be displayed for that attribute. When an attribute is de-selected, the Parameter Menu will
be removed for that attribute.
• Check All/Uncheck All Buttons - Use the Check All and Uncheck All buttons to check or
uncheck all checkboxes for the specified category.
• Delete Category - Use the Delete Category icon to delete a specified category.
• Add Category - Use the Add Category icon to add another category. The Add
Category icon will only be displayed at the end of the current listing of categories. The
Livelink Administrator may configure the number of categories that may be included in the
Data Source list and the Add Category icon will not be displayed when the limit has been
reached.
• Category And/Or Join Operator - For each new Category, select either And/Or radio
button to specify whether the categories will be joined in the query with an inner join (And)
or a left outer join (Or).
Page 154
WebReports User Guide
When a Category/Attribute has been checked on the Data Source page, a new Add
Parameter Menu icon will be displayed, from which a query operator may be selected.
When a query operator has been selected from the Parameter Menu, the attribute is now
available via the "Parameter Extraction" process on the Parameters tab. When an attribute
has a selected parameter query operator, the Edit Parameter Menu icon will be
displayed and a checkmark will be displayed next to the selected query operator. If an
attribute is currently used as a parameter and the query operator is changed from the Data
Source page, the query will now be based on the newly selected query operator. The
WebReport designer will be prompted with the option to update the display text on the
Parameter page; regardless of the display text on the Parameter page, the SQL Query
processed will always use the query operator as selected on the Parameter Menu on the Data
Source page.
• Select another query operator from the same menu to set a new query operator, or
• Select the existing query operator to reset the query operator to undefined.
• View SQL - Select the View SQL button to view the generated SQL for currently selected
categories, attributes and defined parameters.
1. Only a WebReport designer with Modify privileges may view the SQL.
• Filter Results by User Permissions - When this checkbox is checked, the query results
will be limited based on the permissions of the user running the WebReport. The user
must have SEE permission level to view a specific item.
NOTES:
1. The default value for this feature is CHECKED; only a user with Livelink
Administrator privileges may modify this feature.
2. The permissions filter is applied to query results as a separate process after the
database query has completed processing.
Page 155
WebReports User Guide
• DSrequestData - This is the parameter that contains the data that will be used by the
datasource. For any of the optional parameters that have not been specified, defaults
are used. The data in this parameter would normally be formatted in a way that can
be interpreted by the WebReport, e.g. Comma Separated Values (CSV) or HTML
table data. If no optional parameters have been specified, the data is expected to be
formatted as CSV. The optional parameters can be used to specify any differences in
the parsing format. A common variation would be to use a symbol such as | as the
row separation character.
Optional
Page 156
WebReports User Guide
The following tags will call a Sub-WebReport and pass the DSrequestData as parameters to
the Sub-WebReport:
• [LL_WEBREPORT_SUBWEBREPORT NODEID:[LL_REPTAG_$SWR /]
PARM:DSREQUESTDATA:"444,555,666|777,888,999" PARM:DSCOLUMNSEP:","
PARM:DSROWSEP:"|" /]
• ?func=ll&objId=48243&objAction=RunReport&DSREQUESTDATA=444,555,666|777,
888,999&DSCOLUMNSEP=,&DSROWSEP=|
The output of tags such as CAT:RAW can be used similar to example 2 but with a form post:
</FORM>
A form post is a good idea where the results from the RAW tag can be large as Internet
Explorer is unable to cope with very long parameter values. Form posts on the other hand are
no problem.
Page 157
WebReports User Guide
20.1 Overview
For most WebReport development, it is not necessary to understand the details of how
reportviews are processed; however, for some specialized and advanced situations this
information can be useful. For example, in order to determine what tags can be used as
parameters for other tags, there are some useful guidelines which will help to make these
scenarios clearer.
In general, sub-tags can be used within data tags, and data tags can be used within content
control tags; however, there are also cases where you can use various types of data tags
within other data tags. The success of this type of nesting is dependent on the order in which
each type of tag is processed. E.g.:
In the example above, a parameter tag (nodefield) is substituted as a parameter for the
NODEINFO sub-tag and the parameter tag (direction) is inserted as the direction parameter
for [LL_WEBREPORT_SORT /].
Officially only parameters, constants and column name tags are supported for insertion in
data tags but other combinations should be possible subject to the processing order shown
below. These data tags can be substituted into the following components in the reportview:
• Parameters of content control tags (e.g. the sort direction parameter of a sort tag).
"Content control tags" refers to any tag that has [LL_WEBREPORT_ as a prefix.
• Parameters of sub-tags
• All passed parameter tag values are inserted from top to bottom of the reportview.
• All constant tag values are inserted from top to bottom of the reportview.
• All column name tag values are inserted from top to bottom of the reportview.
• All function tags are interpreted (and marked for later insertion) from top to bottom of the
reportview. @DATA tags are inserted at this point.
• All static tag values are inserted from top to bottom of the reportview (e.g. any tags which
return static Livelink environment information which is not returned from the data source).
• The reportview is divided into three sections. All row data tags are interpreted (for later
data insertion) in the row section.
Page 158
WebReports User Guide
• All variables are prepared and marked for later resolution from top to bottom of the
reportview.
• All Sort tags are processed and data manipulated. Sorts are performed in order of the sort
tag appearance from top to bottom of the reportview.
• All report tag values (columns of data from the data source) are inserted from top to
bottom of the row section from first row to last row (according to the sort order).
• All functions and variables are inserted from top to bottom of the reportview (this is where
the current variable values will be resolved).
• All if/endif conditional tags are resolved from top to bottom of the reportview.
• All sub-WebReports are invoked (and the resulting output inserted) from top to bottom of
the reportview.
The way in which tags are created and specified in the report view is validated each time that
a new version is added to the WebReport. This validation is provided to aid in finding any
syntax errors that may exist in the reportview; however, sometimes this validation may
interfere with more complicated tag structures. Advanced users may want to disable the
validation to allow complex scenarios to be used; however, this should only be done after
basic testing (with validation on) and preferably on a test system to avoid any possible run
time errors that could be introduced.
Validation can be turned off using this tag:
[LL_WEBREPORT_DEBUGON /]
Page 159
WebReports User Guide
21 JavaScript Arrays
21.1 Overview
The content control tag [LL_WEBREPORT_INSERTJSARRAY /] provides the ability to
automatically insert a JavaScript array with all of the report data populated. This feature is
useful for applications where the report data is to be manipulated using JavaScript in the
client browser.
• A JavaScript array is created by default with the name repData. If an alternative array
name is provided using the ARRAYNAME: parameter, then the array is created using the
specified name.
• The array is indexed numerically from 0 (zero) through to an index which is one less than
the length of the array.
• The columns are created as a second dimension of the row array (e.g. an array of
arrays). Columns are indexed numerically from 0 (zero) to an index which is one less than
the total number of columns.
• A series of constants are also created which can be used to reference the column indices.
Each constant is named according to the column which it references.
• If the inserted JavaScript needs to be enclosed in opening and closing SCRIPT tags then
the SCRIPT parameter should be included.
• For data where several columns are repeated and only one column is consistently unique,
the MULTIVALUE: parameter can be used. This parameter will create a third array
dimension for the unique column. See below.
21.3 Examples
Example 1:
Id FirstName LastName
Given a data source returning data according to the table above, the tag
[LL_WEBREPORT_INSERTJSARRAY /] would generate the following:
Page 160
WebReports User Guide
<SCRIPT LANGUAGE="Javascript">
var repData= new Array();
var ID = 0;
var FIRSTNAME = 1;
var LASTNAME = 2;
repData[0] = new Array("1111","James","Bond");
repData[1] = new Array("2222","Johnny","English");
repData[2] = new Array("3333","Frank","Smith");
</SCRIPT>
Example 2:
Given a data source returning data according to the table above, the tag
[LL_WEBREPORT_INSERTJSARRAY MULTIVALUE:CHILDNAME /] would generate the
following:
<SCRIPT LANGUAGE="Javascript">
var repData= new Array();
var ID = 0;
var FIRSTNAME = 1;
var LASTNAME = 2;
repData[0] = new Array("1111","James","Bond",new Array("Matthew",
"Jonathan", "Emily"));
repData[1] = new Array("2222","Johnny","English",new Array("George",
"Mavis"));
repData[2] = new Array("3333","Frank","Smith",new Array("N/A"));
</SCRIPT>
In this example, the MULTIVALUE option makes it possible to compensate for the redundancy
of the first three columns. Six possible rows have been reduced to three rows by creating
another level of JavaScript array.
Page 161
WebReports User Guide
22 WR Trigger
22.1 Overview
The WR Trigger feature allows WebReports to be initiated by specific events in Livelink. For
node types that have been enabled with the feature, which is off by default and can be
enabled per node type in the administration pages under WR Trigger Administration, the
WebReport developer can choose to initiate a WebReport for the following Livelink events:
• Add Version
• Category Update
• Create
• Delete
• Move
• Update
When an item is "Deleted" using the function menu one of two things can happen. The item
might be truly deleted and so completely removed from the database, or the item might be
moved to the Recycle Bin or Undelete Volume. The behavior will depend on how specific
subtypes (Documents vs. Folders etc.) are configured with these modules. The Delete trigger
only fires on a true database delete - i.e. when items are destroyed. If it is required to trigger a
WebReport based on a "function menu delete" that results in the item being moved to the
Recycle Bin or Undelete Volume, the Move trigger event must be used. Logic can then be
used in the WebReport (simply use NODEINFO:PARENTID /OWNERID) to determine
whether the item was moved to one of these locations or elsewhere in Livelink.
When a root node (a container with other items in it) is copied, moved or deleted, the trigger
occurs on the root node only. No WebReport will be initiated for individual sub items. If a
WebReport needs to be initiated for each specific item, it can be achieved using a query that
takes the node that initiated the trigger to find all the children, then use a subWebReport to
implement the specific behavior - e.g. trigger a workflow.
All triggers are initiated after the event has occurred with the exception of Delete. For
example, if using [LL_REPTAG_TRIGGERID NODEINFO:PARENTID /] in a WebReport that
has been initiated by a Move trigger event, the objectid of the new parent will be returned (see
[LL_REPTAG_TRIGGERORIGPARENTID /] for accessing the original). With the delete
trigger, the event is fired just before the delete so that we have the maximum meta data
available. Once a node is truly deleted, it no longer exists and so has no valid meta data.
Page 162
WebReports User Guide
When a document is added to Livelink, both the Create trigger and the Add Version trigger are
fired. This is because Livelink sees this as two actions. First a node creation occurs and once
the node is created a new version (in this case version 1) is added to that node. If a folder
were added, only the Create trigger would fire.
The WR Trigger feature now supports triggering based on User or Group events. This can be
configured in the administration pages under User/Group WR Trigger Administration. The
WebReport developer can choose to initiate a WebReport based on the following User/Group
events:
• Create User/Group
• Delete User/Group
• Update User/Group
• User Login
When the Global checkbox is selected, anytime one of the selected trigger events is triggered
within Livelink (regardless of who executed it), the specified WebReport is executed.
Otherwise if a User or Group is specified (Global checkbox is off) the WebReport will execute
if the trigger event happens within the group or to the user. For example, if creation, deletion,
addition, etc. happen in the group (not explicitly on the group itself) then the WebReport will
initiate. For a user, the trigger event needs to happen on the user. This means that not all
trigger events are relevant to users and so they are ignored. In the screen-shot below, the
Admin user would need to be deleted for the 'Delete User/Group' trigger event to fire.
• [LL_REPTAG_TRIGGER /]
• [LL_REPTAG_TRIGGERID /]
• [LL_REPTAG_TRIGGERNEWID /]
22.4 Example
Initiate a workflow and attach a document to it when a new item is created.
Page 163
WebReports User Guide
• Set the WebReport destination to the workflow you wish to initiate (Properties ->
Destination).
• Open the WR Trigger tab (Properties -> WR Trigger) on a folder above where the
item will be created, select the WebReport to be executed and select the Create
event as the trigger.
• In the WebReport set the item that initiates the event to be attached to the workflow.
Do this by editing the reportview and using [LL_REPTAG_TRIGGERID
SETWFATTACH:COPY:INHERITATTRS:MERGED /]. TRIGGERID is the id of the
object that initiated the event and SETWFATTACH:COPY:INHERITATTRS:MERGED
copies this node to the attachments folder merging the categories of the node with
those of the attachments folder.
Note: Rather than initiating a workflow, the WebReports destination tab could be set to send
an email. To attach the item that fired the event to the email destination use
[LL_REPTAG_TRIGGERID /]. It's worth noting that SETWFATTACH and SETEMAILATTACH
can be used multiple times to attach several items to the destination.
Page 164
WebReports User Guide
23 WR Services
23.1 Overview
The WR services feature provides a way of retrieving information from the WebReports
engine. One of the most useful examples of this is a service that allows tags and sub-tags to
be specified in a request that returns the resulting data without the need to create a
WebReport or ActiveView object. This capability provides a way to leverage the vast number
of useful functions that are available through the WebReport engine's sub-tags and static
tags. A single call to the WR service feature can be used to bring back the result of a tag (or
literal data) processed through a virtually unlimited list of sub-tags. For example, a service call
could be made to return category or attribute information using the CAT sub-tag.
The result of a service call can simply be returned as text directly to the client that invoked the
feature, or it is possible to specify formats just as XML or JSON. If XML or JSON are used to
return data from a service call, the content is accompanied by an error field that allows any
client application to programmatically check for errors. This feature is particularly suited to
being invoked via AJAX calls, especially if the JSON response type is used. The ActiveView
or WebReports software includes a pre-defined JavaScript function that provides an easy way
to invoke these services using AJAX.
This is an example of invoking a tag/sub-tag lookup service using a simple GET type URL.
<prefix>?func=webreports.runservice&servicetype=gettagdata&tagdata=<TAGDATA>&
statictag=<STATIC TAG name>&subtags=<SUBTAGLIST>
Note:
In some cases it is necessary to include a percent sign (%) in the request being sent to WR
Services. To avoid this percent sign being interpreted as URL escaping, it is necessary to use
a URL code to specify a percent sign. Specifically, wherever % is required, %25 must be used
as this code will be resolved to a percent sign.
Page 165
WebReports User Guide
gettagdata Definitions
&func=webreports.runservice
&servicetype= Description/Parameters
This service allows the execution of static tags and or sub-tags from the
WebReports engine to be invoked directly. This capability provides a way to
leverage the vast number of useful functions that are available through the
engine, particularly with the ability to access the 60+ sub-tags and several static
Gettagdata
tags. Many of the sub-tags provide the ability to access some useful Livelink
functions such as looking up categories and attributes, testing group
membership and even performing Livelink actions (subject to normal
permissions controls). See next table (gettagdata Definitions).
This service returns all appropriate static values from the WebReports engine in
a data structure according to the responsetype parameter; however, only the
Getstatictags json responsetype is currently supported. Static tags are all of the tags in the
WebReports tag guide that come under the heading of "data tags" and which
have fixed names such as: [LL_REPTAG_DATETIME /].
This service provides a simple list of all the static tags that are available for
Liststatictags usage in the gettagdata and getstatictags services. It is primarily used for the
convenience of developers.
Page 166
WebReports User Guide
RESPONSETYPE Definitions
TAGDATA Yes (if no STATIC This parameter can be used to specify data to be
tag is specified or operated on by any specified sub-tags. If a statictag has
STATICTAG returns also been specified, the tagdata will be ignored unless
an empty string) the static tag returns a blank string. This allows the
tagdata to be used as a default value for situations
where the static tag doesn't return a useful value.
This parameter can be used to specify one of a
STATICTAG Yes (if TAGDATA is selection of WebReports static tags that can be invoked.
not specified) If the specified tag returns a blank string, then the value
of tagdata (if any) will be used instead, otherwise, the
output from the statictag is used by any sub-tags that
have been specified. The static tag parameter does not
require the full WebReports syntax; only the static tag
name is used. For example, the [LL_REPTAG_USERID
/] tag would be invoked using:
&statictag=USERID
Note that WebReport services only supports a small
subset of the available static tags. In general, any static
tags that are used to return information about an
executing WebReport, will not be valid as there is no
WebReports object associated with a service call. To
find out which static tags are available, you can use the
special liststatictags option as follows:
<prefix>?func=webreports.runservice&servicetype=
liststatictags
Specifies a list of sub-tags and their fields, just as they
SUBTAGS Yes would be used in a WebReports tag syntax. E.g.
&subtags=NODEINFO:NAME UPPER
Page 167
WebReports User Guide
xml <?xml version="1.0" text/xml Content is HTML escaped. E.g. & = & etc.
encoding="ISO-8859-1" ?>
<response>
<error>false</error>
<content>This is a
test</content>
</response>
If this file is being included into a WebReport or ActiveView the LIBPATH tag can be used like
this:
The following table describes the available function and its parameters.
servicetype Mandatory This parameter expects a string with one of the supported servicetypes
for running a WR service (as specified in the table above).
responseTarget Mandatory This parameter expects either a JavaScript function that has been
created by the developer, or a string representing the ID of an HTML
object where the returned data should be inserted. If a JavaScript
function is created (and passed to this parameter) it should be written
to accept the http_request as a parameter. For example:
Page 168
WebReports User Guide
function myHandlerFunction(httpRequest) {
alert('the response was: '+ httpRequest.responseText);
}
executeWRService( 'gettagdata', myHandlerFunction,
"&statictag=userid &subtags=USERINFO:GROUPID", 'json')
responseType Optional This parameter expects a string with one of the supported response
types for WR services (string,json,xml - as specified in the table
above). It not specified, it defaults to json.
getPost Optional This parameter can be used to specify whether the AJAX request
should be GET or POST. If omitted, the POST method is used.
23.4 Examples
Example 1
This example shows two different ways to call the gettagdata service using the predefined
function: executeWRService. In one instance, we have written a special function called
handleServiceJSON which is designed to "eval" the JSON data (convert the JSON data to
Javascript objects) and use the resulting JavaScript structures to display the result of the
request. In this request we are using &tagdata= with a data ID and then using the
NODEINFO:NAME sub-tag variation to lookup the name of an item. Note that as we
requested a responseType of 'json', the resulting data structure includes a field called "error"
which indicates whether we have valid data or not. In the handleServiceJSON function, we
use this field to determine whether to alert an error or to display the content. In the second
instance (the get URL button) we simply pass the name of an HTML object on the page.
When the request returns from Livelink, it automatically inserts the resulting text into the
specified HTML component. Because we simply want text dumped into the page (and we
don't plan on analyzing the response for errors or handling it programmatically) the
reponseType of 'string' was selected in this example.
function handleServiceJSON(request) {
var rt = request.responseText;
var jsvar = eval('(' + rt + ')')
var error = jsvar.error;
var content = jsvar.content;
if (error == 'true') {
alert('error text is: ' + content);
} else {
alert('Object name is:' + content);
}
Page 169
WebReports User Guide
function getName(did){
did = document.getElementById('dataid').value;
getNameParms = '&tagdata=' + did + '&subtags=nodeinfo:name';
executeWRService( 'gettagdata',
handleServiceJSON,getNameParms,'json');
}
function showURL(did){
did = document.getElementById('dataid').value;
getURLparms = '&tagdata=' + did + '&subtags=LLURL:OPEN';
executeWRService('gettagdata', 'displayname',
getURLparms,'string');
}
</script>
Example 2
This example shows the use of the getstatictags service. The service is invoked using the
executeWRService function (in ajax.js). Besides using the identifier 'getstatictags' to select
the correct service, a function called handleStaticTags (specifically written for this sample
application) is passed to the executeWRService function which in turn, sets up a request to
Livelink. The request is setup so that when the request returns from Livelink, the
handleStaticTags function is called. In this example, we've written code in
handleStaticTags to take the JSON structure from the request.responseText, convert it to a
JavaScript structure and then traverse this structure in order to show all the static tag values
that were returned from Livelink.
function handleStaticTags(request) {
var rt = request.responseText;
var jsvar = eval('(' + rt + ')')
var error = jsvar.error;
var content = jsvar.content; // This should be an array of
tags
if (error) {
alert('error text is: ' + content);
} else {
tempStr = '';
for (tag in content) {
tempStr += tag + ' = ' + content[tag] + '<br>';
}
document.getElementById('display').innerHTML = tempStr;
}
}
Page 170
WebReports User Guide
function getStaticTags(){
</script>
<input type=button value="Get Static Tags" onclick=getStaticTags()>
<hr>
<DIV ID="display">
</DIV>
Page 171
WebReports User Guide
24.1 Overview
Although WebReports provides a number of tags to control what is included and excluded in a
WebReport, there remain tasks that demand the power of a fully fledged scripting language at
the server, before the report reaches a client. In WebReports version 4.0 onwards, the
optional ability to embed a section of script within a reportview was provided.
This feature offers tremendous power and flexibility for reporting or web application
developers. As with many powerful features, it follows that this capability also has potential
risks if used improperly. To reduce these to a minimum, WebReports scripting has been
carefully secured and constrained in a configurable way that allows each Livelink instance to
choose precisely which script features should be enabled and which not.
Presently the only script language supported is Oscript. Oscript has the advantage of running
natively on the Livelink platform and hence offers excellent performance. Although technically
it is not required for creating WebReports with Oscript, developers with access to the Livelink
SDK will benefit from the Livelink Builder’s debugging facilities. In practice, for anything but
relatively simple scripts, access to the Livelink Builder debugger will be essential to allow
developers to step through their code and debug it.
This user guide explains how to implement a script within a WebReport, but does not cover
how to write Oscript or provide a reference for Oscript syntax. For more information about
Oscript consult the Livelink SDK documentation such as the Livelink Builder help, or contact
Open Text for details of Livelink SDK training.
24.2 Security
There are a number of layered security measures to ensure that WebReports scripting is as
safe as possible:
1. If not required, the entire feature can be turned off globally by the Livelink
Administrator. Users may wish to check with their Administrator that the feature is
active before attempting to use it.
2. Even if the feature is on globally, it must be enabled for each individual WebReport
that uses it, every time a new reportview version is added to the WebReport. Any
user who can create a WebReport can include the tags to define and call scripts it but
the tags will remain disabled until a System Administrator reviews and enables
scripting for the report. Disabled reports will run but will ignore and not execute
scripts.
3. The functions available within Oscript are heavily restricted by default. For example
you may not access Global variables or many of the Builder built-in packages such as
CAPI, DAPI, File, etc. What is and is not available can be configured by the Livelink
Administrator.
Only users with the “System Administration Rights” privilege have the ability to enable
scripting for a particular WebReport. There are three different ways of doing this:
Page 172
WebReports User Guide
1. Add the new Reportview version. When a System Administrator adds a reportview
containing scripting it is automatically enabled.
2. Go to the Properties -> Specific tab for the WebReport and check the “Oscript
Scripting Enabled” checkbox which will appear if scripting is present in the reportview.
Clearly, users without the “System Administration Rights” privilege will find developing a
WebReport that contains scripting a tedious process since each new version of their
WebReport will need to be enabled by someone who does have that privilege. This is one
reason why it make sense to develop scripted WebReports on a non-production instance
where the developer may be granted the “System Administration Rights” privilege. See 24.3.
The only exception to this is that any user may create a WebReport from a default reportview
that contains oscript and it will be enabled automatically without the need for a System
Administrator to enable it. If the reportview for the WebReport is later edited or a new version
added, then its oscript will be disabled unless re-enabled by a System Administrator.
Because default reportviews are “pre-enabled”, it is essential that any reportviews containing
oscript that are to be made default reportviews (by placing them in the default reportview
folder – See the WebReports Installation and Administration Guide) must be tested and
approved.
Oscript Restrictions
WebReports uses a scheme of restrictions to make Oscript in the reportview more secure.
These are:
• No ability to use parenthesis like this .() to evaluate the contents of a variable. For
example you cannot do this as .(s) is not permitted:
Assoc myAssoc
String s = 'item1'
myAssoc.item1 = 'first item'
echo ( myAssoc.(s) )
• Some functions within certain restricted Builder Packages are permitted (see list
below).
The following Builder Packages are permitted by default. However the Livelink Administrator
can chose to add anything to or remove anything from the permitted list of Packages or
Package functions.
Permitted packages: 'Assoc', 'Bytes', 'Date', 'List', 'Math', 'Pattern', 'RecArray', 'Str', 'String',
'Boolean', 'Undefined', 'Void', 'Integer', 'Real', 'Record'
Page 173
WebReports User Guide
Once in place on the production instance, a System Administrator should use the
WebReports admin page “Manage WebReports Scripting” to review all the reports and enable
them if they are satisfied that the reports and in particular the scripting aspects are safe. The
kinds of pitfalls to check for are:
• Possibility of infinite loops which could tie up threads on the Livelink server.
• Lack of checks for undefined data or passed parameters (i.e. the script must check
for and handle undefined parameters).
The first two of these represent the risks with the greatest potential to impact Livelink.
[LL_WEBREPORT_STARTSCRIPT NAME:myFunc /]
function String anyName(Dynamic c)
String s = 'Testing'
return s
end
[LL_WEBREPORT_ENDSCRIPT /]
When called, this simple script returns the string ‘Testing’ to the reportview. The string will be
inserted into the resulting report output where the call to the script was made. To call the
script use:
[LL_WEBREPORT_CALL NAME:myFunc /]
Page 174
WebReports User Guide
This tag will cause the script named myFunc to be executed and any result returned by it to
be inserted into the report output in place of the tag. Scripts can be called from anywhere in
the reportview.
Data as passed to the WebReport from the data source may be accessed from within the
script. The first parameter passed to the first Oscript function declared in the script will
always be an Assoc called the “Context”. If there is a data source for the WebReport, the
Context Assoc will contain a key called “data” holding a RecArray (a two-dimensional array)
which will represent all the data passed to the WebReport by the data source.
[LL_WEBREPORT_STARTSCRIPT NAME:myFunc /]
function String anyName(Dynamic context)
String cell = ""
if isDefined (context.data) // check there is a data source
cell = context.data[1][1] // return the first cell of data
end
return cell
end
[LL_WEBREPORT_ENDSCRIPT /]
Note the check that context.data is defined. If there had been no data returned by the data
source (or no data source at all) context.data would be undefined and failing to check for it
would result in the entire WebReport failing to continue processing. The script is always
responsible for checking that the data it expects has in fact been passed.
Passing Parameters
When calling a script you may explicitly pass any number of parameters. For example the
following passes three parameters:
Parameters containing spaces can be delimited with double or single quotes. The
parameters are passed to the first function declared in the myFunc script. They appear as an
Oscript List of values in the second parameter (after the Context Assoc). For example:
[LL_WEBREPORT_STARTSCRIPT NAME:myFunc /]
function String anyName(Dynamic context, List args)
String s
s = args[1] + "-" + args[2] + "-" + args[3]
return s
end
[LL_WEBREPORT_ENDSCRIPT /]
Page 175
WebReports User Guide
Example
The following example reportview illustrates how to access the data in the Context Assoc and
also how to explicitly pass a parameter to a script. This report will display all the data from a
data source regardless of how many columns that data source might return.
[LL_WEBREPORT_STARTSCRIPT NAME:doRow /]
Function String doRow (Dynamic c, List args)
Integer row, col
String s =''
row = Str.StringToInteger(args[1])
if isDefined(row)
for col=1 to length(c.data[1])
s+= Str.Format( '<TD>%1</TD>', c.data[row][col])
end
end
return s
end
[LL_WEBREPORT_ENDSCRIPT /]
[LL_WEBREPORT_STARTSCRIPT NAME:doRowHeader /]
Function String doRowHeader (Dynamic c, List args)
String field
String s =''
List fields
if isDefined(c.data) // check there is data
fields = RecArray.FieldNames(c.data)
for field in fields
s+= Str.Format( '<TD>%1</TD>', field)
end
end
return s
end
[LL_WEBREPORT_ENDSCRIPT /]
<TABLE>
<TR>
[LL_WEBREPORT_CALL NAME:doRowHeader /]
</TR>
[LL_WEBREPORT_STARTROW /]
<TR CLASS="[LL_REPTAG_ROWNUM ODDEVEN:Browserow1:Browserow2 /]"
VALIGN="CENTER" NOWRAP ALIGN="LEFT">
[LL_WEBREPORT_CALL NAME:doRow PARM:[LL_REPTAG_ROWNUM /] /]
</TR>
[LL_WEBREPORT_ENDROW /]
</TABLE>
For example, you may need to know the value of a WebReport constant or parameter.
Although you could arrange to pass these items as parameters at the time the script is called,
Page 176
WebReports User Guide
you can also access them directly using the built-in “dot function” ._repTag which has the
following syntax:
Parameters:
tag - A string value representing the tag plus optional sub-tags
Returns:
A String value containing the final value of the specified tag and sub-tags.
Here are two examples which return the value of a WebReport constant called “report”:
Note that you may specify either the full tag name or a shortened version which omits the
opening [LL_RETAG_ and closing /]. Here are some further examples:
Note that not all sub-tags are supported when used within ._repTag. Generally sub-tags that
cause some other action besides returning formatted data do not work. The following sub-
tags are not supported: ADDVAR, CONCATVAR, NEXT, PREV, SETFORM, SETVAR,
SETWFATTR, SETWFFORM.
Parameters:
data - A String value to be operated on by the sub-tags
subtags - A String containing the sub-tags to use on the data
Returns:
A String value containing the result of the data transformed by the sub-tags.
String s = ._subTag('3','DECODE:1:Beginning:2:Middle:3:End:Other
UPPER')
Note that not all sub-tags are supported when called by ._subTag. Generally sub-tags that
cause some other action besides returning formatted data do not work. The following sub-
tags are not supported: ADDVAR, CONCATVAR, NEXT, PREV, SETFORM, SETVAR,
SETWFATTR, SETWFFORM.
Page 177
WebReports User Guide
Parameters:
nodeid - A String or Integer value specifying the nodeid of the report to run
parms - An optional String containing the parameters to pass to the sub-
WebReport. The required format is
'PARM:myParm1:myVal1 PARM:myParm2:myVal2' etc.
option - An optional String value of either “output”, “data” or “all” selecting the
required form of the results (see below); defaults to “output”.
Returns:
In all cases an Assoc is returned with a key “ok” holding a Boolean value that
is TRUE if the call was successful. If unsuccessful there is a further key “err”
containing an error String. If successful, the additional keys are as follows:
There follows an example which takes a nodeID (DataID) from the data source and uses it as
a parameter when calling a sub-WebReport. The script checks the sub-WebReport call was
successful and either outputs the result or an error message:
[LL_WEBREPORT_STARTSCRIPT NAME:callSWR /]
Function string callSWR(Dynamic c)
Assoc result
String parm = Str.Format('PARM:inputlabel1:%1', c.data[1].DataID)
if result.ok
return result.output
else
return result.err
end
end
[LL_WEBREPORT_ENDSCRIPT /]
[LL_WEBREPORT_CALL NAME:callSWR /]
In this example ._repTag is used to return the value of a constant that points to the sub-
WebReport required.
Page 178
WebReports User Guide
Note that multiple oscript functions may also be declared within a single script block (i.e.
between [LL_WEBREPORT_STARTSCRIPT /] and [LL_WEBREPORT_ENDSCRIPT /]).
Functions within the same script block may call each other. However, only the first function
declared in any script block can be called from another script block (or from the reportview
using [LL_WEBREPORT_CALL /]). One can think of a script block as a discrete oscript
feature within the Livelink builder which behaves the same way in this respect. Readers
familiar with JavaScript should note that the rules described here are quite different from
those that apply to JavaScript.
To call another script in the reportview simply preface the name of the script block with a dot
“.”. This is illustrated in the following, somewhat contrived, example that performs an HTML
escape on every item of data in the “Name” column and concatenates them together
separated by semi colons:
[LL_WEBREPORT_STARTSCRIPT NAME:escape /]
function String escape(String input = '')
return Web.EscapeHTML(input)
end
[LL_WEBREPORT_ENDSCRIPT /]
[LL_WEBREPORT_STARTSCRIPT NAME:Main /]
function String anyName(Dynamic context)
String s
Integer i
if isDefined (context.data) // check there is a data source
for i = 1 to length (context.data)
s += .escape(context.data[i].Name) + '; '
end
end
return s
end
[LL_WEBREPORT_ENDSCRIPT /]
[LL_WEBREPORT_CALL NAME:Main /]
Page 179
WebReports User Guide
25 WR Power View
25.1 Overview
WR Power View is an option available in form templates that allows developers of WebForms
to quickly leverage WebReports' unique ability to lookup and manipulate data from different
sources but in the context of a form.
• Native support for existing form tags like [LL_FormTag_1_1_2_1 /] and [LL_FUNC /]
meaning that Power Views are backwards compatible with HTML views. To leverage
this capability, simply download the latest version of your form view and add it as a
reportview version to a new WebReport added from the WR Power View option.
• Full support for WebReports static tags, constants and parameters which can be
used together with form tags.
• Select a WR Power View for a workflow form and use WebReports parameter tags
([LL_REPTAG_& /]) to access information about the executing workflow (e.g. workid,
subworkid, taskid, mapid) then use these to lookup further information specific to the
current step, user or workflow instance.
• From the form template function menu select "Export as HTML" then save the file to
your desktop.
• Go to Properties - Views tab of from template and select "Add View" followed by "WR
Power View".
• When selecting the reportview browse for the file saved to your desktop in the first
step.
• Open the WebReports tag guide and start making immediate use of the 100+ tags
inside your form view.
Note that the WebForms module must be installed for this feature to work.
Page 180
WebReports User Guide
26 Action Sub-tags
26.1 Overview
The term Action Sub-tags describes a set of sub-tags that perform specific actions as
opposed to simply manipulating the data returned by a WebReports tag. The following list
describes the current set of these sub-tags and what they do.
SETVAR Used to take the tag data and set a named variable with it
CONCATVAR Used to take the tag data and concatenate it to a named variable
ADDVAR Used to take the tag data and add it numerically to a named variable
The first three of these action sub-tags are all associated with managing variables.
An action sub-tag can have any number of normal sub-tags to the left of it in the tag syntax.
Any changes to the tag data will be used in the value that is eventually used to perform the
specified action.
Most sub-tags used to the right of an action sub-tag will be ignored. The SHOW sub-tag
(described below) and the CURRENTVAL sub-tag are notable exceptions to this rule.
Page 181
WebReports User Guide
Page 182
WebReports User Guide
27.1 Overview
JavaScript Object Notation (JSON) represents an efficient way of specifying data to be sent
from servers to browser-based client applications. The actual syntax used to create a JSON
data set is not important as long as the server software builds it correctly. In most, if not all,
cases, the JSON structure is immediately evaluated in the browser client, usually using the
JavaScript eval() function which converts it into a normal JavaScript object/array type
structure. The main benefit of this feature is that it minimizes bandwidth and overhead
between the server and client. JSON allows an object to be encapsulated in a way that can
be understood by humans and swiftly parsed by software applications. It is particularly well
suited to the exchange of data between clients and servers using AJAX type technology
(asynchronous messaging requests). As of Livelink 9.7.1, JSON is used to aid in sending
container browse-related data through AJAX calls.
To support this technology, WebReports provides a mechanism that allows much of the data
normally retrieved using individual WebReports tags, to be delivered as a JSON structure.
In other words, there will be various fields at the top level of the object, followed by an
optional array called myRows that will contain all of the rows of data for a WebReport data
source or the contents of a container for ActiveViews. As described below, there are directives
that allow fields to be added to the top level of the JSON structure (outside of the myRows
array) using WebReports tag syntax, as well as options to add fields/columns to each and
every row in the myRows array based on WebReports tag syntax. In this way, data that is
normally returned in individual WebReports tags to the client can be returned in a JSON
structure to be used in any way the client requires (usually in a web browser, converted to a
JavaScript array).
[LL_WEBREPORT_INSERTJSON /]
This tag can only be used in the Header or Footer parts of the reportview. Unlike the
INSERTJSARRAY content control tag, when this tag is used the row section is processed as
normal. It is not valid to use an INSERTJSON tag in the row section as it can be used to
return all data rows outside of the row section.
The INSERTJSON tag supports multiple "directives" which control what type of data the tag
will return. Each directive is proceeded by a "@" sign. This differs from other content control
tags but allows for a very flexible feature set. The currently supported directives are listed in
this table:
Page 183
WebReports User Guide
The data reference is either a simple column name from the data
Page 184
WebReports User Guide
@ROWCOLUMNS newColumn:"[LL_REPTAG=DATAID
CAT:price:amount1:display /]"
@ROWCOLUMNS Column2:"modifyDate"
USERID:"[LL_REPTAG_USERID /]"
Any fields specified by this directive are added to the front of the
existing JSON structure in addition to any existing fields for other
directives. These fields are not added to the myRows array, only
to the top level object.
This directive adds the JavaScript variable and associated syntax
@ADDJSVAR to assign the returned JSON to a variable specified in <var
VAR:<var name> name>. For example, @ADDJSVAR VAR:temp would add the
following to the beginning of the JSON data:
var temp = "json data object"
This directive allows the default text escaping to be modified for
@ESCAPETEXT any text/string fields being used in the INSERTJSON tag.
TYPE:<escape Valid escape types are: standard and escapeurl The standard
type> type uses the standard JSON specification for text escaping. The
escapeurl type uses URL encoding that would need to be
decoded using the JavaScript decodeURI() function.
Page 185
WebReports User Guide
27.4 Example
In this example, a WebReport is using a simplified data source that returns only 3 columns
(parentId, dataId, subType) and 2 rows from the DTREE. Given the following INSERTJSON
syntax:
[LL_WEBREPORT_INSERTJSON
@ADDJSVAR VAR:sampleData
@ALLDATASOURCE
@FIELDS SYSTEMDATE:"[LL_REPTAG_DATE /]"
@ROWCOLUMNS objName:"[LL_REPTAG=DATAID NODEINFO:NAME /]"
supplier:"[LL_REPTAG=DATAID CAT:VendorData:supplier:DISPLAY /]" /]
(Note, carriage returns have been inserted here for clarity but should not be used in the
reportview)
This is the data that would be returned in the WebReport output (to the client):
The following screen shot shows an excerpt of the JavaScript data structure that the client
would build from this JSON data (as viewed from a script debugger).
• A new field called SYSTEMDATE has been added to the object as per the FIELDS
directive.
Page 186
WebReports User Guide
• Two rows (as many as there are rows in the data source) are stored in the array called
myRows. This example shows all three fields that existed in the simple data source
(parentid, dataid and subtype. If the data source had returned all the fields in DTREE then
all of these columns would have been included in the myRows array of data as per the
ALLDATASOURCE directive.
• In addition to the columns returned by the data source, two new columns: objName and
Supplier have been added for each and every row of data. In this simplistic example,
Supplier uses the result of: [LL_REPTAG=DATAID CAT:’Test Category’:’Supplier
Company’:DISPLAY /] for each row to set the data value called “Supplier” in each row of
the array. The objName value is simply looked up in a similar way using the
NODEINFO:NAME sub-tag.
Page 187