You are on page 1of 8

ImproNet Custom Reports

QUICK START GUIDE

Scope of Document
This document gives a brief overview of the creation of web reports
using ImproNet’s Custom Reports feature. These Reports make use of
your own controls and SQL queries.

Document Conventions
We use the following conventions in this document:

Note – points out extra information.

Tip – points out alternative methods to perform a task.

Important – points out important information.

Warning – points out potential danger to you or the


product.

Before You Begin


Have the ImproNet Software Suite V7.66 (or upwards) available.
Use of Tags in Custom Reports

Tags Used in Custom Reports


Use Tags to define different parts and functions of a Custom Report.

 #—used to comment out a line.


 !RPNM—used to define the name of the Report.
 !RPBL—used to define text in the information bubble.
 !SQLC—indicates the SQL query.
 !COLM—assign names for column titles.
 !CTRL—assign controls used in SQL queries representing
variables.

Examples Showing Tags Used in Custom Reports


The following examples show you how to use Tags in Custom Reports.

Setting a Custom Reports Name


Syntax: !RPNM [put text here]
Example: !RPNM [Set the Report Name here]

Setting a Custom Reports Information Bubble


Syntax: !RPBL [put text here]
Example: !RPBL [put in a description of your custom report here]

Setting Column Headings


Syntax: !COLM [put text here]
Example: !COLM["NAME","FIRSTNAME","LASTNAME","DOOR",
"DATE","SQ","DIR","LA","SITESLA","SITENAME"]

IXP365-0-0-GB-00 August 2010 Page 2


Defining a SQL query
Syntax: !SQLC [put SQL query here]
Example 1: !SQLC <SELECT * FROM TERM_ACTION
WHERE TERM_ACTION.TACT_SYSNAME =:CTRL1 AND
TERM_ACTION.AT_TYPENO =:CTRL2 AND
TERM_ACTION.TERM_SLA =:CTRL3
ORDER BY TERM_ACTION.TERM_SLA>

Example 1 has 3 controls. The control name appears next to


the : without any spaces. Also do not put spaces between the
= and the : (or any other conditionals that is <=:CTRL1 or
>:CTRL2).

Example 2: !SQLC <SELECT * FROMABSENTEEISMREPORT


(:CTRL1,'01000000')>

Example 2 uses a stored procedure. Variables passed to the


stored procedure must display in round brackets. There must
be a "," between each variable and an alphanumeric value
must display in single quotations.

Defining Controls for your Custom Report

Rules
 Custom Reports V1.0 supports a maximum of 10 controls.
 If a control is not used remove it from the improcr file or comment it
out.
 DO NOT use spaces except in the SELECT control when defining
the SQL query that populates a drop-down list.

Properties
 TYPE—configure the type of control for use.
 TEXT—creates a text box.
 SELECT—creates a drop-down list.
 DATE—creates a date picker.

IXP365-0-0-GB-00 August 2010 Page 3


 DTYP—select the Data Type represented by the control.
 ALPHANUMERIC—used for all alphanumeric fields.
 NUMERIC—used for all date and numeric fields.
 NAME—name of the control referenced in the main query.
 SQLC—actual value given to a control comes from the result of this
query.
 SQLD—used to populate control of type SELECT. Works with the
SQLC tag.

SQLC and SQLD should only be a simple select query (that is,
select column from table).

 TITL—configure the name that displays next to the control.

The actual control must be between open and close angle


braces (that is <>).

Syntax: !CTRL [define control properties here]


Example 1: (SELECT)
!CTRL<TYPE=[SELECT];DTYP=[NUMERIC];VTYP=
[ALPHANUMERIC];NAME=[CTRL1];SQLC=
[SELECT DISTINCT TERM_ACTION.TACT_NO FROM
TERM_ACTION];SQLD=[SELECT TERM_ACTION.TACT
_NAME FROM TERM_ACTION];TITL=[Sysname =
Control]>

Example 2: (TEXT)
!CTRL<TYPE=[TEXT];DTYP=[NUMERIC];NAME=[CTRL1];
TITL=[Select SQ < CTRL]>

Example 3: (DATE)
!CTRL<TYPE=[DATE];DTYP=[NUMERIC];NAME=[CTRL1];
TITL=[Select Date]>

