Professional Documents
Culture Documents
Nextreportsserver
Nextreportsserver
Nextreportsserver
User Guide
Version 8.1
User Guide
Table of contents
1. Introduction....................................................................................................................................5
1.1. What is NextReports Server................................................................................................5
1.2. System Requirements..........................................................................................................7
1.3. Conventions ........................................................................................................................7
2. Setup ...............................................................................................................................................8
2.1. Download ............................................................................................................................8
2.2. Install...................................................................................................................................9
2.3. Change embedded web server ..........................................................................................14
2.4. Login into application .......................................................................................................16
3. Sections .........................................................................................................................................18
3.1. Dashboard Section ............................................................................................................18
3.2. Monitor Section ................................................................................................................19
3.3. Data sources Section .........................................................................................................20
3.4. Reports Section .................................................................................................................20
3.5. Charts Section ...................................................................................................................20
3.6. Scheduler Section..............................................................................................................21
3.7. Security Section ................................................................................................................21
3.8. Settings Section .................................................................................................................21
3.9. Migration Section..............................................................................................................21
3.10. Analysis Section..............................................................................................................21
3.11. Audit Section ..................................................................................................................22
3.12. Generalities .....................................................................................................................22
4. Management .................................................................................................................................24
4.1. Top & Bottom Bars ...........................................................................................................24
4.2. Entity Browser ..................................................................................................................25
4.3. Data Source Management .................................................................................................26
4.4. Report Management ..........................................................................................................29
4.5. Schedule Reports ..............................................................................................................37
4.6. Alerts .................................................................................................................................42
4.7. Scheduler Job Management ..............................................................................................44
4.8. Chart Management ............................................................................................................45
4.9. Drill Down Charts .............................................................................................................47
4.10. Drill Down Reports .........................................................................................................50
4.11. Advanced Drill Down .....................................................................................................53
4.12. External Drill Down ........................................................................................................54
4.13. Pivot ................................................................................................................................55
4.14. Analysis...........................................................................................................................56
4.15. Security Management .....................................................................................................63
4.16. Dashboard Management .................................................................................................66
4.17. Settings Management ......................................................................................................78
4.18. Data Migration ................................................................................................................83
Chapter
1. Introduction
This paper describes the installation process and the usage of NextReports Server software
application.
Introduction
NextReports Server is a web application which manages data sources, reports, charts, dashboards,
schedules reports to run at specific moments in time and monitors job execution. In full depth the
server structure can be seen in the next image.
The application will work with entities like Data Sources, Reports, Charts, Dashboards, Scheduler
Jobs, Users, Groups and Permissions. A data source entity represents the definition of a connection
to a database and can be one of the following types: Oracle, MySql, MSSql, PostgreSQL, Firebird,
Derby, SQLite, MS Access, Teradata, Pervasive. A data source is used by reports and charts. A
dashboard is a one, two or three column layout where user can add different widgets like charts,
pivots, tables, alarms, indicators and displays (specific reports that can be represented as tables, as
alarms, as indicators or as displays). A report can be scheduled to run at specific moments in time,
resulting entity being called scheduler job. A permission entity is created as a list of rights for
some users and groups
Entities are called referenced if they are used by another entity. So, a data source can be referenced
by one or more reports or charts. A report can be referenced by one or more scheduler jobs. A user
and a group can be referenced by one or more Permissions. A referenced entity cannot be deleted
until all entities that use it are deleted.
NextReports Server has a multi-report engine. Right now, the server can manage reports created
with NextReports designer application and Jasper reports.
At execution time, the reports can be exported in HTML, EXCEL, EXCELX, PDF, DOCX, RTF,
CSV, TSV, TEXT and XML. The generated report can be viewed from web, from retrieved mail, if
one or more sent mails were entered at runtime or can be stored on other computers through
protocols like FTP, SSH, WebDAV or Windows Sharing. The mail can contain the link of the
generated report or an attachment with the report.
NextReports Server allows for report versioning. At every report update a new version is created.
Any version can be set as the current one and can be run. NextReports keeps a full history of
generated reports
To schedule a report, a Scheduler Job entity must be created. This job contains the report
parameters values, the definition of the scheduler (when to run and which frequency) and the list of
destinations where to send the results. Such destinations can be Mail, FTP, SSH, Windows Share,
WebDAV.
Besides reports, NextReports Server supports charts created with NextReports Designer. Such
charts can be previewed from chart management section and can be added to a dashboard to be seen
in real-time. Charts are also versioned.
The server has a default dashboard to add charts and reports, but other dashboards can be created in
the container.
Server has an analysis module which allows users to play locally with data. Data is brought onto
server machine through an ETL process inside a NoSQL database. Users can use this data to create
some analysis (without designer involvement) and export them to excel.
Introduction
1.3. Conventions
Some conventions used in this paper.
Italics
Text written in italics is changeable and must be replaced with something specific indicated in the explanation.
Italics style can be used to emphasize some words or to make some reference on other documents (books, web sites).
Bold
Text written in bold is used to show something of importance, to indicate menu names and graphic components inside
an application frame.
Fixed font
Text written in fixed font is used to show the characters that must be entered, the messages that the system returns,
default values or file names.
File > Save
This shows a menu selection. For example, select File menu, then select Save option.
ATTENTION
This shows that you can obtain unexpected results if you do not follow the instructions
Chapter
2. Setup
2.1. Download
NextReports Server can be downloaded from http://www.next-reports.com .
The selected NextReports Server file for download must be chosen depending on the user
operating system and on the version of java installed on the computer.
For Windows and Linux there are native installers, files with .exe or .sh extensions (see
next image from installation process).
For any other operating system there is a generic installation file with .zip extension.
To test the existence of JVM (Java Virtual Machine) on your computer, you have to open a
command line terminal (a DOS prompt in Windows or a shell in UNIX) and to enter the
following command:
java version
This will show that there is a JVM installed on the computer. If the version is newer than
1.6.0 you can download an installation file which does not contain the JVM (and is smaller
because of that) (for example nextreports-server-setup-5.1.exe for Windows users).
If you have a version older than 1.6.0 or if you receive the following message:
java: Command not found.
This means that you do not have the required java version installed on the computer and
you must choose for download a setup file with JVM inside (for example nextreportsserver-setup-5.1-jre.exe for Windows users)
Setup
2.2. Install
ATTENTION. The installation process must be done as an administrator.
After the setup file was downloaded, if it is a native installer for Windows or Linux, you
can execute it directly to install NextReports Server on the computer. If it is a generic
installation file with .zip extension, you have to unzip the archive to a folder, enter to a
command line terminal and from that folder enter the following command:
java -Xms128m Xmx512m jar start.jar
After selecting destination directory, user must choose also a default location for data
because all the data is kept to a user specified place.
Setup
So when you install a new version you can select the previous data store location and youll
be ready to go without the need of importing from previous version.
ATTENTION. If you want to keep more versions of NextReports Server, you have to
keep also a storage location for every version. Before installation you have to copy
your storage folder to another location and use this folder at installation. If you use
the older location at installation, previous versions of NextReports Server may not
work, because changes in storage structure may be possible between versions.
In next step, user configures some internal ports.
You will have to select two ports which are not used by other applications:
10
Setup
Next, user can choose to install some demo data (a demo database, some reports and charts
and a number of dashboards to show the main functionality).
11
Setup
In the next step, user selects a start menu folder and can create shortcuts.
12
Setup
After the installation process is finished, for Windows installer, the user is asked if he
wants NextReports Server to run as a service and if he wants the server to start on boot up.
The created shortcuts menu contains Start NextServer, Stop NextServer to start and to
stop NextReports server. First time, the start process will take longer because the data
repository is created. For accessing the server, there is also a Open NextServer shortcut
which will start the browser automatically. If the generic installation zip file was used, the
URL address is by default http://localhost:8081/nextreports-server .
First login is done with user admin and password 1. This default user is an administrator
and cannot be deleted. Thats why it is very important to change admins password.
13
Setup
14
Setup
-Djetty.class.path=C:/Users/user.name/.nextserver/reports
15
Setup
At first installation, you can log using user admin and password 1 (one). Be sure to change
admins password after login with anything you like.
If a user forgot his password, a link called Forgot password from login panel can be
used. By clicking it, user is forwarded to a page to enter his application id:
To be able to change password, user must have an email defined into NextReports Server
account, otherwise it wont be possible.
16
Setup
After clicking send, user is redirected to login page and an email will be forwarded to the
specified user mail account. This email contains a link which will forward the user to a
page for changing password:
The link from email is active four hours. If user will click it in this interval and will confirm
his new password, password is changed and user is redirected to login page to enter his new
credentials. If this time expires, password cannot be changed.
Login page can also contain a domain if NextReports Server is integrated in other
applications and it synchronizes its users with external ones. To find more please read the
5.3. NextReports Server Integration section from Advanced Configuration chapter.
17
Chapter
3. Sections
NextReports has eight sections (tabs): Dashboards, Data Sources, Reports, Charts,
Scheduler, Monitor, Security and Settings.
18
Sections
Any widget has a settings action from where it is possible to modify the values of
parameters used. For charts there is also a chart type property. Any widget has an
individual refresh action. Also, a general refresh can be done for a dashboard. The
navigation dashboard panel from the left can be hidden to allow more space for the
dashboard.
History is shown for the current day. If you want to see older history you can select other
date from the calendar to see the history from that day. Also, if you want to see all history
since a day till a selected date you have to select Day range from combo box.
Inside history table user can see if the report was run with success or not, can see what were
the parameters and even the query, and can see the result by clicking url link.
User can also modify number of history entries per page by setting Rows per page field.
User can delete some history entries if he has the right to do it using Delete Selected
button.
19
Sections
Tables: reports with a special table type. These reports can be added to
dashboards as tables.
Alarms: reports with a special alarm type. These reports can be added to
dashboards as alarms.
Indicators: reports with a special indicator type. These reports can be added to
dashboards as indicators (simple gauges).
Displays: reports with a special display type. These reports can be added to
dashboards as displays (simple numbers).
20
Sections
Sections
3.12. Generalities
For Data Source, Report Management and Chart Management, user can create folders to
organize its data.
In every section, except Monitor and Dashboards, user can search for entities.
The search process will look for all entities whose Name Contains a specific text. For
Reports the search can look also in the Description Contains of that entity. Search can
also be Case sensitive or not.
For reports, user can search for tables, alarms, indicators, displays or drill down
reports.
For charts, user can search for those with drill-down. Also for reports and charts user can
look for invalid sqls (queries which are not valid because tables or columns were renamed
or removed) and can search for text inside sql queries using Sql Contains.
22
Sections
A result will show short information about what was searched and all entities that were
found:
23
Chapter
4. Management
4.1. Top & Bottom Bars
Any NextReports Server web page contains a top bar and a bottom bar. The bottom bar
shows in the right corner the current version and build of the application server. The top bar
shows the name of the current user logged. Also, the top bar contains some general actions
for NextReports web application.
Here, the current user can log out and can change his password. To change the password,
user has to enter the old password, the new password and to confirm the new password.
As you will see, in Settings Managementchapter, the logo icon from login and top bar
can be changed.
24
Management
Left side shows the folders entity tree. By selecting a folder, the entity table on the right
side is refreshed with all the entities from that folder.
There are three kinds of actions, user can do (see previous image) :
1) All actions inside the header table menu (Add Folder, Add Next Report, Add Jasper
Report, Rename, Delete and Search) are actions taken for the selected entity tree
folder.
2) All actions from the popup menu over the Actions columns are taken for the
current table entity.
3) By selecting the checkboxes on the first table column, the actions from header table
menu will change. All these actions are bulk actions taken for all selected entities.
25
Management
Name
field is the type of the database to which we will connect. The user can select one of
the following types: Oracle, Oracle-Service, Oracle-Tns Name,MySQL, MSSQL
Server, PostgreSQL, Derby Embedded, Firebird, SQLite, CsvJDBC, JNDI.
Type
field is mandatory and represents the name of the driver java class.
field is mandatory and represents the information needed to locate the database to
which we want to connect.
URL
26
Management
Every jdbc driver has a standard format for this field. The format is printed in bold under
driver field for example mysql has the following format jdbc:mysql://<ip>:<port>/<database>
where the information between < and > will be replaced with particular values.
User
Password
From here, user can choose properties like separator, file extension, suppress headers (if
column names are not inside CSV file), column names and column types:
27
Management
Column names and column types must be separated by comma. Column type can be one of
String, Int, Double, Boolean or Date.
A data source can be modified, deleted, copied or moved. The user who created the data
source and any admin user will be allowed to see this data source and will have full
control on it. To allow other users/groups to use this data source, you will have to add that
user/group through the Security action to a list of permissions. (See security management)
ATTENTION. If JNDI type is selected users can connect to a data source using JNDI.
This requires to use WAR version of NextReports Server inside your application
server.
28
Management
A Next or a Jasper report can be uploaded to server. There is a different Upload action
for both report types.
For Next the user will enter report name, data source used by the report, next report file,
image files and optionally a description. Also, for excel exporter, user can select a template
file (see designer excel template definition) which will be used to generate final excel.
You can upload easier to server using NextReports Designer. You can publish one or more
reports from designer. An advantage is that you do not need to create the data source by
yourself because you can also publish it from designer. And if the report contains some
images, these will be automatically uploaded to server, as opposite to select those for a
server upload action.
29
Management
For Jasper, besides the name and data source, the user will enter the master file report and
optionally sub reports files, images files and a parameters file. The parameter file is created
using Edit Parameters action. A Jasper parameter has a type and a select source.
The type of a Jasper parameter can be:
-
COMBO : the values are taken from the parameter select field and at runtime the
user can select only one value
LIST the values are taken from the parameter select field and at runtime the user
can select one or more values
30
Management
Any report can be updated and a new version is created through this process. (See Report
Versioning)
The user can also change the data source of the report, and the new data source will be
used at runtime.
Through Info action, the report information can be seen: report id, description, query and
all parameters.
A report can be downloaded from the server. The downloaded file will be a zip with
master file, sub reports files, parameters file and images files for Jasper, and with file and
image files for Next.
The user who uploaded the report and any admin user will be allowed to see this report
and will have full control on it. To allow other users/groups to use this report, you will have
to add that user/group through the Security action to a list of permissions. (See security
management)
31
Management
Versions action shows all the versions of the report. On every version the user can do one
of the following actions: run, download, info and set as current. Set as Current action
will set the selected version as the current one.
Run History action will show the entire running history of the selected report. From here
the user can see all the generated reports.
Run action will ask the user to enter the parameter values. Depending on how you
defined your parameters you can have dependent (chained) parameters, meaning their
values can be selected only if all parent parameters were selected.
Parameters panel can be collapsed / expand using the arrow at the top.
User can also save the values selection as a template and reuse this template at next runs.
When user selects a template, values will be automatically filled and parameters panel will
be collapsed to allow seeing just export type and wizard buttons without the need of
scrolling.
Values templates are a way to extend on the server the default values feature specified at
parameter creation inside designer, allowing for example for a report with many parameters
to have more selectable default values. If user selects a values template, the parameters
are automatically filled. To save a template, user has to check Save as option and to enter
a name for it. Template will be saved when user ends all wizard steps and clicks Finish.
User can also remove some templates for a report if there is no need of them.
32
Management
If a report has two parameters named by convention as start_date and end_date and those
parameters have single selections and their type is one of Date, Time or Timestamp, then
values templates panel will show also a selectable time interval:
This interval can be one of Yesterday, Today, Current Week, Previous Week, Current
Month, Previous Month, Current Year, Previous Year and Last. For all the intervals the
two dates will be automatically filled with the corresponding dates. For example for
Current Week, start_date will be the Monday of current week with hours, minutes,
seconds and milliseconds equals to 0, while end_date will be the Sunday of current week
with hours 23, minutes 59, seconds 59, milliseconds 999.
If Last interval is selected user will be able to select how many days, weeks, months or
years are counted from current day:
For example for Last 4 Months start_date will be the same day as today but 4 months
earlier with hours, minutes, seconds and milliseconds equals to 0, while end_date will be
the current day with hours 23, minutes 59, seconds 59, milliseconds 999.
After Run Report step, optionally, the user can set a list of actions to do like sending the
result through mail or put it on a remote computer using SSH, FTP, Windows Share or
WebDav protocols.
User will receive in the top right corner a notification that the report is running. After the
running process is finished, user will also be notified about this through a message. This
message contains the link of the generated report if no error occurred. If an error occurred,
user is also notified to look inside Monitor section for what the reason was.
33
Management
Edit in Designer action is visible for reports of type Next. This action works by default
on Windows if the designer was installed.
If no designer from 5.1 was ever installed the browser will show a message like:
"Firefox doesn't know how to open this address, because the protocol (nextreports)
isn't associated with any program"
If you have installed a version since 5.1 but if you do not have installed the same
NextReports version as the server version, you will be informed with the designer
download links:
34
Management
If you have installed the needed version of designer, this designer will be opened and the
user is asked to enter server password. If the authentication is successful, the data source of
the report will be downloaded to designer with a name like
<datasource_name_on_server>@<server_ip>, designer will auto-connect to it and then
the report will be downloaded and opened. When you will save the report, you will be
asked to save it also on the server. By confirming, the report will be published to server.
ATTENTION. To succeed in editing a report from server action, some conditions
must be met:
1. Same version of designer as server version must be installed
2. User must be able to connect to the report/chart data source from its computer
For Linux users it is possible to register nextreports protocol to point to the installed
designer (you need to have gnome installed):
gconftool-2 -t string -s /desktop/gnome/url-handlers/nextreports/command
'<installation_directory>/nextreports "%s"'
gconftool-2 -s /desktop/gnome/url-handlers/nextreports/needs_terminal false -t bool
gconftool-2 -s /desktop/gnome/url-handlers/nextreports/enabled true -t bool
For Windows users there is an advantage, because if you have two or more different
versions of NextReports Server, edit action will open the corresponding designer. For
Linux, you have to register the same version by yourself. If the version is different you
may not be able to edit the report in designer (if server version is greater than designer
version) or you may not be able to run the report on the server after save (if the server
version is less than designer version).
35
Management
Cache Settings action is visible for all reports that are dashbordable or alarms, so for
all reports that can be added to a dashboard.
If use cache is selected, user can set an expiration time in minutes. This means, that such
report inside a dashboard will reload its data from database only after the specified number
of minutes. Any refresh called before will take data from cache.
36
Management
If checkbox is not checked, user will select values for parameter, in other words
parameter values are static values.
If in runtime step user selects a template with a start_date : end_date interval, scheduler
will take care of these two values to initialize them at every run. So, running a report for
current week for example will always compute start and end dates, making unnecessary to
have manual source for parameters and to set those parameters with dynamic flag. If these
two parameters have manual source and we set them as dynamic, then it wont matter if a
template was selected or not.
Besides the parameters values and the optionally list of destinations for report, the user
must select the type of the scheduler.
37
Management
This can be one of the following:
-
Once : the report will run only once at the specified date
Minutely : the report will run at every <n> minutes. It is possible to specify in
which hours, days and months to run
Hourly : the report will run at every <n> hours in the selected minute. It is
possible to specify between which hours and in which days and months to run
Daily : the report will run daily in the selected hours and minute. It is possible to
specify in which days to run (not every day)
Weekly : the report will run weekly in the selected hours and minute. It is possible
to specify in which week days to run.
Every type (except Weekly) has an Advanced checkbox which allows for more
complicated job configuration.
A report can be distributed to one ore more destinations like Mail, FTP, SSH, Windows
SMB (Simple Message Block), WebDAV or Copy.
Copy is just a local copy of the generated file but with a file name specified by user. File
name generated by server is unique and includes a timestamp and a random id, meaning it
cannot be known by users. So if you really need to access the file by name, you should use
a Copy destination. Files can also be distributed with a changed name specified by user.
38
Management
For Mail destination user will enter the mails, users or groups and the result as a link or as
an attached report will be sent to all recipients:
For FTP and SSH destinations, user has to enter host, port, folder and optionally user name
and password.
39
Management
For WebDAV, user can specify also if connection uses https. For Windows Share, in
addition to ftp, user can optionally enter a domain property. Destinations also have a Test
button to see if they are valid.
Some strings from destinations definition, like mail subject, mail body and changed file
name, can contain template values. There are possible following template values:
${date} current date
${time} current time
${name} generated report name
${val} current value for alarm, indicator, display alert value
$P{<parameter_name>} report run parameters values
Scheduler can also contain a Batch step and users can run/schedule a report in batch
mode. This means that if a report has a single-selection parameter with a source and if this
parameter is selected as a "batch parameter" then running it in batch mode will generate a
report for every value of that batch parameter.
ATTENTION. To make this right there are two conditions that must be met:
1. Batch parameter must not be set as dynamic
2. All chained parameters that are children of batch parameter must be set as
dynamic.
These two conditions are also written inside batch definition panel and are
automatically set (overwritten) on save if user does not do it.
40
Management
Second field, called Batch Data Query, is a simple sql select that gives an email address
for every entity from batch parameter. First column in query must be the same as that used
in source for batch parameter and second is the email.
Batch Data Query is optional and it is needed only if we need to send every generated
report to it's actual entity. Mail Destination Step in this case is allowed to not define a To
property, because it is dynamically set at run time. But we can also select a To property if
we also want to send all generated reports to a static email address.
After the scheduler job is created the user is shown the Scheduler section where he can see
all the scheduled reports.
41
Management
4.6. Alerts
An alert is a kind of report distribution which will send emails to a user or group of users
only if some condition is true. Any alarm, indicator or display reports which are scheduled
to run at a moment in time will have associated one or more alerts.
When user schedules an alarm, an indicator or a display, inside destinations step, he must
add such alerts:
Alert definition is similar to Mail but without a link or full report attachment. Instead, user
will select a condition for the reports value:
42
Management
Only if that condition is true when the report is run, only then an email is sent to recipients.
In case of alarms, message body will contain, after the text entered by user, the message
alarm.
User can enter the actual value inside mail body using a template markup ${val}.
43
Management
Type : This field shows the type of scheduler. The tooltip for it shows a verbose
description.
Report : This field shows the name of the report scheduled. The tooltip shows the
full path of the report.
Active : This field shows if the scheduled task is active. For scheduler type Once
this means run date is bigger than current date. For any other type, it means the
current date is between start activation date and end activation date.
Next Run : Shows the next date when the task will run.
A scheduler job can be modified or deleted. The user who scheduled the report and any
admin user will be allowed to see this scheduler job and will have full control on it. To
allow other users/groups to use this scheduler job, you will have to add that user/group
through the Security action to a list of permissions. (See security management)
The History action will show the scheduler job run history. Here we can see the start
date, end date, duration, if the report run with success or not, error message if any, the
report link if everything was ok.
Go to Report action will move the user from Scheduler section to the Report section
inside the folder where that report is found.
Clone action is useful if user wants to create a new scheduler job from an existing one
with minor changes. By cloning, a new scheduler job with _clone suffix name is created
and it is opened for modification.
44
Management
User will enter chart name, the data source used by the chart, the next report chart file and
optionally a description. Charts can also be published directly from NextReports designer
alongside with their data source.
Any chart can be updated and a new version is created through this process.
The user can also change the data source of the chart, and the new data source will be
used at runtime.
Through Info action, the chart information can be seen: chart id, description, query and
all parameters.
A chart can be downloaded from the server. The downloaded file will be a zip containing
chart file.
The user who uploaded the chart and any admin user will be allowed to see this chart and
will have full control on it. To allow other users/groups to use this chart, you will have to
add that user/group through the Security action to a list of permissions. (See security
management)
45
Management
Run action will show the chart as a HTML5 or flash object, depending if your browser
supports HTML5 or not. With the mouse right click it is possible to select to save the chart
as a local image.
Versions action shows all the versions of the chart. On every version the user can do one
of the following actions: run, download, info and set as current. Set as Current action
will set the selected version as the current one.
Edit in Designer action will allow editing the chart with NextReports Designer. See 4.4
Report Management chapter for more information.
Cache Settings allows for chart data to be taken from cache. See reports management for
explanation.
46
Management
If a chart has at least one drill down chart, the chart icon will show this through a "link"
bullet.
For example, we have a chart which shows the projects (x axis) and number of hours for
every project (y axis). First drill down chart will show the number of hours worked by each
employee. To create this first drill we add the chart with a "Project" link parameter which
contains the project name x axis value.
Second drill down chart will show the number of hours for each work code for selected
project and employee. To create it we add a chart with an "Employee" link parameter which
contains the employee name x axis value.
47
Management
For every drill down level all selected parent parameters will be passed. In our example, for
second drill down chart, the project name will be also passed along with employee
parameter.
The drill down chart panel shows all added charts:
48
Management
But because this chart was created with a 2-level drill down functionality, we can select one
project with the mouse and the next drill down chart will be shown:
Here, under the toolbar, a link called "Up One Level" is visible allowing for returning to the
parent chart. Also an Up To Root link allows users to go to the first chart. We can select
now an employee and we will see the work code hours for that employee working in
previously selected project:
A note must be done that charts were designed to have the parameters values contained
inside the title. This is a good practice to know were we are in the drill down process.
49
Management
If a table report has at least one drill down report, the table report icon will show this
through a "link" bullet.
Using the same kind of example from Drill Down Charts section, we have a table report
called tableProjectHours which shows the projects and number of hours for every project.
First drill down report will show the number of hours worked by each employee. To create
this first drill we add the report with a "Project" link parameter which contains the project
name value. In addition to charts drill down, we also have to specify the column index from
the table where projects are found. In our case, Project column is the first in the table.
Second drill down table report will show the number of hours for each work code for
selected project and employee. To create it we add a report with an "Employee" link
parameter which contains the employee name value. We also inform the
50
Management
tableWorkcodeHours report that its parent tableEmployeeHours table report has the
employee column as the second column of the table.
For every drill down level all selected parent parameters will be passed. In our example, for
second drill down report, the project name will be also passed along with employee
parameter.
The drill down report panel shows all the added reports:
The only difference is seen if we move the mouse over the values from the first column,
which contains the values to be passed to first link parameter from drill down. Those values
are links and by selecting one the next drill down report will be shown:
51
Management
The second table report was designed to show in the first column an expression which in
this case is the parameters value converted to uppercase.
Under the toolbar, a link called "Up One Level" is visible allowing for returning to the
parent report. . Also an Up To Root link allows users to go to the first report. We can
select now an employee and we will see the work code hours for that employee working in
previously selected project:
This third table report was designed to show in the first column an expression which is a
string concatenation of parameters values (first one converted to uppercase).
Even if you can design your table reports to show only data, it is a good practice to create a
first expression column with parameters values so you know were you are inside the drill
down process.
52
Management
In this example our ProjectHoursBar chart accepts a report as a first level drill-down. We
can see that no column index is needed to drill from first chart to the report. Second drilldown entity is a chart. In this case, because previously drill-down entity is a report, we need
to have a column index (2 in our example).
Even if this is possible, it is a good practice to be consequent in your drill-down process. So
use this only if your business requires drill-down from chart to table and from table to
chart.
ATTENTION. When you have a master table with a column of dates and you want to
drill using a date drill parameter you must not use a pattern for the date field in your
master report. Dates inside table widgets are strings formatted as default using
current locale, so that when we click on a date string this can be parsed into a date
object and passed to the child widget. If you will use a pattern a ParseException will
be raised.
53
Management
Url can contain also a markup ${value} which will be replaced with the clicked value. If
you use a drill-down widget as an iframe in your proprietary application then it may be
practical to have a url containing this value and showing you more information regarding
your needs. This should work very well with REST web applications.
As you saw on Advanced Drill Down section, depending on last entity selected, you may
be asked or not to select the column index used by table reports. If you have a table report
as last drill before to add a url drill, this column will be shown, otherwise it wont.
ATTENTION. When drill url property from integration settings is set, then this url
will be used as a base url for any drill defined in NextReports Server. In this case, drill
url definition must contain only the relative path. For example users may set drill
url to be http://mydomain.com so the url from drill must contain just
/order/${value}/info .
54
Management
4.13. Pivot
Inside dashboards user can add pivot widgets. Pivots can be created from any report. Even
if you can add a pivot in any dashboard, it is better to have a dashboard with a single
column just for one pivot so that you can have the necessary space without scroll. You can
also use detach mode if you need.
After adding a pivot to a dashboard, widget will look like the following:
Initially all columns are unused. To play with them just drag-and-drop a column to any of
ROW, COLUMN or DATA fields. If user clicks on a data field, he can set a function for
that column between sum, avg, min, max, count. By default the sum function is selected.
User can check Show grand total for column and Show grand total for row if he wants
to see totals.
When user clicks Compute data will be displayed. Also, after every compute the
columns, functions and show total properties are saved so that when user returns to the
dashboard all saved settings will be auto-loaded.
55
Management
4.14. Analysis
Analysis introduces to users the possibility to play with data. To be able to create analysis,
users must bring the desired data locally through an ETL (Extract Transform Load) process.
When a report is run or scheduled, users may select Analysis Source as output format,
meaning instead of generating a special kind of file, the results will be brought locally
inside a NOSQL database.
Practically, the NOSQL database will contain a new table with name as :
<user name>-<report name>
If such process is run again on same report, all data associated with it is first dropped and
then the new data is brought on.
Inside Analysis section users can add new entities from those tables.
When user clicks Add analysis button, he will be able to see there the list of all tables
created by him through an ETL process. Initially, after creation, the analysis object will
show the entire data set. From this point, user can play with data.
56
Management
A. New columns can be created.
Such new column can be for example a mathematical expression, a string concatenation
expressions or an aggregate function.
To concatenate two or more string columns into a single one, users must use the following
syntax: <col1>.append(<col2>).append(<col3>)
57
Management
B. Users can select what columns to see and in what order.
Using mouse drag and drop the columns can be moved around to change the order inside
analysis table.
Two help actions are present to make user experience easier:
- ALL selects all columns
- NONE deselects all columns (useful in case user wants to select just one or two
columns and initially all are selected)
Analysis table also allows for sorting by clicking directly on the table columns header. If
there are already some sort columns defined, when the column header is clicked, this
column becomes the first sort column and all other sort columns are kept.
58
Management
D. Group data
Users can group data by adding the desired columns (Add) and their order (Up / Down
actions).
ATTENTION. You must pay attention on how you define your groups in correlation
with the sorting applied. If you want to group by some columns and you want to see
all records you should add as groups all columns.
E. Filter data
Users can filter data using some criteria with different operators. To use LIKE / NOT LIKE
operators, value can contain % character to substitute any sequence of characters.
To use date as value, the standard ANSI format must be used yyyyMMdd
(year/month/day).
59
Management
In case of using operators like IN / NOT IN / BETWEEN the value field will contain the
list of values separated with ; character.
F. Paginate
Analysis table has a mandatory pagination which is by default of 20 records. Its value can
be a number between 1 and 500.
60
Management
After the desired result is obtained, user can apply some actions.
Save will save the analysis object with all users selections, so when they return to that
analysis they will see the obtained result. When save process is done, users are informed by
a specific message:
Freeze is a process that copies all data inside a new table with a different name. Any
other ETL process wont change any data inside a frozen table. Also, this process creates a
new analysis object. On start, users are notified with a message:
The new created analysis will have a special icon inside the analysis navigation list:
61
Management
Users can see all analysis on the left navigation menu. From here, users can execute
different actions like Rename, Share or Delete.
Any analysis is created with a unique name so that users know what they did, so it is better
to Rename it in such way it describes its usability.
Share action, allows adding rights to other users to see the analysis as a link in their
navigation panel.
Delete action will delete the analysis and if the table used by it is not used by any other
analysis, then the table will also be deleted.
62
Management
There is also a bulk action to modify profile for more users that are not administrators.
To create a group of users you have to enter a name and select one or more users.
63
Management
Data Source, Report and Scheduler Job are the entities of the application which can have
permissions. Permission can be one, or a set, of the following:
R (Read)
X (Execute)
W (Write)
D (Delete)
S (Security)
Entity permission can be added for a user or for a group.
64
Management
Every permission has its meaning for an entity.
Read means:
for data source : the data source can be seen in the browser panel, and the user can
create a report with that data source
for report/chart : the report/chart can be seen in the browser panel, and the user can
see the report/chart information, the run history and can download it or copy it
for scheduler job : the scheduler job can be seen in the browser panel and the user
can see the run history
Execute: has meaning only for Report and Chart, and the report/chart can be run and the
report can be scheduled.
Write: means that the entity can be modified (updated) and also for report/chart that we can
change the data source.
Delete: means the entity can be deleted. The user is not allowed to delete entities which are
referenced by other entities (like data sources used in reports/charts or reports used in
scheduler jobs).
Security: this permission means the user will be allowed to change the security permissions
for that entity.
IMPORTANT: There is a group called all. This means that an entity which has
permissions created for this group will have those permissions for all existing users
(already created or created in the future).
65
Management
Users can modify their dashboards with a different title and a different number of columns.
If you set a smaller column number, you will be asked to rearrange the widgets found on
the columns which will disappear.
Dashboards can be deleted, except the default one. Through dashboard management, user
can organize his charts and special widgets. The layout of the container consists by default
from two columns. All widgets from dashboards (charts, tables, alarms, indicators,
displays, pivots) can be dragged with the mouse inside the container up-down and leftright.
Besides adding dashboards, user can refresh the whole current dashboard and he can add
widgets to it.
To add a widget inside selected dashboard, user has to click the Add widget button. User
can select between chart, table, alarm, indicator, display and pivot types. After this
selection user can browse the corresponding tree of entities.
66
Management
By selecting a report or a chart entity, a new widget will be created in the top left position
of the current dashboard.
Any widget has in toolbar a link with a menu which allows executing following actions:
67
Management
-
edit settings
refresh
detach
A change in the settings will update the chart view inside the dashboard.
To reset a widget to its default settings, user has to edit chart settings and to press the
Reset button from the dialog. Any widget has a Refresh Time property in seconds. If
this value is bigger than 0 than a refresh is done automatically after the number of seconds
elapsed.
Also, any widget has a Timeout property in seconds. Default timeout value is 30 seconds.
After a timeout expires and widget was not able to render yet, widget will show a timeout
exception.
68
Management
ATTENTION. Timeout property is also used for the database query. But be aware
that query timeout success depends on jdbc driver implementation, so even if we see
the exception the actual query may not be finished in the database.
All table widgets have a Rows per page property. This value is used to paginate the table
in case there are many entries. Default value is 100.
A widget can be detached from a dashboard. In this way, it can be maximized to full screen
(using F11 key).
A widget can be embedded as an iframe in other web sites. To generate the code there is an
action called Embedded code. Width and height for iframe can be specified. In case you
want to add parameters you can specify them like:
$P{P1_Name}=<value>&$P{P2_Name}=<value>
69
Management
In this panel the user will see all his dashboards and all dashboards links to which it has
write permission.
Dashboard navigation panel can be hidden to have more space for charts. The state of
navigation panel (show / hidden) is saved for the current logged user.
The navigation panel allows selecting any dashboard from the list. Selected dashboard will
be marked with a different background color. Any dashboard has a list of possible actions
shown inside a popup when the mouse is over the actions icon.
At the top of the navigation panel, there are two more possible actions: add a new
dashboard and show some statistics about the number of different type of widgets used:
70
Management
When you first login, you will see your default dashboard. Any dashboard can be set as
default using the action with
icon.
A dashboard (except default one) can be shared to other users using the action with icon,
and those users will see it automatically inside dashboard navigator. A shared dashboard
has at least read permission in order to be viewed by other users. If it has write
permission, the user can also modify anything in the dashboard. If it has security
permission, the user can share it to others.
Any dashboard that is shared to current user has a specific icon with a link. A tooltip over
that dashboard title will give information about the owner.
71
Management
ATTENTION. When a dashboard is shared only with read permission, user can
still change the settings, but those values are kept just for him. This means that every
user of a read-only shared dashboard has his own settings. By contrast, on a shared
dashboard with write permission, the settings are globally kept, so any change is
seen by all users.
Any dashboard can be seen independently through an embedded url format that can be
found on its popup menu actions.
When this url is put inside a browser just the dashboard is visible without navigator and
buttons.
Inside dashboards user can add, besides charts, tables, alarms, indicators and displays.
72
Management
A table is created from a Next report which has to have some conditions:
-
Report must have at least a row inside header band, from where the column names
will be taken. If it has more rows inside header band, the last row will be used to
take column names.
ATTENTION. If any of the above conditions is not met, the report will not be shown
in the add table selection.
User can modify table setting (parameters values) if any.
By default, all tables (whose reports have only one detail band) have a header with sortable
columns. This sorting is not persisted, so after any refresh it will disappear. But after a sort
user can generate an excel file, with widgets Save action, which contains the sorted data.
An alarm is created from a Next report which has to have some conditions:
-
must have a specific structure only with two cells inside detail band (see
NextReports Designer manual) : first cell specifies the color through its background
and the value (a column from database) and the second cell specifies the message
associated with every status
The result will be a colored led with a status message. If no data is found, led color will be
white.
73
Management
An indicator is created from a Next report with a special structure (see NextReports
Designer manual). This indicators role is to show a single value inside a defined interval.
The result will be a component like the following:
In the example above, indicator shows you the current value (92), a small title (Visitors), a
description (per minute), a minimum value (0) and a maximum value (100). Also a unit
may be present and this is added at the end of the values (like % in next example):
A display is created from a Next report with a special structure (see NextReports Designer
manual). This displays role is to show a single value (on a period of time) or to show it by
percent comparison with another value on a previous period of time. The result will be a
component like the following:
Both charts and tables from dashboards can be saved as excel files where the header
(column names) and data (rows) are inserted. For a chart the columns are X column and all
Y columns (with selected function if any).
74
Management
If you want to know the entity (chart or report) used by a dashboard widget, you can use the
Go to entity action, and you will be redirected to the specific section where the entity is
selected with a different background color.
Dynamic Settings
If a widgets query has a parameter with a source and/or a default source, then user will be
able to see a dynamic check box flag near that parameter in Edit Settings dialog. By
selecting it, NextReports Server will be informed that the value of the parameter will be
computed at runtime and it wont be the default stored value. This dynamic flag is the
equivalent of the flag used in scheduler definition.
What is it good for in widget settings? Think that you have to see a live chart data for the
last week and your chart has a start_date and an end_date parameters with default sources
created from sql queries. If you would not have a dynamic flag, you could set your
end_date in the future to get all your data to present, but you could not set start_date to be
always the last 7 days from current date.
Also it is very easy to deselect dynamic flag to analyze data for a specific interval.
In this way you can have just one widget to be used for seeing live data without
intervention and to be used for analyzing specific needs.
75
Management
Global Settings
Every dashboard with at least one widget has a Global Settings action which can be seen
in the top right corner. If there is only a widget inside the dashboard Global Settings is
the same with the Edit settings action on that widget.
If more widgets are present inside a dashboard, Global Settings will allow setting all
general (global) settings to all the widgets.
Global settings always contains Refresh Time and Timeout properties. But the most
important properties seen in Global Settings are all the parameters that are the same
inside all reports used by widgets. When we say that two parameters are the same we must
have the same name, class, selection, manual source, default source and so on. But we do
not compare mandatory, runtime name, description properties.
By changing widgets with Global Settings users can be faster in updating all dashboard
views with just a single action.
Pdf Capture
Users can capture a dashboard as PDF. PDF file will contain a single landscape page with
the visible part of the dashboard. This means all content which is not visible, because a
scroll is involved won't be captured.
Users have a small number of tricks to make the dashboard full-visible:
- NextReports Server has a button to hide dashboards explorer
- Browser F11 button makes it to be visible in full screen
- CTRL+mouse wheel will allow to zoom-in/zoom-out the browser content
Using the tricks above we make a dashboard like the following to be fully visible:
76
Management
PDF capture will generate a file which contains the dashboard name and footer with
generation date:
77
Management
1. General Settings
Base Url : This is the server base url which contains the ip, port, application
workspace. This property is also used for the url from where to read the generated
reports and charts.
Reports Url : The Url that will serve your generated reports.
ATTENTION. Changing base url If you change base url with ip and port, please be
sure that you call from the same machine with that set ip instead of localhost. You can
also connect using localhost, but you wont be able to see the charts and the exported
reports.
Mail Server User Name : user name for mail server if it uses authentication
78
Management
ATTENTION. SMTP Authentication You can have a special internal email address
for NextReports (created by your admin) which does not need SMTP authentication.
But, if you really want to add SMTP authentication you can fill user name and
password. Any other properties for mail server can be added to the configuration file
found in the following path: \webapps\nextreports-server\WEBINF\classes\scheduleContext.xml
Here look for
<bean id="mailSender" .... />
Please be sure to stop the server, before editing the file.
Update Interval : Represents the time in seconds after a refresh is done in some
parts of the application, like in Monitor or Scheduler sections.
Auto Open : Is a Boolean value which allows for auto opening generated reports
after run. You should check this only if you have small times for reports running.
2. Jasper Settings
Jasper Home for compiled reports : The folder where jasper reports will be
compiled
Jasper XLS detect cell type : Boolean value to indicate whether the exporter
should take into consideration the type of the original text field expressions and set
the cell types and values accordingly.
Jasper XLS white page background : Boolean value to indicate if the page
background should be white or the default XLS background color
Jasper XLS remove empty space between rows : Boolean value specifying
whether the empty spaces that could appear between rows should be removed or not
79
Management
3. Applications Look
Logo file : Logo file which is shown at login and in the toolbar can be changed
from here.
Color theme : There are three color themes which will modify some links and
backgrounds. New theme file can be added by user. To do this:
1) file must be named like theme-<color>.properties
2) file must be added where other theme files are found: webapps/nextreportsserver/WEB-INF/classes/ro/nextreports/server/web/themes
3) all i18n files must contain a new property:
Settings.personalize.theme.theme-<color>=<name of theme>
80
Management
Core pool size : The number of threads created at startup in the pool
Maximum pool size : The maximum number of threads which can be created in
the pool
Queue capacity : The number of threads that can wait inside a queue to be
processed.
5. Synchronizer Settings
6. IFrame Settings
81
Management
Use authentication : Boolean value specifying whether iframes can be show only if
user is logged-in or anytime
Encryption key : This key is used to encrypt url query parameters that can be
passed to iframes
Next Reports Server allows for user synchronization with other applications (see 5.3.
chapter) . In that case those users will be imported to server content repository in a form of
<user_name>@<realm> . This realm string (and all others) will be shown at login in a
special combo box. So, to connect with the user of a specific application, you have to select
the corresponding realm. Synchronization is configured through following properties:
7. Integration Settings
Drill url : This will be used as base url for every drill defined in NextReports
Server
Notify url : This is an external url where NextReports Server will do a POST after a
running report has finished. This url contains three parameters which can be read by
any other application:
report : report name
message : result message which can be OK or an error message
url. : url of the resulted report
Secret key: If not null, this key, defined by administrator, will be used inside
integration url for a NextReports Server section iframe. (See Section 5.4. Next
Server Integration Embedded Section)
White Ip: If not null, this ip will be used by integration url for a NextReports
Server section iframe. If request header is not from specified ip, url for integration
will not allow login. (See Section 5.4. Next Server Integration Embedded Section)
82
Management
To export data, administrator has to select some entities like data sources, reports, charts
and dashboards.
If an entity is selected for export, all referenced entities will automatically be exported. For
example, if a report is exported, then the data source used by that report will be exported
too. If a report has drill-down links, then all reports and charts from those links are also
exported. For a dashboard export, all widgets from it are exported and for every widget the
entity behind (report or chart) is exported.
83
Management
Export process will create an xml file in the specified path. This file has a naming
convention: it starts with migration- and it ends with the export date.
Administrator can import data using a migration xml file. Import process will automatically
create a backup zip file for the current repository. If an imported entity has an id identical
with an entity from repository, then the existing entity is updated. If imported entity has an
id which is not found inside repository, then a new entity is created. . If imported entity has
an id which is not found inside repository but there is an entity in the system with the same
path, then a new entity with a modified name (and path) is created. The name will be
appended with _IMP_ and the current timestamp.
Because export and import processes must not interfere with repository modification, when
such process is started the server is set to maintenance mode. Every user, except
administrator, will be redirected to a special page for the time of process execution.
This page is similar with server error page which is shown if something wrong happened
internally.
84
Management
85
Management
Run reports will show something similar to Monitor Run History, but users can filter
(besides start and end date) using owner, report path and status (all, success, failed):
86
Management
List reports just get a list of all entities of a specific type (Data Sources, Reports, Charts,
Schedulers, Dashboards, Analysis):
87
Management
88
AdvancedConfiguration
5. Advanced Configuration
5.1. Next Server Properties
Some Next Server properties were already discussed in Management chapter section 4.13.
nextserver.home = .
Represents the home directory of next reports server application
nextserver.baseUrl = http://localhost:8081
This is the server base url which contains the ip, port, application workspace. This
property is also used for the url from where to read the generated reports and
charts..
repository.home = ${nextserver.home}/data
The folder were all data content repository will be kept
First two settings nextserver.home and nextserver.baseUrl must not be modified
from here, but from the application. The reason they may also be found here is
because they are requested at installation time.
89
AdvancedConfiguration
After you define a profile, name must not be modified. You can modify displayName,
the name you will see in user profiles list.
Every profile has a list of visible sections (at least one must be presented) . section_class
may one of the following :
ro.nextreports.server.web.dashboard.DashboardSection
ro.nextreports.server.web.report.ReportSection
ro.nextreports.server.web.monitor.MonitorSection
ro.nextreports.server.web.chart.ChartSection
ro.nextreports.server.web.schedule.SchedulerSection
ro.nextreports.server.web.datasource.DataSourceSection
ro.nextreports.server.web.security.SecuritySection
Also, a profile can define a list of actions (contributors) which is optional.
contributor_class may be one of the following :
General Actions
ro.nextreports.server.web.action.CacheActionContributor
ro.nextreports.server.web.action.CopyActionContributor
90
AdvancedConfiguration
ro.nextreports.server.web.action.CreateFolderActionContributor
ro.nextreports.server.web.action.CutActionContributor
ro.nextreports.server.web.action.DeleteActionContributor
ro.nextreports.server.web.action.PasteActionContributor
ro.nextreports.server.web.action.RenameActionContributor
ro.nextreports.server.web.action.SearchEntityActionContributor
Chart Actions
ro.nextreports.server.web.action.chart.ChangeDataSourceActionContributor
ro.nextreports.server.web.action.chart.DownloadActionContributor
ro.nextreports.server.web.action.chart.DrillDownActionContributor
ro.nextreports.server.web.action.chart.InfoActionContributor
ro.nextreports.server.web.action.chart.RunActionContributor
ro.nextreports.server.web.action.chart.UpdateActionContributor
ro.nextreports.server.web.action.chart.EditActionContributor
ro.nextreports.server.web.action.chart.UploadChartActionContributor
ro.nextreports.server.web.action.chart.VersionsActionContributor
Data Source Actions
ro.nextreports.server.web.action.datasource.CreateDataSourceActionContributor
ro.nextreports.server.web.action.datasource.ModifyActionContributor
Scheduler Actions
ro.nextreports.server.web.action.schedule.GoToReportActionContributor
ro.nextreports.server.web.action.schedule.HistoryActionContributor
ro.nextreports.server.web.action.schedule.ModifyActionContributor
Report Actions
ro.nextreports.server.web.action.report.jasper.EditParametersActionContributor
ro.nextreports.server.web.action.report.jasper.UploadJasperReportActionContributor
ro.nextreports.server.web.action.report.ChangeDataSourceActionContributor
ro.nextreports.server.web.action.report.DownloadActionContributor
ro.nextreports.server.web.action.report.InfoActionContributor
ro.nextreports.server.web.action.report.RunActionContributor
ro.nextreports.server.web.action.report.RunHistoryActionContributor
ro.nextreports.server.web.action.report.ScheduleActionContributor
91
AdvancedConfiguration
ro.nextreports.server.web.action.report.UpdateActionContributor
ro.nextreports.server.web.action.report.EditActionContributor
ro.nextreports.server.web.action.report.UploadNextReportActionContributor
ro.nextreports.server.web.action.report.VersionsActionContributor
Security Actions
ro.nextreports.server.web.action.security.CreateGroupActionContributor
ro.nextreports.server.web.action.security.CreateUserActionContributor
ro.nextreports.server.web.action.security.ModifyGroupActionContributor
ro.nextreports.server.web.action.security.ModifyUserActionContributor
ro.nextreports.server.web.action.security.ModifyProfileActionContributor
ro.nextreports.server.web.action.security.SecurityActionContributor
Dashboard Actions
ro.nextreports.server.web.action.dashboard.SetDefaultActionContributor
ro.nextreports.server.web.action.dashboard.ShareActionContributor
ro.nextreports.server.web.action.dashboard.ModifyActionContributor
ro.nextreports.server.web.action.dashboard.DeleteActionContributor
To add a new profile or remove an existing one you have to update the list found in
securityContext.xml configuration file which is inside folder <installation_folder>/
webapps/nextreports-server/WEB-INF/classes.
92
AdvancedConfiguration
93
AdvancedConfiguration
<bean id="syncUserDetailsService"
class=" ro.nextreports.server.security.DatabaseExternalUsersService">
<property name="dataSource" ref="syncDataSource"/>
<property name="userNamesQuery">
<value>SELECT USER_NAME FROM SYS_USERS_NEXTSERVER</value>
</property>
<property name="userQuery">
<value>SELECT * FROM SYS_USERS_NEXTSERVER WHERE USER_NAME
= ?</value>
</property>
<property name="mapping">
<map>
<!-- required -->
<entry key="user.username" value="USER_NAME"/>
<entry key="user.password" value="PASSWORD"/>
<!-- optional -->
<entry key="user.admin" value="IS_ADMIN"/>
<entry key="user.email" value="EMAIL"/>
<entry key="user.realName" value="NAME"/>
<entry key="user.profile" value="PROFILE"/>
</map>
</property>
</bean>
<bean id="syncDataSource" class="oracle.jdbc.pool.OracleDataSource"
destroy-method="close">
<!-- jdbc properties -->
<property name="URL" value="jdbc:oracle:thin:@<ip>:<port>:<sid>"/>
<property name="user" value="user"/>
<property name="password" value="pass"/>
<!-- cache properties -->
<property name="connectionCachingEnabled" value="true"/>
<property name="connectionCacheProperties">
<props>
<prop key="minLimit">2</prop>
<prop key="maxLimit">2</prop>
</props>
</property>
</bean>
</beans>
A first query, userNamesQuery, will select just the names for all users.
A second query, userQuery, will select all user properties. Only two of them are
mandatory: username and password. You can offer also some optional properties like
admin, email, real name, profile. Every property must be mapped to a database column.
94
AdvancedConfiguration
ATTENTION. User password returned by select must be encoded with MD5
algorithm. At login, password entered by user is encoded with MD5 and it is
compared with the password string returned by query.
To use these two defined configuration files, we will import them inside
securityContext.xml file:
<import resource="classpath:authenticationDatabase.xml"/>
<import resource="classpath:securitySynchronizer.xml"/>
95
AdvancedConfiguration
96
AdvancedConfiguration
There is a second option for authentication also in two steps which is more useful for
servers communication (user application server & NextReports Server). First, user calls a
private url:
http://localhost:8081/nextreports-server/app/j_integration_security_check
?username=<user_name>&secret=<secret_key>
Secret key is the value set in Integration Settings and it is not mandatory:
http://localhost:8081/nextreports-server/app/j_integration_security_check
?username=<user_name>
In such case, user can set the White Ip from Integration Settings which will allow for
requests just from that ip.
First url request returns as response the jsessionId for authenticated session. User must use
this jsessionId in his next request:
http://localhost:8081/nextreports-server/app/dashboards; jsessionid=<jsessionId >
97
AdvancedConfiguration
java VM parameters for native installers are added inside startnextserver.vmoptions file; for zip distribution they are added in run file.
98
AdvancedConfiguration
Sign in
Sign in failed
Sign out
Add entity
Modify entity
Delete entity
Copy entity
Move entity
Rename entity
Restore entity
Grant user / group
Revoke user / group
Run report
These events have some common properties like event id, date, user name, action, session,
ip, level (0=info, 1=error), error message. For some events there are also other properties.
For example for "Run report" there are report path and duration; for "Grant user" there are
entity path, user name to grant for, permissions and recursive flag.
NextReports Server has an extensible auditor feature. A database auditor can be defined to
save all these events inside a database. This is very important because NextReports can
generate reports over that database to get valuable information.
Inside securityContext.xml there is a bean called auditor:
<bean id="auditor" class="ro.nextreports.server.audit.CompoundAuditor">
<property name="auditors">
<list>
<ref bean="logAuditor"/>
</list>
</property>
</bean>
In this list, besides the log auditor we can add a database auditor:
<bean id="auditor" class="ro.nextreports.server.audit.CompoundAuditor">
<property name="auditors">
<list>
<ref bean="logAuditor"/>
<ref bean="dbAuditor"/>
</list>
</property>
</bean>
<bean id="dbAuditor" class="ro.nextreports.server.audit.MySqlAuditor">
<property name="dataSource" ref="auditDataSource"/>
</bean>
99
AdvancedConfiguration
<bean id="auditDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value=""/>
<property name="username" value=""/>
<property name="password" value=""/>
</bean>
As stated before, common properties will be saved inside NS_AUDIT, while specific event
properties will be saved inside NS_AUDIT_CONTEXT.
For example, for a MySql database we need to call following sqls to initialize:
CREATE TABLE NS_AUDIT (
EVENT_ID INT UNSIGNED NOT NULL,
EVENT_DATE TIMESTAMP,
EVENT_USERNAME VARCHAR(50),
EVENT_ACTION VARCHAR(30),
EVENT_SESSION VARCHAR(100),
EVENT_IP VARCHAR(20),
EVENT_LEVEL INT(2) ,
EVENT_ERROR_MESSAGE VARCHAR(150)
)
CREATE TABLE NS_AUDIT_CONTEXT (
EVENT_ID INT UNSIGNED,
EVENT_NAME VARCHAR(50),
EVENT_VALUE VARCHAR(200)
)
CREATE TABLE NS_AUDIT_SEQ(
EVENT_ID INT UNSIGNED NOT NULL,
CONSTRAINT event_pk PRIMARY KEY (EVENT_ID)
)
INSERT INTO NS_AUDIT_SEQ (EVENT_ID) VALUES(0)
100