Thursday, 16 February 2012

NextReports: URL Custom Protocol & Version Dispatcher

When NextReports Server started its existence, users were able to upload reports and charts using server actions. This means:
  • a data source was already created
  • user selects the report from current location
  • user selects the existing data source
  • user selects the images used (if any) from current location
  • report/chart is uploaded in the current server path
After some versions, NextReports  Designer was able to allow publishing to server:
  • user selects server path
  • user selects a server data source; if there isn't created, he can publish it with a single click
  • when publish, used images are also published by default
Starting with version 5.1 a server action will allow to edit a report / chart with the designer:
  • no browsing needed
To allow this, a nextreports protocol is registered when NextReports Designer is installed. If this protocol is found, server edit action will open the designer asking for current logged user password:

After authentication, a data source is locally created (if not found) with following name convention:
Designer will auto-connect to this data source and the report/chart is downloaded. If a report/chart with the same name exists, user is notified:

After downloading, the report/chart is automatically opened and user can start to edit it. When user saves it, a confirmation is needed to publish it also on the server:

Server 'Edit' action will launch an url request like:
This can also be a simple  method to pass to someone a report to edit. If that person can access the report (has the needed rights) you do not need to tell him the server, location and let him download the report, modify it and publish it back. You just give him an url.

Specified version is used to open the needed designer which has the same version as the server avoiding following situations:
  • server version is older than designer version: you can download the report and edit it, but you cannot publish it to server
  • server version is newer than designer version: you cannot download the report
This is done by a dispatcher(installed with the designer) which is launched by nextreports URL protocol shell command.

If the designer with that version is not installed, user is informed and he can download the correct version from the links shown with the message:

If you are a Linux user, you do not have a dispatcher to start your needed version of NextReports, but you can register your nextreports url protocol with following commands:
gconftool-2 -t string -s /desktop/gnome/url-handlers/nextreports/command 
'<installed_dir>/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

No comments:

Post a Comment