Skip to main content

Installation

This chapter describes how to install Reports on an on-premise Qmatic Orchestra system. Reports has two parts: the reports-backend service, which generates the reports and sends the e-mails, and the reports-frontend web app, which runs in Orchestra's WildFly server.

Prerequisites​

  • Qmatic Orchestra 7.3 or later, with the Orchestra database (qp_central) and the statistics database (statdb) installed.
  • PostgreSQL, Microsoft SQL Server or Oracle. See the Qmatic Orchestra datasheet for the supported operating systems and databases.
  • The Reports release package for your version: backend.zip and the frontend package (frontend.zip, with reports-frontend.war, reports-frontend-scripts, orchestra_sql.zip and application.png). Use a reports-backend of the same 3.4.x release as the frontend.
  • Administrator access to the Orchestra server and to the database server.
  • The Roboto font on the reports-backend server (needed for PDF reports).

Manual installation​

When you copy a command from this chapter, make sure it is on one line before you run it.

Install reports-backend​

  1. Extract backend.zip, for example to C:\qmatic\Reports (Windows) or /opt/qmatic/reports-backend (Linux, owned by a qmatic user).

  2. Install the Roboto font: download it from Google Fonts. On Windows, copy the font files to C:\Windows\Fonts. On Linux:

    mkdir roboto && unzip Roboto.zip -d roboto
    cp -rfv roboto /usr/share/fonts/ && cd /usr/share/fonts/roboto && fc-cache -fv
  3. Create the backend database: run the matching db-scripts/backend-schema-<db>.sql. The default database name is reports_backend.

  4. Edit config/application.properties:

    • server.http-port / server.https-port (defaults 8086 / 8446). Set server.ssl.enabled=true to use HTTPS.
    • spring.datasource.url, spring.datasource.username, spring.datasource.password for the reports_backend database. Enable the block for your database type.
    • The e-mail provider for scheduled reports: either SendGrid (sendgrid.email.no-reply, sendgrid.api-key) or SMTP (smtp.enabled=true, smtp.email.no-reply, spring.mail.host, spring.mail.port, spring.mail.username, spring.mail.password). You can't use both.
    • auth.users: the user name and password that reports-frontend uses to call the backend, as a JSON array. Use the same values in CRS_AUTH_USER below.
    • The statistics database: uncomment stat.datasource.url, stat.datasource.username and stat.datasource.password, for example jdbc:postgresql://<host>:5432/statdb?currentSchema=stat.
  5. Install and start the service:

    • Windows: run bin\install-reports-backend.bat as administrator, then start the Qmatic Reports Backend service.
    • Linux: make the scripts in bin executable, run sudo bin/install-reports-backend.sh (needs chkconfig), then sudo /etc/init.d/reports-backend start.
  6. If reports-backend uses a self-signed certificate, import it into the Orchestra truststore with the alias reports (System Administration > Settings > TrustStore Management) and restart Orchestra.

note

With SQL Server and Windows Authentication, use the *-sqlserver-integrated.sql scripts and access-mssql-integrated_frontend.sql, add integratedSecurity=true to the datasource URLs, and run the backend service as a domain user with the "Log on as a service" right.

