Tuesday, 26 May 2015

NextReports: Batch Mode

From version 8.1 users can run/schedule a report in batch mode. What does this mean?
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.

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 on save if user does not do it.

As an example, we use a report that shows the Timesheet for an employee on all projects he is assigned to. There are two parameters : Employee and Work code (work, meeting, administration, travel) so we can see the Timesheet for that employee for a specific list of work codes.

Here we see that the parameter we want to use in batch (Employee) is not set as dynamic, but the other parameter (Code) which is a child of Employee parameter is set as dynamic.

Batch Mode is practically a new step in run/schedule wizard process:

"Employee" parameter was set as a batch parameter. This simple selection means the report will be generated for all "Employee" values.

Second field, called Batch Data Query, is a simple sql select that gives an email address for every Employee. First column in query must be the same as that used in source for Employee parameter, which is defined as:

select distinct employeeid, firstname || ' ' || name as fullName from employee

Second column in query is the email column.

Batch Data Query is needed only if we need to send every generated report to it's actual employee.

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. In mail step, we can see that besides existing template values until version 8.1 (like ${date}, ${time}, ${name}) we can use parameter values as $P{Employee} or $P{Code}. This allows to have a mail message customized for every employee.

Thursday, 21 May 2015

NextReports Server: Connection Logging

Starting from NextReports 8.1 connection creation is written to log for debug purposes. By default all connections are written to connections.log found inside <server_install_folder>/logs folder. Default log level type is INFO

Inside <server_install_folder>/webapps/nextreports-server/WEB-INF/classes/log4j.properties user can change log level from INFO to DEBUG, to see information from the pool when a connection is created/used:

log4j.logger.ro.nextreports.server.util.ConnectionUtil=INFO, CONNECTION_FILE

Users will be able to see on DEBUG level how many connections are in pool (min and max values), how many connection are active, idle or busy.

In case you experience some connections problems (like timeouts) and you are sure your database is up and running, you should put this log's level on DEBUG and start accumulating data to reproduce the problem again.

Tuesday, 19 May 2015

NextReports: Analysis versus Table Widgets

Even if a table widget inside a dashboard seems to be similar to an analysis table, there are many differences between them.

"Analysis" is a special object with following major differences than a widget table:
  • Analysis shows raw data (no patterns are used) and that makes the possibility to easily have sortable columns
  • Analysis can have a list of sortable columns (sort by column1, then column 2, ….)
  • Analysis persists sortable columns
  • Analysis has a lot of other features  like selection, grouping, filtering, pagination, freeze.
  • Analysis uses local data brought here by an ETL process
"Table Widget" has the following characteristics :
  • Table Widget has behind a report with a layout
  • Table widget may contain formatted data (if patterns are used like for dates, numbers,..)
  • The report behind a table widget may contain different type of values on same column (because report's layout can have more than one detail band). 
  • Table Widget may have a style (foreground and background colors)
From version 8.1 of NextReports Server :
  • Table widgets will have a header with sorting columns. 
  • Sorting is added only to those table widgets that contain only one detail band (the actual database columns). On all others table widgets sorting has no sense.
  • Sorting on table widgets is not persisted, so if you will leave dashboard and return or if you do a refresh the sorting will disappear. But if you sort, you are able (before refresh) to Save to Excel with the used sorting.

Thursday, 14 May 2015

NextReports: yAxis with 'starting from zero' property

From NextReport 8.1, Next Charts library will add a new property on yAxis called 'starting from zero'.

The minimum value on yAxis is computed so that all y values be some 'nice' numbers. This minimum value can be sometimes negative, sometimes 0 and sometimes positive. In case of positive numbers users may desire to start yAxis from zero  if computed minimum  value is bigger than zero.

Let's take following chart, for example, with values 44, 32, 34, 31. Computed min value is 30.

If users want to see the chart starting from zero, this is easily done by selecting 'starting from zero' property:

In this case computed min value is considered zero and the chart will look accordingly:

In case of negative values, this property has no effect.

Tuesday, 5 May 2015

NextReports Server: Internal Reports

Starting with NextReports 8.1 version a new section called Audit will be available.

Here, any administrator can obtain data from NextReports Server repository.

Just some examples of questions, users can get an easy answer:

What are the reports with write permission for group 'Test'?
What were the failed run reports yesterday?
What is the full list of Schedulers?

Users can sort the result and save it as an excel file.