Sneak Preview 3.0.6

Work on our next release (3.0.6) is under way. We want to give you an overview of some important features that are ready and will be available with ReportServer 3.0.6, released in a couple of weeks:

  • Scheduling
  • The Conditional Scheduling
  • Object Resolver Query
  • Perfomance
  • Language support

Scheduling

It’s getting even better! The scheduling mechanism is greatly extended in ReportServer 3.0.6. This is a step on the way to the future n:m scheduling mechanism (n reports to m recipients in a single job).

Now, the scheduler administrator is able to set three different scheduling actors:

  • The executor: the executor is the user as which the report will be executed. Thus, this determines the permissions during report execution. Until ReportServer 3.0.5, the executor was always the user that originally scheduled the report. What happens when the user leaves the organization? In the past, all scheduled jobs had to be completely created from scratch by the new executor. With ReportServer 3.0.6, the scheduler administrator is able to simply change the executor by a couple of clicks. Much easier and much more flexible.
  • The owners: the owners are users that are able to change a scheduled job. Until now, there was only one owner: the user that originally scheduled the report. So, apart from this user, only scheduler administrators were able to change a scheduled job. But what happens when the job owner is out of office for some weeks, e.g. in vacation? Only scheduler administrators were able to change his/her jobs. Now, multiple owners can be defined and these don’t have to have scheduler administrator permissions in order to change a job.
  • The recipients: Recipients are the users that get the scheduled report e.g. by e-mail. This has not been changed in ReportServer 3.0.6.

In the following screenshot you can see the new scheduling dialog.


The Conditional Scheduling

Useful improvements were made regarding conditional scheduling, which is much more flexible and powerful in ReportServer 3.0.6. The administrator is now able to create predefined scheduled conditions via scripting. The user just has to select the condition needed and that’s it. No more formula typing for the user, which improves user experience and avoids common errors. Of course, the previous scheduling mechanism is further supported.

As a standard predefined scheduler condition, we offer the “not empty” condition shown in the following screenshot.

As you can see, the report is only executed if the report is not empty.

It is important to emphasize that completely new conditions may be created by scripting. As an example, please take a look at the following simple script.
It allows report execution during working days, while during the weekend report execution is disabled.

import net.datenwerke.rs.condition.service.condition.hooks.ConditionProviderHook;
import net.datenwerke.rs.condition.client.condition.dto.SimpleCondition;
import java.util.Calendar;
 
def HOOK_NAME = "IS_WORKINGDAY_HOOK"
 
def callback = [
 provideConditionFor: { report ->
 SimpleCondition cond = new SimpleCondition();
 cond.setKey(HOOK_NAME);
 cond.setName("Is working day");
 cond.setDescription("Actions are executed if today is a working day");
 return cond; },
 consumes: { key -> return HOOK_NAME.equals(key); },
 execute: { key, expression, user, rjob ->
 Calendar c1 = Calendar.getInstance();
 c1.setTime(new Date());
 return ( c1.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY || 
          c1.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY ) ? false: true;
 },
 isBeforeActions: { -> return true; },
 isBeforeJob: { -> return true; },
] as ConditionProviderHook
 
GLOBALS.services.callbackRegistry.attachHook(HOOK_NAME, ConditionProviderHook.class, callback)
The predefined conditions are shown in the following screenshot:
Of course, predefined conditions may be combined with another predefined conditions and with other (user-defined) conditions. For example:
 

In this case, the report will only be executed during working days, if the report is not empty and if it is accepted by the manager.

We hope you like the new features as much as we do. Happy scheduling!

Object Resolver Query

Many terminal commands require identifying ReportServer objects. In order to easily identify these, we are consolidating the so called object resolver queries. These are standard ways of locating objects (entities) in ReportServer, e.g. Reports, Users, Groups, etc.. Entities are stored objects such as reports, users or TeamSpaces. You can find entities in the ReportServer source files by searching for classes annotated with “@Entity”. You can also find a list of all entities in our ReportServer SourceForge project https://sourceforge.net/projects/dw-rs/. Download the latest apidocs file from the src directory for this.

In ReportServer 3.0.6 and further versions, more and more commands will direclty support object resolver queries.