Install reports-frontend​

  1. Create the frontend database: in reports-frontend-scripts, run the matching sql/frontend-schema-<db>.sql (postgres, postgres-linux, sqlserver, sqlserver-integrated or oracle). It creates the reports_frontend database with the scheduling tables and favorites.

  2. Update shiro.ini in <orchestra-home>/conf. Add these lines to the [urls] section:

    /reports-frontend/rest/** = qpBasicAuthc, noSessionCreation, modules[reports-frontend]
    /reports-frontend/** = saml2SecurityFilter, qpAuthc, modules[reports-frontend]
  3. Create the JNDI datasource: set JAVA_HOME to Orchestra's Java, then run bin/create-reports-frontend-jndi.bat or bin/create-reports-frontend-jndi.sh from reports-frontend-scripts. It adds the datasource java:/jdbc/reportFrontend for the reports_frontend database to standalone-full.xml. Check the database user and password in the datasource, then restart Orchestra.

  4. Edit standalone-full.xml (<orchestra-home>/app/wildfly<version>/standalone/configuration):

    • Exclude Reports from WildFly caching: in the qmatic-cache-control filter, set customPathsToExcludeFromFilter to /reports-frontend/.
    • Allow printing the PDF: in the Content-Security-Policy response header, change img-src * data: 'unsafe-inline'; to img-src * data: blob: 'unsafe-inline';.
  5. Set the environment variables in standalone.bat (Windows, set) or standalone.sh (Linux, export) in <orchestra-home>/app/wildfly<version>/bin:

    CRS_AUTH_USER={"user":"<backend user>","password":"<backend password>"}
    DATABASE=postgres
    ICRS_URL=http://<host>:8086/reports-backend

    DATABASE is postgres, mssql or oracle. Use https in ICRS_URL when reports-backend uses SSL. Restart Orchestra.

  6. Deploy reports-frontend, after reports-backend is running:

    • Option A: install the frontend package through Xtend.
    • Option B: manually:
      1. Unzip orchestra_sql.zip and run frontend_update_central_<db>.sql (postgres, sqlserver or oracle) on the qp_central database. It adds Reports to Orchestra Home.

      2. Add these lines at the end of <orchestra-home>/conf/lang/applicationMessages.properties:

        application.reports-frontend = Reports
        application.reports-frontend.description = View and schedule Canned Reports
      3. Copy reports-frontend.war to <orchestra-home>/custdeploy and restart Orchestra.

  7. Give access: in Orchestra, add the access module Reports to the roles of everyone who will use Reports.

  8. Check: log in to Orchestra and open the Reports tile. The Scheduled reports tab appears.

Upgrading​

  1. Upgrade reports-backend first, to the same 3.4.x release: stop the service, replace the application files, keep config/application.properties, and start the service.
  2. Redeploy reports-frontend: install the new frontend package through Xtend, or replace reports-frontend.war in <orchestra-home>/custdeploy.
  3. Your scheduled reports and favorites are kept. There are no database migration scripts for reports-frontend.
note

When you upgrade reports-backend from version 2.1.6 or earlier, add the SMTP properties to application.properties.

Configuration outside the app​

ItemWhereWhat it does
Access module ReportsOrchestra rolesUsers need it to open Reports.
Administrator rolesOrchestra rolesSystemAdministrator, BusinessAdministrator, MarketingAdministration, Client Admin or Calendar Admin: all branches and all scheduled reports. Other users: their own branches and their own scheduled reports.
Branch accessOrchestra usersThe branches a non-administrator can report on. For branch-level permissions, also add the bi module to /qsystem/rest/servicepoint/branches in shiro.ini, assign the Connector ServicePoint module to the BIUser role, and give users the BIUser role.
ICRS_URLstandalone.bat / standalone.shURL of reports-backend.
CRS_AUTH_USERstandalone.bat / standalone.shUser and password for calls to reports-backend; must match auth.users in the backend.
DATABASEstandalone.bat / standalone.shDatabase type of reports_frontend: postgres, mssql or oracle.
E-mail providerreports-backend application.propertiesSMTP or SendGrid settings for scheduled reports.
Statistics databasereports-backend application.propertiesConnection to statdb. Changes can take up to 10 minutes to apply (cache).
LanguageOrchestra language bundle reportsFrontendMessages_<lang>.propertiesOverrides the texts of Reports. Supported languages: English, German, Spanish, French, Italian, Dutch.
Favoritesreports_frontend databaseSaved per user; removed by clicking the star again.

Uninstalling​

  1. Remove reports-frontend.war from <orchestra-home>/custdeploy (or uninstall it through Xtend).
  2. Remove the two /reports-frontend/ lines from shiro.ini.
  3. Remove the access module Reports from the Orchestra roles.
  4. Stop and remove the reports-backend service.
  5. Optionally drop the reports_frontend and reports_backend databases and remove the java:/jdbc/reportFrontend datasource from standalone-full.xml.
  6. Restart Orchestra.

Troubleshooting​

The browser shows "too many redirects" after login​

The user's role doesn't have the access module Reports. Add the module to the role in Orchestra and log in again.

Reports fails to start after deployment​

reports-backend must be running before reports-frontend is deployed. Start the backend service, then delete reports-frontend.war.failed from <orchestra-home>/custdeploy to deploy again.

"The report could not be requested"​

Reports can't reach reports-backend. Check that the service is running, that ICRS_URL is correct (https when SSL is on), and that CRS_AUTH_USER matches auth.users in the backend. If the backend uses a self-signed certificate, import it into the Orchestra truststore.

Reports show no data​

Check the statistics database settings of reports-backend (stat.datasource.*). After a change, wait up to 10 minutes or restart the backend service. Non-administrators only see data for their own branches.

Scheduled reports are not received​

Check the e-mail provider settings in reports-backend and that the scheduled report is Active.

The print button of the PDF viewer does nothing​

Add blob: to img-src in the Content-Security-Policy header in standalone-full.xml (see Manual installation).