Setting up the ad hoc reports export and dashboards export
In order for your users to be able to export ad hoc reports summaries and visualizations, and dashboards, you must configure your environment file.
To set up ad hoc reports export:
Download the PhantomJS executable from: https://phantomjs.org/download.html.
Extract and copy the executable to a file system location on the application server.
For Windows deployments only, ensure that the application server (NexJ Server or IBM WebSphere) User ID has “read” and “execute” permissions on the PhantomJS executable.
For Linux deployments only, a separate user must be preconfigured to run PhantomJS. This user defaults to
phantomjs
. You can override the default user by specifying thebireport.export.processUserLinux
root attribute in the environment file. The following example shows how to set up PhantomJS in CentOS 7:You may need to prefix the command lines with “sudo” when running them as non-root.
Set up the PhantomJS user with the following command:
POWERSHELLgroupadd -r phantomjs && useradd -r -g phantomjs -M -s /sbin/nologin -c "PhantomJS user" phantomjs
Install PhantomJS with the following commands and change the ownership of the install files to the
phantomjs
user. This step is optional as long as thephantomjs
user can run the PhantomJS executable.POWERSHELLyum -y install bzip2 fontconfig && \ curl https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -LO && \ tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/ && \ rm phantomjs-2.1.1-linux-x86_64.tar.bz2 && \ chmod 500 /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs && \ ln -sf /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/sbin && \ chown -R phantomjs /usr/local/share/phantomjs-2.1.1-linux-x86_64/ && \ chgrp -R phantomjs /usr/local/share/phantomjs-2.1.1-linux-x86_64
The user account running the application server (for example,
modeld
) needs to be able to sudo run PhantomJS asphantomjs
(for example,sudo -u phantomjs /usr/local/sbin/phantomjs
) without a password prompt. Sudo can be set up with the following commands:Replacemodeld
below ifmodeld
is not the user account running the application server and replace/usr/local/sbin/phantomjs
with the actual path to PhantomJS.POWERSHELLyum –y install sudo && \ echo 'modeld ALL = (phantomjs) NOPASSWD: /usr/local/sbin/phantomjs' > phantomjs && \ visudo -c -q -f phantomjs && mv phantomjs /etc/sudoers.d/ && chmod 440 /etc/sudoers.d/phantomjs
If running commands as non-root, change the ownership of
/etc/sudoers.d/phantomjs
to root using the following command:sudo chown root /etc/sudoers.d/phantomjs && sudo chgrp root /etc/sudoers.d/phantomjs
Specify
bireport.phantomjs.path="/usr/local/sbin/phantomjs"
in the environment file as described in step 5.
In your environment file, use the environment variable
bireport.phantomjs.path
to reference the full path to the PhantomJS executable, including the file name and extension.If this environment variable has not been set, the menu options to export summaries (Export Summary) and visualizations (Export Chart) are not visible.
When users are performing exports:
- A user must run a report or update a dashboard before they can export.
- If a report that has been run before has an export of the type chosen, the previously exported file is sent instead of exporting again.
- A summary is exported as a Microsoft Excel file in XLSX format.
- A visualization is exported as an image file in PNG format.
- Details are exported as a CSV file, but do not require PhantomJS to run.
- Users can choose to export dashboards to PDF or HTML.