Currently, there are three object resolvers:

  1. ID Resolver: Allows you to locate an entity by its entity ID.
  2. Path Resolver: Allows you to find an entity by its Virtual File System path.
  3. HQL Resolver: Allows you to find entities by a HQL (Hibernate Query Language) query.

We will illustrate these object resolvers by using the locate command. Any other command supporting object resolvers works analogously to the examples provided below.

The locate command allows you, as its name suggests, to locate entities by using an object resolver query. Refer to the locate command documentation for more information on this.

The ID object resolver uses an entity ID for locating an entity. Since entity IDs are unique, the query resolves to zero or one entity. The syntax is: “id:EntityType:entityId” where “EntityType” is the specific entity class, e.g. “Report” or “TeamSpace”. Refer to the entity list mentioned above for the specific entity types. “entityId” is the specific entity ID. E.g.:

reportserver$ locate id:TableReport:123
Report Root/Dynamic Lists/myReport (Reportmanager)

The path resolver requires a Virtual File System path for locating the specific entity. Note that the path requires quotation marks if it contains spaces. E.g.:

reportserver$ locate "/reportmanager/Dynamic Lists/myReport"
Report Root/Dynamic Lists/myReport (Reportmanager)

You can also insert a relative path to the current location, e.g.:

reportserver$ locate myReport
Report Root/Dynamic Lists/myReport (Reportmanager)

Further, you can use an HQL query (Hibernate Query Language) for locating the needed entity or group of entities. Refer to https://docs.jboss.org/hibernate/orm/5.0/userguide/en-US/html/ch13.html for the HQL documentation. The syntax is: “hql:query” where the “query” is a valid select HQL query. Since HQL queries have blank spaces, quotation marks are needed. E.g.:

reportserver$ locate "hql:from TableReport where id=123"
Report Root/Dynamic Lists/myReport (Reportmanager)

You can also search for entity attributes, e.g.:

reportserver$ locate "hql:from TableReport where name like '%myReport%'"
Report Root/Dynamic Lists/myReport (Reportmanager)
Report Root/myReport2 (Reportmanager)

Try it out.


Performance

Who does not like to hear that? Performance is getting better searching and showing users.
Using ReportServer with a large number of users imposes some challenges on the software regarding user experience. We have improved this in many cases:
(We have identified some issues with a large number of nodes. In our tests, we had approx. 100 000 nodes in the system).

  1. Tree node selection: We changed most of the dialogs to use a dynamic node loading tree, i.e. the new functionalty does not load all nodes at the beginning, as in ReportServer 3.0.5. They now only load only what you see. This is done in an analogous way as the main tree, where you can open a node and the node’s children are loaded on-the-fly. With this new behavior, all trees are now loading in less than one second. Until ReportServer 3.0.5, and with 100 000 nodes, these needed more than 2 hours to load. We changed many dialogs to use this new behavior: e.g. the group administration dialogs, the TeamSpace administration dialogs, and the scheduler administration dialogs. Further, all old tree dialogs were replaced with this new behavior. For example, when you can search for a datasource, or for a file, the trees are not completely loaded at start, but on-the-fly.
  2. Search: since all trees in the node selection dialogs load on-the-fly, the search functionality becomes more and more important to perform well. We greatly improved performance by filtering only the needed number of results before the search is performed.

Please note that we have still some performance issues with large number of nodes, which we will handle in next ReportServer versions. Stay tuned for this. At the time – have fun trying!


Language support

Here we are, with more languages. Exactly, 34 will be added to the existing language support of 28 languages. So, in total, 62 languages are supported. Brilliant!

Of course, probably, no one speaks so many languages. Therefore, that this was done in a semi-automatic manner. So if you created a new language version, or improved an existing one, send us your excel language spreadsheet and we will include it into the official build. If you send us translations please include a short statement that you provide the translation under a creative commons zero (CC0 – http://creativecommons.org/publicdomain/zero/1.0/) license. More information on language support here.

You can also limit your number of languages from now on. In order to filter the languages shown to the user, ReportServer 3.0.6 has a new option in the localization.cf configuration file: “locales”. This property filters available languages.

<locales>en,fr,de</locales>

With this configuration, only english, french and german will be available for the user at the login screen. And you keep the overview!

Have fun exploring the new languages!