IXP365-0-0-GB-00 August 2010 Page 4


Creating a Custom Report

1. Open a text file in a text editor.


2. Save the file with an improcr extension. For example,
custom_report_1.improcr.
3. Place the file into the Custom Reports folder. The default path is:
C:\ImproNet\webapps\webreports\customreports.
4. Edit the improcr file.
5. Save and close.

The most important part of a custom report is the SQL query.


If the SQL query is wrong, your report will not work.

Before adding a SQL query to the report, test the query direct
with the Database. For example, if you are using Microsoft®
SQL Server, write and test a query in the Query Analyzer.

When you are sure that the SQL query is correct, add it to the
report. Add controls for each value that you need to change
one-at-a-time. Test the report after each control is added.

If the report is not working, check that all tags have opening
braces ([ or <) and closing braces (> or ]).

IXP365-0-0-GB-00 August 2010 Page 5


Custom Report Example

#=================================================================
#
# <====================================================>
# // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \\
# // *//===================================================\\* \\
# // *// IMPRONET CUSTOM REPORT - PROPERTIES FILE Copyright (c) 2006 \\* \\
# // *// ===================================== Impro Technologies \\* \\
# \\ *\\ //* //
# \\ *\\ //* //
# \\ *\\===================================================//* //
# \\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# <====================================================>
#
!RPNM [Terminal Action Custom Report]
#
!RPBL [THIS IS A CUSTOM REPORT. CREATED AS DEMO]
#
#
!SQLC <SELECT * FROM TERM_ACTION WHERE TERM_ACTION.TACT
_NO =:CTRL1 ANDTERM_ACTION.AT_TYPENO =:CTRL2 AND TERM_
ACTION.TERM_SLA =:CTRL3 ORDER BYTERM_ACTION.TERM_SLA>
#
#
!COLM ["Number","Logical Address","System Name","TypeNo","Name",
"Modified","Site Logical Address","TP Number"]
#
#
!CTRL
<TYPE=[SELECT];DTYP=[NUMERIC];VTYP=[ALPHANUMERIC];NAME=[CTRL1];SQL
C=[SELECT DISTINCTTERM_ACTION.TACT_NO FROM
TERM_ACTION];SQLD=[SELECT TERM_ACTION.TACT_NAME FROM
TERM_ACTION];TITL=[Sysname = Controll]><TYPE=[SELECT];DTYP
=[NUMERIC];VTYP=[NUMERIC];NAME=[CTRL2];SQLC=[SELECT DISTINCT
TERM_ACTION.AT_TYPENO FROM TERM_ACTION];SQLD=[SELECT DISTINCT
TERM_ACTION.AT_TYPENOFROM TERM_ACTION];TITL=[Type No =
Controll]><TYPE=[TEXT];DTYP=[ALPHANUMERIC];NAME=
[CTRL3];TITL=[Terminal Logical Address = Controll]>
#
#=================================================================

IXP365-0-0-GB-00 August 2010 Page 6


Ensure that there are no empty lines, that is there must be a #
at the beginning of a line if the line is not used for report
configuration.

If a control is not used it must be commented out using a #.

IXP365-0-0-GB-00 August 2010 Page 7


Extra Information

Further information is available at the following resources:

 ImproX ECII Hardware Installation Manual (XEC300-0-0-GB-XX).


 ImproX ECII Product Specification Catalogue
(XEC350-0-0-GB-XX).
 ImproNet Software Quick Start Guide (IXP363-0-0-GB-XX).
 ImproNet Software Manual (IXP362-0-0-GB-XX).
 ImproNet WebHelp (IXP393-0-0-GB-XX).

The referenced documents are available for download at


www.impro.net. Alternatively, contact your Impro dealer for a
copy.

User Notes

This manual is applicable to the ImproNet Software Suite V7.66 (upwards)


(The last two digits of the Impro stock code indicate the issue status of the
product).
ImproNet\English Manuals\LATEST
IXP365-0-0-GB-00 Issue 01 Aug 2010 ISSUE\CustomR-swm-en-01.docx

IXP365-0-0-GB-00 August 2010 Page 8

You might also like