ProView Reporting API Reference Manual V4240
ProView Reporting API Reference Manual V4240
Reference Manual
Confidentiality Undertaking
Copyright Wincor Nixdorf International GmbH 2015 - The contents of this document may not be
reproduced, exploited or published, whether in whole or in part, without the prior written permission of
Wincor Nixdorf International GmbH. This also includes translation into other languages.
The copyright applies to all forms of storage and reproduction in which this information is incorporated
including, but not limited to, magnetic memory, computer printouts and visual displays.
Offenders will be liable for damages.
All rights, including rights created by patent grant or registration of a utility model or design, are
reserved.
Right of technical modifications reserved.
Target Group
This manual describes the ProView Reporting Application Programming
Interface. It is intended for advanced users or programmers who want to
create their own reports with ProView. We recommend system administration
knowledge as well as database administration, SQL, and BusinessObjects
Crystal Reports skills.
Before you read this manual we advise you to get an overview of the system
structure and components of ProView (see [System Manual]) and read about
the reports that are delivered with ProView (see [User Manual Console]).
Document Administration
Date of last update: 28. April 2015.
Notational Conventions
Notation Application Example
Italics External cross references "...further information is available in
the manual XYZ for the product
ABC..."
Names of interactive elements "...in the field Bank Sort Code..."
Emphasized italics Internal cross references "...see page 23..."
provide page numbers
B o ld For emphasis "...the module ABC is..."
Buttons, name enclosed in [S ave ]
square brackets
Accessible screen elements "...click on the appropriate ID to...."
Menu items "Select
File -> S ave to "
Non-proportional Source texts <head>
<title>XYZ</title>
</head>
Directory and file names The customer clicks on this link and
the file xyz.htm is opened.
Note
Notes providing additional explanation and tips on how to use the product
more effectively are shown in this format.
Caution
Information critical to operation of the product and the avoidance of faults,
misoperation, and so on is shown in this format.
Prerequisites 3
Hardware .............................................................................................................. 3
Software ............................................................................................................... 3
Installation ............................................................................................................ 3
Architecture 4
Overview .............................................................................................................. 4
Workflow ............................................................................................................... 5
Chapter 4 Example 35
Overview 36
Chapter 5 Appendix 61
List of ProView Manuals 62
This chapter describes the pre-requisites for using the ProView Reporting
Application Programming Interface (API).
The API is designed for creating reports on the monitored network using the
report generator BusinessObjects Crystal Reports XI Release 2 or Busines-
sObjects Crystal Reports 2008, further on referenced to as Crystal Reports.
This chapter contains the following sections:
Introduction on page 2
Prerequisites on page 3
Architecture on page 4
1.1 Introduction
The functionality of ProView can be extended by adding individual menus and
functions to the ProView Console. Besides other functions, reports on the com-
plete monitored network, on sub-networks, and on devices can be added.
The reports delivered with ProView are designed to show you some of the
capabilities of ProView for analysis and statistics.
However, you may want to change these reports to fit the requirements of your
organization, or you may want to create your own reports from scratch. This
can be achieved using the Crystal Reports Designer.
After you have created a report template with the Crystal Reports Designer,
you have to integrate the template into ProView, which means you need to
make the report template known to both the ProView Server and to the
ProView Console. These steps are described in the following chapters.
Restrictions
Reports are a powerful tool for analyzing, abstracting, and presenting your
data. However, you should keep in mind that reports can decrease the
performance of the monitoring system when used on a large amount of data.
Last but not least, please keep in mind that ProView is not designed as a
data mining tool, but as a monitoring system.
1.2.1 Hardware
The hardware requirements are described in the [System Manual] in chapter
"System Requirements".
1.2.2 Software
The software requirements are described in the [System Manual] in chapter
"System Requirements".
License required
Please note that you need to obtain a license for Crystal Reports.
Otherwise, you will not be able to create or modify any report template.
1.2.3 Installation
The installation is described in the [System Manual] in chapter "System Instal-
lation".
1.3 Architecture
1.3.1 Overview
The following image shows the global architecture of the ProView reporting
system:
As mentioned before, you create a report template with the Crystal Reports
Designer. The data that is used for creating a report is stored in the ProView
database. However, you can collect data from any source, as long as Crystal
Reports supports that source.
After the report template has been created you add information about the new
report to the Functions Managers registry on the ProView Server. If reporting
has not been configured before, you also activate the Crystal Reports function
provider for the Functions Manager.
Next, you specify a new individual function for the report with the ProView Con-
sole. The individual function has to be added to all device profiles and to all
user profiles for which the report should be available.
Finally, the reports can by displayed using the ProView Console.
This chapter describes how you can create and edit report templates with the
Crystal Reports Designer.
It contains the following sections:
Creating an ODBC Database Connection on page 8
Creating a New Report Template on page 12
Editing an Existing Report Template on page 19
Parameters on page 21
If you want to use an ODBC connection for accessing the ProView database,
configure the connection in Windows:
1 Click on S t ar t S e t t i n g s C o n t r o l P a n e l Ad m i n i s t r a t i v e To o l s
Da t a S o u r c e s ( O D BC ) to open the ODBC configuration dialog:
4 Select the appropriate database driver from the list, for example "SQL
Server" if you want to connect to a Microsoft SQL Server database.
5 Click on [ F i n i sh ] to open the first connection properties dialog:
6 Enter the logical name for your ODBC connection into the Name field, for
example "proview".
7 Select the database servers computer name from the Server list, or enter it
into the field, for example "dbserver".
12 If more than one database exists in the database system (which is very
likely), activate the Change the default database to option and enter the
name of the database into the text field, for example "proview".
3 Expand the Create New Connection branch in the Available Data Sources
box. A list of available database drivers is displayed.
5 A dialog box is displayed where you can enter the required connection
information. For the ODBC (RDO) driver, a data source selection dialog is
displayed:
6 Select the correct ProView database connection from the Data Source
Name (DSN) list, for example "proview".
Remember that you have to configure the DSN you want to use before you
start the creation wizard (see section Creating an ODBC Database
Connection on page 8).
7 Click on [ N e x t ] to open the connection information dialog:
You can now continue with creating a new database query. This is described in
the next section.
14 Enter a valid SQL query command into the left text field, for example the
command in the image above. If you want to insert variable parameters into
the SQL command, follow these steps:
b Enter the parameter ID into the Parameter Name field, for example
"startdate".
c Enter an optional text that should be displayed in the Crystal Reports
Designers preview window into the Prompting Text field, for example
"Start Date".
d Select the parameter type from the Value Type list box, for example
"Date".
e Enter an optional default value that should be displayed in the Crystal
Reports Designers preview window into the Prompting Text field, for
example "1/1/2009".
f Click on [ O K] to save the parameter.
g Repeat steps a to f until you have defined all required parameters.
h To insert a parameter into the SQL command, put the cursor to the
correct location and double-click on the parameter name. The
parameter is inserted and represented by the string "{?<parameter
name>}".
15 After you have finished entering the SQL command, click on [OK ] to save
it.
The new query is now executed immediately to verify its syntax. Therefore
it is required that you enter example values for the parameters:
You can now edit the new report template in the Crystal Reports Designer as
described in section Editing an Existing Report Template on page 19.
Please refer to the [Crystal Reports User Manual] for instructions about the
Field Explorer.
Of course you can omit list entries that your applications do not support or that
you do not want the users to be able to select.
Example Your system language is set to "English", and you have specified the lan-
guage-dependent parameter "conn_time@@1296@".
ProView detects the parameter and searches the database: "select mes-
sagetext from message0001 where textno = 1296 and texttype
= 11". This returns the text "Effective Connection Time".
ProView replaces the parameter "conn_time@@1296@" in the report with the
text "Effective Connection Time".
This chapter describes how you can configure ProView for using the report
templates.
It contains the following sections:
Overview on page 26
Enabling Reports in the ProView Server on page 27
Configuring a Report Function on page 28
3.1 Overview
The general procedure for enabling reporting in ProView is as follows:
1 Enable the reporting component for the ProView Server in the ProView
registry. This is described in section Enabling Reports in the ProView
Server on page 27.
2 Configure every report as individual function in the ProView registry. This is
described in section Configuring a Report Function on page 28.
3 Configure every individual report function in the ProView Console. This is
described in section Specifying an Individual Function on page 32.
4 Assign individual report functions to the user profiles in the ProView
Console. This is described in section Granting User
Permissions on page 32.
5 Assign individual report functions to the device profiles in the ProView
Console. This is described in section Extending the Device
Profile on page 33.
Restart required
After you have finished integrating and configuring the reports, be sure to
restart the ProView Service in order for the changes to take effect.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport]
"ReportTargetPath"="C:\\ProgramData\\Wincor Nixdorf\\Proview\\Data\\
Reports\\Output"
"ReportTemplatePath"="C:\\ProgramData\\Wincor Nixdorf\\Proview\\Data
\\Reports\\Templates"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\200]
"ReportName"="StateAtSystemDown.rpt"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\200\Parameters\1]
"value"="startdate"
"type"="2"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\200\Parameters\2]
"value"="enddate"
"type"="7"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\200\Parameters\3]
"type"="4"
"value"="outputformat"
Parameter Name
Range Default Meaning Vers. D C
<Function number>
Dependencies:
1 The function number of the report has to be unique in ProView and has to
correspond to the function number specified in the ProView Console.
Parameter Name
Range Default Meaning Vers. D C
ReportName
Dependencies:
1 The report name has to correspond to the name you have selected in the
Crystal Reports Designer for the report template.
Parameter Name
Range Default Meaning Vers. D C
Type
Value
Dependencies:
1 The parameter name has to correspond to the parameter name you have
chosen in the report template created with the Crystal Reports Designer.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\1000\Parameters\1]
"value"="startdate"
"type"="2"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\1000\Parameters\2]
"value"="enddate"
"type"="7"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\1000\Parameters\3]
"type"="4"
"value"="outputformat"
Range of numbers
The text numbers 1 - 99,999 are reserved for internal use. Please use the
text numbers from 100,000 - 999,999 for your purposes.
You also should never edit the internal texts, since they are adapted to the
ProView sample reports and will be overwritten during the next ProView
update.
4.1 Overview
Suppose you want to create a report on the numbers of defined basedata for
all devices in your network, to see which device might need some more base-
data.
The report should support the English and the German language, since your
organization is located in Valletta, Malta (English) and Frankfurt, Germany.
Follow the instructions in the next sections and you should get a report that ful-
fills your needs and can be issued by all permitted users.
6 Enter the password for the database user, for example "1pizza2go".
7 Click on [ f i n is h ] to close the dialog and return to the wizard:
11 Click on [ F i n i s h ] and continue with the steps described in the next section.
4 Click on "id: String [16]", hold down the mouse button and drag/
drop the parameter to the left side of the reports Details area.
6 Note that the names of the parameters have been inserted additionally as
text fields into the Page Header area. Right-click on them and delete them,
since you should insert language-dependent parameters here.
7 Click on the separator line between the Page Header area and the Details
area, hold down the mouse button and expand the Page Header area a
little bit.
8 Move the "Print Data" field to the top of the Page Header area.
9 Right-click on Parameter Fields in the Field Explorer and select Ne w from
the context menu.
10 Enter "head_device@@100000@" into the Name field. This adds the
language-dependent parameter "head_device" with the text number
"100000" to the report (see section Language-Dependent
Parameters on page 24).
11 Click on [OK ] to save the parameter.
12 Right-click on Parameter Fields in the Field Explorer and select Ne w from
the context menu.
13 Enter "head_basedata@@100001@" into the Name field. This adds the
language-dependent parameter "head_basedata" with the text number
"100001" to the report (see section Language-Dependent
Parameters on page 24).
14 Click on [ O K] to save the parameter. The Field Explorer should now look
like this:
19 You may want to switch to the preview page to see the output of the report:
14 Select the entry "Output Format" from the Name list box.
15 Select the entry "Please select an output format." from the
Tooltip list box.
16 Select the entry "Value list" from the Type list box. The layout of the
Parameter Details area changes to let you specify the list entries:
22 Enter the entry value "1" into the text field of the dialog.
23 Click on [ A d d ] to create a third list entry.
24 Select the entry "XLS" from the list box beneath the List entries table.
25 Enter the entry value "2" into the text field of the dialog.
27 Click on [S ave ] to store the definition in the ProView database and the
funcion ID will be generated automatically; you can see the function ID for
cash statistics is 2005:
14 Right-click on the "1" key and select N ew S t r i n g Val u e from the context
menu.
15 Enter "type" as the new value name.
16 Right-click on the "type" value and select M o d i f y from the context menu.
17 Enter "4" into the Value data field. This is the type of the record template
parameter that you have created in section TODO.
18 Right-click on the "1" key and select N ew S t r i n g Val u e from the context
menu.
19 Enter "value" as the new value name.
20 Right-click on the "value" value and select M o d i f y from the context
menu.
21 Enter "outputformat" into the Value data field. This is the name of the
record template parameter that you have created in section TODO. The
registry editor window should now look like this:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport]
"ReportTargetPath"="C:\\ProgramData\\Wincor Nixdorf\\Proview\\Data
\\Reports\\Output"
"ReportTemplatePath"="C:\\ProgramData\\Wincor Nixdorf\\Proview\\Data
\\Reports\\Templates"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\2005]
"ReportName"="BasedataStatistics.rpt"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\Proview\CurrentVersion\
Common\PVFUNC\Provider\CmdCrystalReport\Functions\2005\Parameters\1]
"type"="4"
"value"="outputformat"
5 Select "PDF" from the Output Format list box to generate a PDF file.
6 Click on [ F i n i s h ] . The report is now generated as described in section
Workflow on page 5.
7 After the report has been generated and transferred to the Console, the
output dialog is displayed, showing the report: