Difference between revisions of "QPR Reporting Add-on"

From Mea Wiki
Jump to navigation Jump to search
 
(492 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==introduction==
+
== Introduction to QPR Reporting Add-on ==
 +
'''QPR Reporting Add-on''' contains the following parts:
 +
* [[QPR Word Reports]] (reports can also be shown as pdf!)
 +
* [[QPR PowerPoint Reports]]
 +
* [[QPR Web Views]]
 +
* [[QPR Reporting Expression Language]]
 +
* [[QPR_Reporting_Add-on#QPR Reports Menu|QPR Reports Menu]]
  
'''QPR Reporting Add-on''' is a combined installation package containing the following parts:
+
== Installation ==
 +
Follow these steps to install QPR Reporting Add-on. Installation package is available in the [[QPR_Product_Downloads#QPR_Reporting_Add-on|downloads page]].
  
: •QPR Web Views
+
Note that there are different folder paths for each QPR Suite version. These instructions use X in the folder names which should be replaced with the actual QPR Suite version.
: •QPR Word Reports
 
: •Expression Engine for QPR Suite
 
: •QPR Reports Menu
 
 
 
All parts except QPR Reports Menu are .Net 4.5 web services hosted in IIS, and they interact with QPR Suite using QPR Web Services interface. All parts also contain the common expression language.
 
 
 
In addition to the general installation instruction described by this document, the individual parts contain additional settings which are described in their own documentation.
 
 
 
QPR Reporting Add-on doesn’t have any compatibility defined for QPR Suite. See the compatibility of individual accelerators.
 
 
 
 
 
==installation==
 
 
 
Follow these steps to install QPR Reporting Add-on. There are different paths for each QPR Suite version. These instructions use X in the folder names, that is replaced by the number of the corresponding QPR Suite version.
 
 
 
1. Check whether the QPR environment uses '''Windows authentication''' (IWA) and/or '''HTTPS connection'''. Windows authentication is used when QPR system is connected to LDAP/AD and Windows user accounts are used to login to QPR. HTTPS connection is in use when QPR Portal url starts with “https”.
 
 
 
2. Open '''Programs and Features''' (in Windows '''Control Panel''') and click '''Turn Windows features on or off'''. Check that components listed in the following table are installed. The installation procedure depends on Windows version. QPR Reporting Add-on needs '''.Net Framework 4.5.1''' or later version.
 
  
 +
1. Check whether the QPR environment uses '''Windows authentication''' (IWA) and/or '''HTTPS connection'''. Windows authentication is used when QPR system is connected to LDAP/AD and Windows user accounts are used to login to QPR. HTTPS connection is in use when QPR Portal url starts with ''https''.
  
 +
2. Open '''Programs and Features''' (in Windows '''Control Panel''') and click '''Turn Windows features on or off'''. Check that components listed in the following table are installed. The installation procedure depends on Windows version. QPR Reporting Add-on needs '''.Net Framework 4.6.1''' or later version.
  
 
{| class="wikitable"
 
{| class="wikitable"
!windows version
+
!Windows Version
!required components
+
!Required Components
|- style="vertical-align:top;"
 
| '''Windows 10''' (already includes .NET Framework 4.6) || •All components in '''Internet''' '''Information''' <br> '''Services''' (except '''FTP''' '''Server''') <br>  •Following Windows features: (see image below) <br>  '''.Net Framework 4.6 Advanced Services > ASP.NET 4.6''' <br>  '''.Net Framework 4.5 Advanced Services > WCF Services > HTTP Activation''' [[File:Windows features 1.jpg]]
 
|- style="vertical-align:top;"
 
| '''Windows 8''' (already includes .NET Framework4.5.1) || •All components in '''Internet Information Services''' (except '''FTP Server''') <br>•Following Windows features: (see image below) <br> '''.Net Framework 4.5 Advanced Services > ASP.NET 4.5''' <br> '''.Net Framework 4.5 Advanced Services > WCF Services > HTTP Activation''' [[file:windows 8 features.jpg]]
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| '''Windows Server 2012 R2''' <br> (already includes .NET Framework 4.5.1) || •All components in '''Internet Information Services''' (except '''FTP Server''') <br> •Following Windows features: (see image below) <br> '''.Net Framework 4.5 Features > .Net Framework 4.5''' <br> '''.Net Framework 4.5 Features >
+
|'''Windows 10'''
'''ASP.NET 4.5 .Net Framework 4.5 Features > WCF Services > HTTP Activation''' [[File:Windows server 2012.jpg|600px]]
+
(already includes .NET Framework 4.6)
 +
||
 +
* All components in '''Internet''' '''Information Services''' (except '''FTP Server''' and '''WebDAV Publishing''')
 +
* Following Windows features: (see the image below)
 +
** '''.Net Framework 4.6 Advanced Services > ASP.NET 4.6'''
 +
** '''.Net Framework 4.6 Advanced Services > WCF Services > HTTP Activation'''
 +
[[File:Windows features 1.jpg]]
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| '''Windows''' Server 2012 (needed .Net Framework is not installed by default) || •All components in '''Internet Information Services''' (except '''FTP''' '''Server''') <br> •Following Windows features: <br> '''.Net Framework 4.5 Advanced Services > .Net Framework 4.5''' <br> '''.Net Framework 4.5 Advanced Services''' <br> > '''ASP.NET 4.5''' <br> '''.Net Framework 4.5 Advanced Services> WCF Services > HTTP Activation''' <br> •Install .Net Framework 4.5.2: <br> Online installer: http://www.microsoft.com/en-us/download/details.aspx?id=42643 <br> Offline installer: http://www.microsoft.com/en-us/download/details.aspx?id=42642
+
|'''Windows 8'''
|- style="vertical-align:top;"
+
(already includes .NET Framework 4.5.1)
| '''Windows Server 2008 R2''' <br> (needed .Net Framework is not installed by default) || •All components in '''Internet Information''' '''Services''' (except '''FTP Server''') <br> •All components in '''.Net Framework 3.5.1''' (see image below) <br> •Install .Net Framework 4.5.2: <br> Online installer: http://www.microsoft.com/en-us/download/details.aspx?id=42643 <br> Offline installer: http://www.microsoft.com/en-us/download/details.aspx?id=42642  [[File:Windows server 2008.jpg|600px]]
+
||
 +
* All components in '''Internet Information Services''' (except '''FTP Server''' and '''WebDAV Publishing''')
 +
* Following Windows features: (see the image below)
 +
** '''.Net Framework 4.5 Advanced Services > ASP.NET 4.5'''
 +
** '''.Net Framework 4.5 Advanced Services > WCF Services > HTTP Activation'''
 +
[[file:windows 8 features.jpg]]
 
|}
 
|}
  
3 Check that QPR Web Services web.config file is a proper one (located in '''C:\Program Files\QPR Software Plc\QPR 201X.1''' '''Servers\WebServices'''). In the default QPR installation there are files '''web.config''' and '''web.config.IWA.''' If QPR environment uses Windows authentication (refer to step 1), the latter file must be taken into use by renaming
+
3. (This step is for checking the QPR Suite has been configured properly.) Check that QPR Web Services web.config file is a proper one (located in '''C:\Program Files\QPR Software Plc\QPR 20XX.1''' '''Servers\WebServices'''). In the default QPR installation, there are files '''web.config''' and '''web.config.IWA'''. If QPR environment uses Windows authentication (refer to step 1), the latter file must be taken into use by renaming
 +
* '''web.config''' to '''web.config.noIWA''', and
 +
* '''web.config.IWA''' to '''web.config'''.
  
a. '''web.config''' to '''web.config.noIWA''', and
+
4. (This step is for checking the QPR Suite has been configured properly.) If using Windows authentication (refer to step 1), make sure '''C:\ProgramData\QPR Software\QPR 20XX\20XX.1\Servers\Settings\QPR_Servers.ini''' has settings '''IWACGIBinaryHost=127.0.0.1''' and '''CGIBinaryHost=127.0.0.1.''' under '''WAS Settings''' section.
  
b. '''web.config.IWA''' to '''web.config'''.
+
5. Common QPR authentication needs to be configured (to establish common authentication between QPR Suite WAS and WS). Follow these instructions: [[Common_QPR_Authentication#Configuring_Common_Authentication_for_QPR_Suite_Portal_and_QPR_Suite_Web_Service|Configuring Common Authentication for QPR Suite Portal and QPR Suite Web Service]].
  
4. If using Windows authentication (refer to step 1), make sure '''C:\ProgramData\QPR Software'''
+
5. Copy '''QPRWebServicesExtensions''' folder from installation package to IIS published files in '''C:\inetpub\wwwroot\'''.
'''\QPR 201X\201X.1\Servers\Settings\QPR_Servers.ini''' has setting
 
'''IWACGIBinaryHost=127.0.0.1''' and '''CGIBinaryHost=127.0.0.1.''' The file already contains these setting, but they may be empty. QPR service restart is needed if you need to change this setting.
 
  
5. Copy '''QPRWebServicesExtensions''' folder to IIS published files in '''C:\inetpub\wwwroot\''' (QPR Reporting Add-on can be deployed in any location in IIS, though).
+
6. Installation package contains the following preconfigured files to be used as QPR Reporting Add-on '''web.config''' file:
 +
* a) '''web.config''': for HTTP connection and Anonymous authentication to the Reporting Add-on
 +
* b) '''IWA.web.config''': for HTTP connection and Windows authentication to the Reporting Add-on
 +
* c) '''HTTPS.web.config''': for HTTPS connection and Anonymous authentication to the Reporting Add-on
 +
* d) '''HTTPS+IWA.web.config''': for HTTPS connection and Windows authentication to the Reporting Add-on
  
6. There are following preconfigured files available to be used QPR Reporting Add-on '''web.config''' file:
+
Copy a suitable configuration file to '''C:\inetpub\wwwroot\QPRWebServicesExtensions\''' folder and rename it as '''web.config'''.
  
: a) '''web.config''': for HTTP connection and Anonymous authentication
+
Do not mix up <u>QPR Reporting Add-on's</u> web.config file (in '''C:\inetpub\wwwroot\QPRWebServicesExtensions\''') with <u>QPR Web Services'</u> web.config file (in '''C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices\web.config''').
: b) '''IWA.web.config''': for HTTP connection and Windows authentication
 
: c) '''HTTPS.web.config''': for HTTPS connection and Anonymous authentication
 
: d) '''HTTPS+IWA.web.config''': for HTTPS connection and Windows authentication
 
  
Copy a suitable config file to QPRWebServicesExtensions folder and rename as '''web.config''' ('''C:\inetpub\wwwroot\QPRWebServicesExtensions\web.config'''). Please do not mix up QPR
+
7. Configure QPR Reporting Add-on settings listed in the [[#Web.config_File_Settings|Settings]] section. The settings are located in the '''C:\inetpub\wwwroot\QPRWebServicesExtensions\web.config''' file in the '''appSettings''' section. Quick guide for usual configurations (file '''C:\inetpub\wwwroot\QPRWebServicesExtensions\web.config'''):
Reporting Add-on web.config file (in '''C:\inetpub\wwwroot\QPRWebServicesExtensions \web.config''') with QPR Web Services web.config file (in '''C:\Program Files\QPR Software Plc \QPR 201X.1 Servers\WebServices\web.config''').
+
* a. When Windows authentication is not in use and [[Common QPR Authentication]] is used: '''wcfsecuritymode=none''' and '''qprauthenticationmode=commonqprauthentication'''
 +
* b. When Windows authentication is in use: '''wcfsecuritymode=message''' and '''qprauthenticationmode=windows'''
  
7. Make sure QPR Web Services Server is running: See in the '''Windows Task Manager''' (in '''Details''' tab) that there is a process '''Qpr.WebServices.Server.exe.''' The installation cannot be continued until QPR Web Services Server is running properly.
+
8. Make a backup copy of the '''C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices\servicetester.aspx''' file. Replace the file with the '''servicetester.aspx.''' file from the installation package.
  
 +
9. Make sure QPR Web Services Server is running. The installation cannot be continued until QPR Web Services Server is running properly.
  
8. Set the parameters in the QPRWebServicesExtensions web.config’s '''appSettings''' section. Parameters are listed in Settings.
+
10. In '''IIS Management Console''', go to '''Application Pools''' (in left side hierarchy). Create a new application pool by clicking '''Add''' '''Application Pool'''…. Use the settings in the image below (settings '''v.4.0.x''' and '''Integrated'''). Please do not change settings for existing application pools, if they are used by other web applications because then the other applications may stop working. Especially QPR Suite has an application pool that is '''v.2.0.x''' and '''Integrated'''.<br><br>[[File:Add application pool.jpg]]
  
9. In '''IIS Management Console''', go to '''Application Pools''' (in left side hierarchy). Create a new application pool by clicking '''Add''' '''Application Pool'''…. Use the settings in the image below (settings '''v.4.0.x''' and '''Integrated'''). Please do not change settings for existing application pools, if they are used by other web applications because then the other applications may stop working. Especially QPR Suite has an application pool that is '''v.2.0.x''' and '''Integrated.'''[[File:Add application pool.jpg]]
+
11. Click the previously created application pool, click '''Advanced settings'''… and select '''Identity''' setting. In the opening '''Application Pool Identity''' window, click '''Built-in account''' and select '''LocalSystem''' (see the image below). Click '''OK''' for the both open windows.<br><br>[[File:Application pool.jpg]]
  
10. Click the previously created application pool, click '''Advanced settings'''and select '''Identity''' setting. In the opening '''Application Pool Identity''' window, click '''Built-in account''' and select '''LocalSystem''' (see the image below). Click '''OK''' for the both open windows.[[File:Application pool.jpg|500px]]
+
12. Find the QPRWebServicesExtensions folder in '''IIS Management Console''' and click '''Convert to Application''' (secondary mouse button). Select the previously created application pool '''QPR Web Services Extensions'''.
  
11. Find the QPRWebServicesExtensions folder in '''IIS Management Console''' and click '''Convert to Application''' (secondary mouse button). Select the previously created application pool '''QPR Reporting Add-on.'''
+
13. Check the IIS authentication settings by clicking QPRWebServicesExtensions web application is IIS Management Console (on the left side hierarchy). Check that '''Features View''' is opened (in bottom), and doubleclick '''Authentication'''. The authentication settings must match with the web.config file, which was set in step 3:
 +
a. For <u>Windows authentication</u>: '''Anonymous Authentication''' must be '''Disabled''' and '''Windows Authentication''' must be '''Enabled.''' (see the image below)
 +
b. For <u>Anonymous authentication</u>: '''Anonymous Authentication''' must be '''Enabled''' and '''Windows Authentication''' must be '''Disabled.'''
 +
'''ASP.NET Impersonation''' must be '''Enabled''' in both cases.
  
12. Check the IIS authentication settings by clicking QPRWebServicesExtensions web application is IIS Management Console (on the left side hierarchy). Check that '''Features View''' is opened (in bottom), and doubleclick '''Authentication'''. The authentication settings must match with the web.config file, which was set in step 3:
+
[[File:Authentication.jpg]]
  
a. For Windows authentication: '''Anonymous Authentication''' must be '''Disabled''' and '''Windows Authentication''' must be '''Enabled.''' (see the image below)
+
14. Check that QPR Reporting Add-on is working by making the tests listed in chapter [[#Installation_Test|Installation tests]]. If you encounter any issues, check if any of the error situations described in [[#Troubleshooting_Installation_Issues|Troubleshooting]] were encountered.
  
b. For Anonymous authentication: '''Anonymous Authentication''' must be '''Enabled''' and '''Windows Authentication''' must be '''Disabled.'''
+
15. These rest steps are only needed when using the Reporting Add-on in the QPR Suite portal. Copy '''DWV templates''' folder from installation package as a DWV templates root folder (setting '''dwvtemplatesphysicalpath''' in QPR Reporting Add-on’ web.config file). Also copy Word report templates folder as the templates root folder (setting '''dwrtemplatesphysicalpath''' in QPR Reporting Add-on’ web.config file) and '''trend_down.png''' and '''trend_up.png''' files from '''DWV templates\Dashboard''' folder to '''C:\inetpub\wwwroot\qpr20XX-1\qprsoftware\portal\images'''.
  
[[File:Authentication.jpg|400px]]
+
16. Deploy Reports Menu UI element to the Portal by replacing '''mainview.tpl''' and '''headerview.tpl''' files from the installation package '''Reports Menu''' folder to '''C:\ProgramData\QPR Software\QPR 20XX\20XX.1\Servers\Templates\WAS\Portal'''. (Alternatively, use the '''externalreportsmenu.patch''' file.)
  
13. Replace the file '''C:\Program Files\QPR Software Plc\QPR 201X.1 Servers\WebServices \servicetester.aspx''' with the new '''servicetester.aspx.''' Make a backup copy of the original file with name '''servicetester.aspx.original'''. (Alternatively, use the '''servicetester.patch''' file that described the changes to the servicetester.aspx file.)
+
17. Copy '''icon_reports.png''' from '''Reports Menu''' folder to '''C:\inetpub\wwwroot\qpr20XX-1\qprsoftware\portal\images'''.
  
14. Configure QPR Reporting Add-on '''settings''' listed in Settings. Especially check the '''qprwebserviceaddress''' carefully. Quick guide for usual configurations:
+
18. Copy '''jquery.filedownload.js''' from '''Reports Menu''' folder to '''C:\inetpub\wwwroot\qpr20XX-1\qprsoftware\Common\scripts'''.
  
:c. When Windows authentication is not in use: '''wcfsecuritymode=none''' and '''qprauthenticationmode=passedsession'''
+
19. Add the following CSS to '''C:\inetpub\wwwroot\qpr20XX-1\qprsoftware\stylesheets\custom.css''':
 +
<pre>
 +
#ReportsToolbarMenu {
 +
  cursor: pointer;
 +
}
  
:d. When Windows authentication is in use: '''wcfsecuritymode=message''' and '''qprauthenticationmode=windows'''
+
#ReportsToolbarMenu .activetarget {
 +
  background-color: inherit;
 +
}
  
15. Configure individual report part’s settings, which are mentioned in the documentation of the report part. It’s sufficient to do this only for those parts that need to be set operational.
+
.visiblereportmenulink, .reportmenumain > a {
 +
  background: url(../portal/images/icon_reports.png) no-repeat left -1px;
 +
}
  
16. Create folder '''C:\temp.''' It is possible to use other folder but its location must be changed to web.config '''temppath''' setting.
+
.disabledreportmenulink {
 +
  background: url(../portal/images/icon_reports.png) no-repeat left -1px;
 +
  color: #BBBBBB !important;
 +
  cursor: default;
 +
}
  
17. Check that QPR Reporting Add-on is working by making the tests listed in chapter '''Installation tests'''. If you encounter any issues, check if any of the error situations described in '''Troubleshooting''' were encountered.
+
#InformationViewFrame {
 
+
   background-color: white;
18. Copy '''DWV templates''' folder as a DWV templates root folder (setting dwvtemplatesphysicalpath in QPR Reporting Add-on’ web.config file). Also copy DWR templates folder as a DWR templates root folder (setting dwrtemplatesphysicalpath in QPR Reporting Add-on’ web.config file) and '''trend_down.png and trend_up.png''' files from '''DWV templates\Images folder to C:\inetpub \wwwroot\qpr201X-1\qprsoftware\portal\images.'''
 
 
 
19. Deploy Reports Menu addon by replacing '''mainview.tpl''' and '''headerview.tpl''' in '''C:\ProgramData
 
\QPR Software\QPR 201X\201X.1\Servers\Templates\WAS\Portal''' with the files from the '''Reports Menu folder'''. (Alternatively, use the '''externalreportsmenu.patch''' file.)
 
 
 
20. Copy '''icon_reports.png''' from '''Reports Menu folder''' to '''C:\inetpub\wwwroot\qpr201X-1 \qprsoftware\portal\images.'''
 
 
 
21. Copy '''jquery.filedownload.js''' from '''Reports Menu folder''' to '''C:\inetpub\wwwroot\qpr201X1\qprsoftware\Common\scripts.'''
 
 
 
22. Add the following CSS to '''C:\inetpub\wwwroot\qpr201X-1\qprsoftware\stylesheets \custom.css:'''
 
<pre>
 
#ReportsToolbarMenu {  cursor: pointer; }
 
#ReportsToolbarMenu .activetarget {  background-color: inherit; }
 
.visiblereportmenulink, .reportmenumain > a {  background: url(../portal/images/icon_reports.png) no-repeat left -1px; }
 
.disabledreportmenulink {   background: url(../portal/images/icon_reports.png) no-repeat left -1px;  color: #BBBBBB !important;  cursor: default; }
 
#InformationViewFrame {   background-color: white;
 
 
}
 
}
 
 
</pre>
 
</pre>
  
10. Restart Windows service for QPR Suite, or clear QPR Portal templates cache. In addition, clear web browser’s cache.
+
20. Restart Windows service for QPR Suite, or clear QPR Portal templates cache ('''<nowiki>http://SERVERNAME/QPR20XX-1/Portal/QPR.Isapi.dll?QPRWAS&*cleartemplatecache</nowiki>'''). In addition, clear web browser’s cache.
  
 +
21. Check that the [[Enable_Detailed_Error_Messages_in_IIS|detailed error message are enabled in IIS]].
  
===settings===
+
=== Web.config File Settings ===
 +
QPR Reporting Add-on is configured using the '''C:\inetpub\wwwroot\QPRWebServicesExtensions\web.config''' file. The file has following settings in the '''configuration > appSettings''' section.
  
QPR Reporting Add-on is configured using the file C:\inetpub\wwwroot\QPRWebServicesExtensions \web.config. The file has following settings in the '''configuration > appSettings''' section. The greyed settings are unusual, so for most installations they can be ignored.
+
{| class="wikitable"
 +
! Attribute
 +
! Description
 +
|- style="vertical-align:top;"
 +
|qprwebserviceaddress
 +
||QPR Web Service url address. This should point directly to QPR Web Service server’s port. The default port is 9002, but the actual port in use can be seen in '''QPR Configuration Manager (Common > Server locations > Web services server)'''. Example: <nowiki>http://localhost:9002/QPR20XX-1/Portal/QPR.Isapi.dll/wsforward/mainservice.svc/wshttp</nowiki>
  
{| class="wikitable"
+
Notes:
! attribute
+
* It's recommended to use '''localhost''' as a hostname if the QPR Web Service Server is in the same computer.
! description
+
* The address starts with '''http''' even if QPR environment uses https.
 +
* Check the proper url path from QPR Portal address ('''QPR20XX-1''' in the example). The path is QPR version specific by default.
 +
* Validity of the address can be checked by opening the address in the server computer using browser without the ending '''/wshttp''', e.g. <nowiki>http://localhost:9002/QPR20XX-1/Portal/QPR.Isapi.dll/wsforward/mainservice.svc</nowiki>. A page displaying '''You have created a service''' should open. Note that this address doesn't work in client computers (this is because '''localhost''' always references to that computer where the browser is running).
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| qprwebserviceaddress || QPR Web Services’ url address. This should point  directly to QPR Web Services server’s port. The default port is 9002, but the actual port in use can  be seen in '''QPR Configuration Manager  (Common > Server locations > Web services server)'''. <br> Example: <nowiki>http://localhost:9002/QPR201X-</nowiki> <br> 1/Portal/QPR.Isapi.dll/ wsforward/mainservice.svc/wshttp Notes: <br> • It’s recommended to use '''localhost''' as a hostname if the QPR Web Services Server is in the same computer. <br> • The address starts with '''http''' even if QPR environment uses https. <br> • Check the proper url path from QPR Portal address ('''QPR201X-1''' in the example). The path is QPR version specific by default. <br> • Validity of the address can be checked by opening the address in the server computer using browser without the ending /wshttp, e.g. <nowiki>http://localhost:9002/QPR201X-1/Portal/QPR.Isapi.dll/wsforward/</nowiki> mainservice.svc. A page displaying '''You have created a service''' should open. Note that this address doesn’t work in client computers (this is because “localhost” always references to that computer where the browser is running).
+
|qprauthenticationmode
 +
||Determines how the Reporting Add-on authenticates users to QPR Web Service. There are following options:
 +
* '''windows''': Windows user making the request is used to authenticate to QPR Web Service. It’s advisable to use this authentication method if available. If the session id is provided (in the xsession parameter) while the windows authentication mode is used, the provided session id is not used. When this option is used, ''wcfsecuritymode'' must be ''message''. Note that when using QPR Reporting Add-on with QPR UI, the setting cannot be used, because QPR UI connects to the Reporting Add-on using the user account which runs the Payara web server (not the person's user account).
 +
* '''commonqprauthentication''': [[Common_QPR_Authentication|Common QPR authentication]] is a mechanism where QPR products have been configured to trust each other in a way that when a user is authenticated to one of the products, the user is also authenticated to other QPR products as well. When common QPR authentication is in use, session id of the source QPR system is passed as a parameter to the Reporting Add-on. Note that the session id doesn't need to be the QPR Web Service session id, but the session id of any QPR product may be used. The ''xsession'' parameter is used to pass the common authentication session id. This options can be used when ''wcfsecuritymode'' is either ''none'' or ''message''. Also the token authentication introduced in QPR Suite 2019.1 works with the ''commonqprauthentication'' setting.
 +
* '''fixedcredentials''': The defined user account is used for all access to QPR Web Service. The account's username and password are defined in the configuration (see settings username and password). Note that from the data security point of view this is not the best option, because users running the reports may see data that they don't see in their own account. If the session id is provided (in the xsession parameter), when the fixedcredentials authentication mode is used, the provided session id is used instead of authenticating using the fixed credentials. This options can be used when ''wcfsecuritymode'' is either ''none'' or ''message''.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| wcfsecuritymode || QPR Web Services security settings. Must correspond to QPR Web Services settings (in C:\Program Files\QPR Software Plc\QPR 201X.1 Servers\WebServices\web.config). (Refer to step 3 in the installation instructions.) Options: <br> •  '''none''': Use this when Windows authentication is not in use. <br>  • '''message''': Use this when Windows authentication is in use <br> • '''transport''': Usually not used. <br> • '''transportwithmessagecredential''': Usually not used.
+
|wcfsecuritymode
 +
||
 +
This setting defines which security settings are used by the QPR Web Service (i.e. whether the Windows authentication is in use). This setting must correspond to QPR Web Service settings (in '''C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices\web.config'''). Options:
 +
* '''none''': Use this when Windows authentication in the QPR Web Service is not in use.
 +
* '''message''': Use this when Windows authentication in the QPR Web Service is in use.
 
|- style="vertical-align:top;"  
 
|- style="vertical-align:top;"  
| qprauthenticationmode || • '''passedsession''': QPR Web Services’ session id must be passed as a parameter. The parameter is passed differently in different accelerators. This options is usually used when wcfsecuritymode is none, but also message is possible. <br> • '''windows''': Windows user making the request is used to authenticate to QPR Web Services. When this option is used, wcfsecuritymode must be message (none is not possible). <br> • '''commonqprauthentication''': Common QPR authentication is a mechanism where QPR Suite products have been configured to trust each other in a way that when a user is authenticated to one of the products, the user is also authenticated to other QPR suite products as well. More information: <br> https://devnet.onqpr.com/pawiki/index.php/Common_QPR_Authentication#Linking_between_QPR_Products.
+
| dprtemplatesphysicalpath
When common QPR authentication is in use, session id of the source QPR Suite system is passed as a parameter to QPR Web Services Extensions. <br> • '''fixedcredentials''': A single user account is used for all requests. The account’s username and password are defined in the configuration (see settings username and password). This options is not usually used. <br> For more information, see '''Authentication and Data Security'''
+
||Folder in the file system where QPR PowerPoint Reports template files are located.
 +
|- style="vertical-align:top;"
 +
| dwrtemplatesphysicalpath
 +
||Folder in the file system where QPR Word Reports template files are located.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| dwrtemplatesphysicalpath || Folder in the file system where QPR Word Reports template files are located.
+
|dwvtemplatesphysicalpath
 +
||Folder in the file system where QPR Web Views template files are located.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| dwvtemplatesphysicalpath || Folder in the file system where QPR Web Views template files are located.
+
| installpath
|- style="vertical-align:top;"
+
||Path for QPR Web Services Extensions binaries installation folder, which is by default '''C:\inetpub\wwwroot\QPRWebServicesExtensions'''. This information is needed by Expression language WebpageAsImage function.
| installpath || Path for QPR Web Services Extensions binaries installation folder, which is by default '''C:\inetpub\wwwroot\QPRWebServicesExtensions'''. This information is needed by Expression language WebpageAsImage function.
 
|- style="vertical-align:top;"
 
| temppath || Path to a file where Reporting Add-on may write temporary files.
 
 
|- style="vertical-align:top;"  
 
|- style="vertical-align:top;"  
| templatecaching || Determines whether template files caching is enabled ('''true''') or disabled ('''false'''). Template caching means that templates are read from file system to server memory when the IIS web application starts. When template caching is enabled, pages are processed faster and disk load as reduces. Template caching should be enabled for production environments. <br>
+
| templatecaching
 +
||Determines whether template files caching is enabled ('''true''') or disabled ('''false'''). Template caching means that templates are read from file system to server memory when the IIS web application starts. When template caching is enabled, pages are processed faster and disk load as reduces. Template caching should be enabled for production environments.<br>
 
Template caching is usually be disabled for development work, so that changes in templates can be seen immediately in result pages. When template caching is disabled, all templates are read into memory every time, when a page is requested.
 
Template caching is usually be disabled for development work, so that changes in templates can be seen immediately in result pages. When template caching is disabled, all templates are read into memory every time, when a page is requested.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| disallowedfunctions || Comma separated list of functions that are not allowed to be executed by the Reporting Add-On. There are some functions which are able to manipulate files in the server computer, and enabling those files may cause security issues. Function names must be written in lowercase.
+
| disallowedfunctions ||Comma separated list of functions that are not allowed to be executed by the Reporting Add-On. There are some functions which are able to manipulate files in the server computer, and enabling those files may cause security issues. Function names must be written in lowercase.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| loglevel || Possible values: None, Error, Information, Verbose.
+
| loglevel
 +
||Possible values: '''None''', '''Error''', '''Information''' and '''Verbose'''.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| qprwebapplicationname || Setting for Dynamic Web Views: Name of the QPR web application in IIS. This parameter is not mandatory, but it should be defined, as it can be used by html content to reference QPR resources published in IIS (such as images and css files).
+
|qprwebapplicationname
 +
||Setting for Dynamic Web Views: Name of the QPR web application in IIS. This parameter is not mandatory, but it should be defined, as it can be used by html content to reference QPR resources published in IIS (such as images and css files).
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| reporttemplateparameter || Setting for Word reports: Defines the name of the parameter which passes the report template path. See chapter Working with Report Templates
+
| reporttemplateparameter
 +
||Setting for Word reports: Defines the name of the parameter which passes the report template path. See chapter [[QPR_Word_Reports#Working_With_Report_Templates|Working with Report Templates]].
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| qprtemplateidparameter || Setting for Word reports: Parameter name which passes QPR’s Word report template object id. This can be used when the report templates are stored in QPR Portal (i.e. QPR system objects) (see chapter Working with Report Templates)
+
| qprtemplateidparameter
 +
||Setting for Word reports: Parameter name which passes QPR’s Word report template object id. This can be used when the report templates are stored in QPR Portal (i.e. QPR system objects) (see chapter [[QPR Reporting Add-on#Working With Report Templates|Working with Report Templates]])
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| defaultimageformat || Setting for Word reports: Default image format for QPR Web Service’s GetGraph operation. This setting is used if image format is not explicitly defined
+
| username
 +
||Password for QPR Suite when ''authenticationmode'' is ''fixedcredentials''.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| username || Password for QPR Suite when authenticationmode is fixedcredentials.
+
| password
 +
||Password for QPR Suite when ''authenticationmode'' is ''fixedcredentials''.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| password || Password for QPR Suite when authenticationmode is fixedcredentials.
+
| executionTimeout (in the httpRuntime tag)
|- style="vertical-align:top;"
+
||Timeout for request processing in seconds. Usually there is no need to change this setting. The value should be increased if there are heavy requests which take time to run. Note that the timeout limit works as a protection when the processing never ends as a results of an error (this may be possible in e.g. recursive reports).
| executionTimeout (in the httpRuntime tag) || Timeout for request processing in seconds. Usually there is no need to change this setting. <br>
 
The value should be increased if there are heavy requests which take time to run. Note that the timeout limit works as a protection when the processing never ends as a results of an error (this may be possible in e.g. recursive reports).
 
 
|}
 
|}
  
===installation test===
+
===Installation Test===
  
 
Do the following tests to confirm that QPR Reporting Add-on is working:
 
Do the following tests to confirm that QPR Reporting Add-on is working:
  
: 1. 1. Open QPR Web Services Tester, which is usually in '''<nowiki>http://SERVERNAME/QPR201X-1/</nowiki> Portal/QPR.Isapi.dll/wsforward/servicetester.aspx'''. The SERVERNAME can be found in QPR Portal url address. The address starts with https instead of http, when also QPR Portal address starts with https.
+
# Open '''<nowiki>http://SERVERNAME/QPRWebServicesExtensions/ExpressionEngine.svc</nowiki>.''' The address starts with '''https''' instead of '''http''', when also QPR Portal address starts with '''https'''. There should open a page stating '''You have created a service.''' If an internal server error (error code 500) with no error details is returned, test the url in the server, because in the server the error message has more details.
 
+
#* If this works, the .Net application is running properly in IIS.
: 2. Check that the page contains '''RunExpression''' tab.
+
#* If this doesn’t work, <u>there is a problem with IIS settings or .Net installation</u>.
 
+
# Open QPR Web Services Tester, which is usually in '''<nowiki>http://SERVERNAME/QPR20XX-1/Portal/QPR.Isapi.dll/wsforward/servicetester.aspx</nowiki>'''. The SERVERNAME can be found in QPR Portal url address. The address starts with https instead of http, when also QPR Portal address starts with https.
: 3. Set valid credentials in the '''Authentication''' tab.
+
# Set valid credentials in the '''Authentication''' tab. Confirm that QPR Web Services is working by making a query using QPR Web Services Tester in the QueryObjects tab.
 
+
# Check that the page contains '''RunExpression''' tab.
: 4. Go to RunExpression tab click '''Run''' using the expression it contains by default. It should return '''Ok''' (below the Run button). This confirms that the .Net 4.5 application is running in IIS and the QPR Web Services connection works.
+
# Query for example '''[UM].users''' like in the image below. When clicking '''QueryObjectsAsXml''', the test is successful, if a text starting with '''<ResultsetHierarchy''' … appears. Note that your query results may be different than the results in the image. If this test doesn’t work, <u>there is a problem with QPR Web Services</u>.
 
+
<br>
:: a. If this works, you may stop testing here.
 
 
 
:: b. If this doesn’t work, there is a problem with IIS settings or .Net 4.5 installation.
 
 
 
: 5. Open '''<nowiki>http://SERVERNAME/QPRWebServicesExtensions/ExpressionEngine.svc</nowiki>.''' The address starts with https instead of '''http''', when also QPR Portal address starts with '''https'''. There should open a page stating '''You have created a service.''' If an internal server error (error code 500) with no error details is returned, test the url in the server, because in the server the error message has more details.
 
 
 
:: a. If this works, the .Net 4.5 application is running properly in IIS. Go to step 6.
 
 
 
:: b. If this doesn’t work, there is a problem with IIS settings or .Net 4.5 installation.
 
 
 
: 6. Confirm that QPR Web Services is working by making a query using QPR Web Services Tester in the QueryObjects tab. You can query for example '''[UM].users''' like in the image below. When clicking '''QueryObjectsAsXml''', the test is successful, if a text starting with
 
'''<ResultsetHierarchy''' … appears. Note that your query results may be different than the results in the image. If this test doesn’t work, there is a problem with QPR Web Services.
 
 
 
 
[[File:installation test.jpg]]
 
[[File:installation test.jpg]]
 +
<br>
 +
: 6. Go to RunExpression tab, click '''Run''' using the expression it contains by default. It should return '''Ok''' (below the Run button). This confirms that the .Net application is running in IIS and the QPR Web Services connection works.
  
===Authentication and Data Security===
+
=== Running Multiple QPR Reporting Add-ons ===
 
+
It may be needed to run multiple QPR Reporting Add-on instances in the same server machine, e.g. when different versions or different QPR Reporting Add-on settings are needed. Running multiple QPR Reporting Add-on instances simultaneously is possible: Copy the '''QPRWebServicesExtensions''' folder with a different name to IIS root folder, and make all the settings made to the default folder to that folder. The other instance is referenced using the other folder name in URLs.
This chapter contains information about authentication and data security of the add-on and QPR Suite to make the installation successful also from security point of view. The add-on needs to authenticate to QPR Web Services to get needed data. There are three methods to authenticate:
 
 
 
: • Use Windows authentication. Windows user authenticates to the add-on (provided by IIS), and same user is used to authenticate to QPR Web Service (this is called impersonation). It’s advisable to use this authentication method if available.
 
 
 
: • Pass QPR Web Service’s session id as a url parameter to the template. The accelerator uses the session id directly when accessing to QPR Web Services. This approach requires a functionality in QPR Portal to first authenticate to QPR Web Service and then pass the session id to the template. Use this authentication method, if Windows authentication is not possible.
 
 
 
: • Preset username and password (either QPR or Windows user) in QPR Reporting Add-on configuration. These credentials are used by the add-on when logging in to QPR Web Services. This authentication method is only used for special purposes.
 
 
 
Preset username and password (either QPR or Windows user) in QPR Reporting Add-on configuration. These credentials are used by the add-on when logging in to QPR Web Services. This authentication method is only used for special purposes.
 
 
 
===Running Multiple QPR Reporting Add-on Instances Simultaneously===
 
 
 
It may be required to run multiple QPR Reporting Add-on instances simultaneously, e.g. when different versions or different QPR Reporting Add-on settings are needed. Running multiple QPR Reporting Add-on instances simultaneously is possible: Copy the QPRWebServicesExtensions folder with a different name to IIS root folder, and make all the settings made to the default folder to that folder. The other instance is referenced using the other folder name in URLs.
 
 
 
===Uninstallation===
 
 
 
Follow these steps to uninstall QPR Reporting Add-on:
 
 
 
: 1. In '''IIS Management Console click''' '''Remove''' for the '''QPRWebServicesExtensions''' web application (mouse secondary button).
 
 
 
: 2. Delete the web application’s folder '''C:\inetpub\wwwroot\QPRWebServicesExtensions''' in the disk.
 
 
 
: 3. Revert the original '''C:\Program Files\QPR Software Plc\QPR 201X.1 Servers\WebServices \servicetester.aspx''' from release package.
 
 
 
===Troubleshooting===
 
  
 +
=== Troubleshooting Installation Issues ===
 
{| class="wikitable"
 
{| class="wikitable"
!issue
+
!Issue
!resolution
+
!Resolution
|- style="vertical-align:top;"
+
|-
| Web browser returns: <br> Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. || See the resolution here: https://support.microsoft.com/en-us/kb/2015129
+
| Web browser returns ''Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.''
|- style="vertical-align:top;"
+
|| See the resolution here: https://support.microsoft.com/en-us/kb/2015129
| Web browser returns: <br> Memory gates checking failed because the free memory (nnn bytes) is less than x% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element. || The reason for this error is that there is little free memory in the system, and thus the primary solution is to get more free memory in the system. It’s still possible to set the free memory limit to a lower level, but this may cause instability. To do that, find the setting minFreeMemoryPercentageToActivateService from the QPR Web Services Extensions’ web.config and set the limit lower (e.g. to 2). More information:
+
|-
 +
|Web browser returns: ''Memory gates checking failed because the free memory (nnn bytes) is less than x% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.''
 +
|| The reason for this error is that there is little free memory in the system, and thus the primary solution is to get more free memory in the system. It’s still possible to set the free memory limit to a lower level, but this may cause instability. To do that, find the setting minFreeMemoryPercentageToActivateService from the QPR Web Services Extensions’ web.config and set the limit lower (e.g. to 2). More information:
 
https://msdn.microsoft.com/en-us/library/dn458357(v=vs.110).aspx
 
https://msdn.microsoft.com/en-us/library/dn458357(v=vs.110).aspx
|- style="vertical-align:top;"
+
|-
| Following errors are returned by Expression Engine tester: The message with Action 'http:// schemas.xmlsoap.org/ws/2005/02/trust/RST/ Issue' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding\security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint. || The reason is the QPR Web Services and QPR Web Services Extensions WCF settings don’t match. Please check installation steps 3, 4 and 6.
+
||Web Server returns ''Request URL Too Long'' and ''HTTP Error 414. The request URL is too long.''
|- style="vertical-align:top;"
+
||Open '''IIS Management Console''', open '''QPR Web Services Extensions''', click '''Request Filtering''', click '''Edit Feature Settings...''' and increase '''Maximum URL length (Bytes)''' setting (e.g. add two or three zeroes at the end).
| When opening QPR Web Services Tester, the following message appears … '''Redirecting to mainservice page''' …. || There may be a problem with IIS handler mappings. Tests with following settings: <br> Remove '''C:\inetpub\wwwroot\web.config''' if it exists. Make a backup before deleting. <br> '''Contents of C:\inetpub\wwwroot\qpr201X-1\web.config should be'''
+
|-
|}
+
|Following errors are returned by Expression Engine tester: ''The message with Action 'http:// schemas.xmlsoap.org/ws/2005/02/trust/RST/ Issue' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding\security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint.''
<pre>
+
||The reason is the QPR Web Services and QPR Web Services Extensions WCF settings don’t match. Please check installation steps 3, 4 and 6.
 +
|-
 +
||
 +
When running a report, the following error appears:
 +
<pre>
 +
Requested registry access is not allowed.
 +
The type initializer for 'MS.Utility.EventTrace' threw an exception.
 +
Error in opening document - the document is not valid Office Open XML format
 +
</pre>
 +
||
 +
This is a user rights issue. Check that the ''Application Pool Identity'' is ''LocalSystem''.
 +
 
 +
|-
 +
|When opening QPR Web Services Tester, the following message appears: ''... Redirecting to mainservice page ...''.
 +
||There may be a problem with IIS handler mappings. Tests with following settings:
 +
* Remove '''C:\inetpub\wwwroot\web.config''' if it exists. Make a backup before deleting.
 +
* Contents of '''C:\inetpub\wwwroot\qpr20XX-1\web.config should be'''
 +
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<configuration>
 
<configuration>
Line 263: Line 269:
 
     </system.webServer>
 
     </system.webServer>
 
</configuration>
 
</configuration>
 +
</pre>
  
•Contents of C:\inetpub\wwwroot\qpr201X-1
+
*Contents of C:\inetpub\wwwroot\qpr20XX-1\Portal\web.config should be
\Portal\web.config should be
 
  
 +
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<configuration>
 
<configuration>
Line 288: Line 295:
  
 
</pre>
 
</pre>
 +
|}
  
==QPR Expression Engine==
+
===Uninstallation===
 
+
Follow these steps to uninstall QPR Reporting Add-on:
'''Expression Engine''' for QPR Suite contains the following components:
+
# In '''IIS Management Console''' click '''Remove''' for the '''QPRWebServicesExtensions''' web application (mouse secondary button).
 
+
# Delete the web application’s folder '''C:\inetpub\wwwroot\QPRWebServicesExtensions''' in the disk.
: - Expression Engine Web Service
+
# Revert the original '''C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices\servicetester.aspx''' from release package.
 
 
: - Expression Engine Service Tester
 
 
 
'''Expression Engine Web Service''' is a web service used to run expressions. This expression engine is embedded into many other accelerators, such as DWR and DWV.'''
 
 
 
 
 
Expression Engine Service Tester''' is an extension to QPR Web Service Tester, and it can be used to test expressions when e.g. developing report templates or configuration files for other accelerators. It’s possible to define multiple expression which are calculated consecutively in a single web service operation. In that case expression results are stored in variables, and variables can be used in subsequent expression. Example:
 
  
 +
== QPR Reports Menu ==
 +
QPR Reports Menu is a dropdown menu for QPR Suite Portal to open reports and web pages that can be referenced using urls. The menu is able to add context related information automatically to the url as parameters, such as model, diagram and object id. Report items in the menu are configured in the file C:\DWV templates\ReportsMenu\ReportsMenuConfiguration.xml (the location may vary).
  
var1='''3 + 9 / 3'''  
+
===Reports Configuration===
 +
Report items in the menu are configured in the file '''C:\DWV templates\ReportsMenu\ReportsMenuConfiguration.xml''' (note that your location may be different). The configuration is an xml file having a root tag '''reportsmenu''' and subtags '''menuitem''' for individual report items. The menuitem tag has menu item settings as subtags which are described in the following table.
  
var2='''2*[var1]'''
+
Settings can be defined using static string values or expressions. If the value is defined using an expression following attribute is added to the settings tag: '''expression="true"'''. Note that the setting tags must be in the order that they are defined in the following table. Settings that are not mandatory, can be left out.
 
 
var3=''''Value is ' + [var2]'''
 
 
 
 
 
Expression Engine Web Services is a IIS hosted web application, and Expression Engine Service Tester is implemented with changes to QPR Web Service Tester web page html template.
 
 
 
===Expression Engine Input Parameters===
 
  
 
{| class="wikitable"
 
{| class="wikitable"
!type:'''rootobject'''
+
! Parameter
 +
! Description
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
! '''attribute'''
+
|'''reportname''' (string)|| Visible name of the report in the dropdown menu.
!'''type'''
 
!'''description'''
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
|webServiceSessionId || string || QPR Web Service’s session id. Used only if '''authenticationmode=passedsession.'''
+
|'''reporturl''' (string)|| Url to the report. Characters '''?''' and '''&''' are automatically added to the end of the url if needed for appending url parameters. To build SSRS report urls, see http://msdn.microsoft.com/en-us/library/ms153586(v=sql.110).aspx.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| expressionSet || string[] || List of expressions
+
|'''availabletabs''' (string)|| List of QPR Portal tabs where the report is available. Available tab names can be found in http://kb.qpr.com/qpr2017-1/index.html?getportalurl.htm (see "Also Portal internal view names..."). The tabs need to be defined in lower case. If this parameter is empty, the report is visible in all tabs.
 +
Following default tabs name are available: pgplugin_processmaps, pgplugin_navigator, pgplugin_actions, pgplugin_organizations, scplugin_scorecards, scplugin_strategymaps, scplugin_analysis, scplugin_navigator, scplugin_reports, scplugin_actions, discussion, byuser, bytime, actionanalysis
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
|variableNameSet || string[] || List of variable names. The variables get the calculated expression values, and the variables are available as arguments for the next expressions. The value of the last expression is returned by the operation.
+
|'''passparameters''' (string)|| List of parameters that are passed to the external report (see available parameters in chapter [[QPR Reporting Add-on#Portal Context Parameters|Portal Context Parameters]]). Passed parameters may be restricted, because e.g. SSRS gives an error when parameters are passed that are not defined in the report.
|}
 
 
 
Following output data format is used by both services.
 
 
 
===Output Data Format===
 
{| class="wikitable"
 
! type: '''ResultDataTable'''
 
!
 
!
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
! '''Attribute'''
+
|'''order''' (integer)|| An integer which determines order of reports in the menu. The reports are shown in the ascending order. If there are multiple reports with a same order number, the alphabetical order of the reportName parameter determines the ordering (secondary sorting).
! '''Type'''
 
! '''Description'''
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
|headers || header[] || Array of header rows. There can be one or two headers.
+
|'''waitanimation''' (boolean)
 +
||Determines whether to use animation while waiting report loading. This only works in the Word reports. Options '''true''' and '''false'''.
 +
 
 +
The animation may only be used if the report access url has same DNS name and port than QPR Portal. This is because the disappearance of the animation is based on a cookie that is set by report providing server when the report is ready. When the cookie is received from the response of the report providing server, the loading animation is removed. If the loading animation doesn’t work correctly for any compatibility issue, disable it (set to false).
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| rows || ResultDataTabl eRow[] || Array of data rows
+
|'''visibility '''(string)|| Determines the visibility status of the report item in the menu. Available statuses are:
 +
* '''visible''': The report is visible and can be opened.
 +
* '''disabled''': The report is visible in the menu in a grey color, and it’s not openable. This status can be used to imply, that there is some condition preventing from running the report, such as the required type of element is not selected.
 +
* '''hidden''': The report item is not visible in the menu at all.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
!type: '''ResultDataTableRow'''
+
|'''visiblemessage''' (string)||Tooltip text shows for visible report items when cursor is moved over the report item. The text may contain html code.
!
 
!
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
! '''Attribute'''
+
|'''disabledmessage''' (string)|| Tooltip text shown for disabled report items when cursor is moved over the report item. The text may contain html code.
! '''Type'''
 
! '''Description'''
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| cells || ResultDataTableCell[] || Array of data cells
+
|'''accessrights''' (boolean)||Determines if user has access to see the report item as boolean value (“true” if there are rights to see the report item).
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| leftIdentifier || string ||
+
|[OpenWindow parameters]||QPR Portal’s '''OpenWindow''' function parameters. These parameters determine e.g. size and position of the window. Available parameters:
 +
* target (string)
 +
* width (integer)
 +
* height (integer)
 +
* scroll (boolean)
 +
* preventcaching (boolean)
 +
* x (integer)
 +
* y (integer)
 +
|}
 +
 
 +
===Portal Context Parameters===
 +
The following table lists information that can be passed to reports as url parameters.
 +
 
 +
{| class="wikitable"
 +
 
 +
! Parameter
 +
! Description
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| rightIdentifier || string ||
+
|| modelid|| PD/EA or Metrics model id
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
! type: '''ResultDataTablecell'''
+
|| diagramid || Diagram id (i.e. process level). Note that for the top diagram level, the id is "PG.<modelid>.0" which represents the model object.
!
 
!
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
! '''Attribute'''
+
|| objectid||Object in details pane.
! '''Type'''
 
! '''Description'''
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| rawValue || string || Unformatted raw value
+
||tab||Name of the tab where the report is run.
|- style="vertical-align:top;"
 
| formattedValue || string || Value that is displayed to users
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| sortValue || string || Value that can be used to sort the values
+
||zoom||Zoom percentage. Only available in PD/EA tabs.
|-  style="vertical-align:top;"
 
| datatype || string ||  Datatype of the value: string, numeric, int
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
!type: '''ResultDataTableHeader'''
+
||viewid||View id
!
 
!
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
! '''Attribute'''
+
||xsession||QPR Web Service session id. External report can use this to login to QPR Web Service.
! '''Type'''
 
! '''Description'''
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| cells || ResultDataTableHeaderCell[] ||
+
||currentuserid||Current user id.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
!type: '''ResultDataTableHeaderCell'''
+
|| scorecardid||Scorecard id. Only available in Metrics.
!
 
!
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
! '''Attribute'''
+
|| seriesid|| Series id. Only available in Metrics.
! '''Type'''
 
! '''Description'''
 
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| label || string ||
+
|| periodid||Period id. Only available in Metrics.
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
| columnspan || int || Number of columns the header extends
 
 
|}
 
|}
  
===Example===
+
==Acknowledgements==
  
Following image shows QPR Web Service tester where Expression Engine Service Tester is installed.
+
Open XML Power Tools. Copyright (c) Microsoft Corporation
[[file:example.jpg|700px]]
 
  
 +
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
 +
1. Definitions
 +
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
 +
A "contribution" is the original software, or any additions or changes to the software.
 +
A "contributor" is any person that distributes its contribution under this license.
 +
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
  
==QPR Word Reports==
+
2. Grant of Rights
 +
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
  
QPR Word Reports is a technology for QPR Suite to generate customized Word reports displaying content from the QPR system. QPR Word Reports works in IIS as a web application, and reports are accesses by a url address (using an http GET request). Data for reports is fetched from QPR system using QPR Web Service interface.
+
3. Conditions and Limitations
  
Microsoft Word is not needed on the server side, as Word file generation is implemented using Open XML SDK. Actually Word is not required in the client side either, because Word documents can be opened using OpenOffice (file format is Office Open XML).
+
(A) No Trademark License- This license does not grant you rights to use any contributors'name, logo, or trademarks.
  
'''Main features'''
+
(B) If you bring a patent claim against any contributor over patents that you claim areinfringed by the software, your patent license from such contributor to the software ends automatically.
  
QPR Word Reports contains the following main features:
+
(C) If you distribute any portion of the software, you must retain all copyright, patent,trademark, and attribution notices that are present in the software.
  
: • The reports are run as they are requested, so the reports always contain the latest data.
+
(D) If you distribute any portion of the software in source code form, you may do so onlyunder this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
  
: • Reports can have parameters affecting report contents.
+
(E) The software is licensed "as-is." You bear the risk of using it. The contributors giveno express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
  
: • QPR Word Reports contains an embedded formula calculation engine. All the tags may be defined using expressions which values are calculated as the report is run.
+
1. Definitions.
  
: • The report templates are normal Word files so they can contain any Word file features (such as headings, tables, cross references, headers, footers and images).
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
 
: • Reports may get theirs content from other reports, called subreports. Also recursive reports are supported (reports calling themselves). Subreports makes it possible to assemble the report from smaller report “parts”.
 
  
: • Adding Word hyperlinks is possible
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
  
 +
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common      control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the      direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the      outstanding shares, or (iii) beneficial ownership of such entity.
  
'''Concepts'''
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
  
QPR Word Reports is based on the following concepts:
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation      source, and configuration files.
  
: •Report templates are normal Word files which may have any contents. Reports are based on these template files. When a report is run, a template is taken as a basis, and during processing of the report, content from QPR system is added to the template, forming the final report.
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
  
: • Templates contain tags, which instruct how the content is added to the report and how dynamic parts of the report are built.
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
  
: • Tags contain attributes, which offer additional information for the tag.
+
Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the       editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
  
: • QPR Web Service is used through its operations. Operations used by QPR Word Reports are GetAttributeAsString, QueryObjects, GetGraph, GetBinaryData and GetPortalUrl. All QPR Web Service operations are documented under <nowiki>http://kb.qpr.com/qpr2017-1/index.html?</nowiki> functions.htm.
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to      communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise      designated in writing by the copyright owner as "Not a Contribution."     
  
: • Subreport is a report that is called from another report (main report). The subreport is processed like any report and its contents are embedded in the main report. Main report may pass parameters to the subreport.
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and       subsequently incorporated within the Work.
  
: • Loop is a list of QPR system objects (elements) returned by QPR Web Service’s QueryObjects operation. In a loop, a subreport is called for every looped object.
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual,      worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
  
To open QPR Word Reports reports in QPR Portal, QPR Reports Menu is needed. It’s able to automatically pass parameters, such as model or selected object to the report.
 
  
QPR Word Reports cannot itself store previously run reports, or run reports based on a schedule. When a report is viewed, it’s always generated at that point and data for the report is fetched from QPR system. Because of this, there may be a delay when getting a report, especially if the report contains dozens of pages.
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made,   use, offer to sell, sell, import, and otherwise transfer the Work,       where such license applies only to those patent claims licensable      by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
 
 
Reports are accessed using a url address, which determines the report to be run and the url also passes all needed parameters to the report. The url depends on the server computer name and the path where QPR Word Reports is installed in IIS. Note that parameter names are case sensitive.
 
 
 
An example url: http(s)://SERVERNAME/QPRWebServicesExtensions/DynamicWordReports.ashx?
 
report=reportname&parameter1=param1value&parameter2=param2value
 
 
 
===Configuration===
 
 
 
Following table contains QPR Word Reports’s parameters, which are configured in the '''web.config''' file of QPR Web Services Extensions.
 
 
 
{|
 
!Parameter name
 
!Description
 
|-
 
| reporttemplateparameter (optional) || Defines the name of the parameter which passes the report template path. See chapter Working with Report Templates  for configuring the report template path.
 
|-
 
| qprtemplateidparameter (optional) || Parameter name which passes QPR’s '''Word report template''' object id.
 
This can be used when the report templates are stored in QPR Portal (i.e. QPR system objects) (see chapter Working with Report Templates). Instead of report template path, the Word report template object id can be passed as a parameter. The Word report template object id gets a priority over report template path.
 
|-
 
| defaultimageformat (optional) || Default image format for QPR Web Service’s GetGraph operation. This setting is used if image format is not explicitly defined.
 
|}
 
 
 
===Working With Report Templates===
 
 
 
QPR Word Reports is based on Word report templates, which are normal Word files. When a report is run, the template is taken as a basis, and the tags in the template file are processed. Content is added to the report defined by the tags.
 
 
 
There are two options to reference to the used templates:
 
 
 
: • '''Reports tab in QPR Portal''': This option is suitable for running reports in production environments, because the report templates can be updated by QPR users (Portal administrator rights are required), and no access to QPR server is needed. Also, the report templates are stored in QPR system (i.e. in QPR database).
 
 
 
: • '''A disk drive''' to where there is an access from the server running QPR Word Reports. This option is suitable for developing reports. It is faster for development because the developed template may be open while running the report. Also, option 1 requires the template to be saved manually to QPR Portal so that it can be run.
 
 
 
 
 
Both options can be used at the same time. If there are two templates with the same name in both places, the QPR Portal stored templates have priority.
 
 
 
Note that QPR Word Reports templates are entirely incompatible with QPR - Add-in for Microsoft Office report templates, so running them as QPR - Add-in for Microsoft Office reports is likely to cause an error.
 
 
 
Both Word file extensions ('''docx''' and '''docm''') are supported. The output extension is the same as the extension of the main report template. File extension is not specified when referencing to template names in disk. If there are two files with the same name but different extension in the same folder, docx is selected as a template. Subreport extensions don’t affect the result report.
 
 
 
When stored in a disk, reports may be organized in folders. In that case report templates are referenced using syntax '''folderName/reportName'''. Folders inside folders are also supported.
 
 
Report template root location is determined by configuration setting '''reporttemplatephysicalpath'''.
 
 
 
When a report processing fails, an html page showing an error message is displayed. The error message is likely to reveal in which report template and tag the error occurred. Also stack trace is shown, but that is helpful information only for developers.
 
 
 
===Template Tags===
 
 
 
Tags are used to add content to the report. Syntax for defining tags is following:
 
 
 
'''<#tagname attribute1="attribute1 value" attribute2="attribute2 value" attribute3="attribute3 value">'''
 
 
 
If an attribute value is calculated using an expression (formula), two equals signs are used instead of one, e.g.
 
 
 
'''<#tagname attribute1=="1+1" attribute2="1+1">''' (attribute1 value is integer 2, attribute2 value is string "1+1").
 
 
 
In the following sub chapters optional tag attributes are marked with "(optional)". Other tags are mandatory – if any of them is missing, an error is caused. In addition, for some of the mandatory
 
 
 
attributes the value of the attribute must not be empty (i.e. '''attributeName='''"" is not allowed). If the attribute value comes from an expression, note that the expression may evaluate as empty (thus causing an error in non-empty mandatory attribute).
 
 
 
When processing a tag, attribute expressions are calculated from left to right. All report parameters, report variables and already calculated attribute values are available as expression arguments when later attribute expressions are calculated. An argument is kind of an input variable that can be used in an expression with syntax '''[argumentName]'''. E.g.:
 
 
 
'''<#expression attribute1="3" value=="[attribute1] + 2">''' (result is 5)
 
 
 
Tag specific arguments have a priority over report parameters and report variables, when there are same names used
 
 
 
Attribute names should only contain characters a-z, 0-9 and _.
 
 
 
Values for all boolean valued tags (such as '''visible''') may be defined as "true" or "false" or as a boolean valued expression, e.g. '''visible=="[variable1]=1"''' (the result of the equality comparison is of type boolean). Tag visibility is processed in the normal left to right order. When visibility tag is processed and its value is false, the tag processing stops at that point. This has an effect on report run performance. In addition, possible later expression errors don’t emerge in that case.
 
 
 
Word has a tendency to use characters “ and ” instead of character " as quotation marks. Characters “ and ” are not suitable quotation marks for QPR Web Service, so QPR Word Reports replaces these characters with " character for strings inputted to QPR Web Service. Also characters ‘ and ’ are replaced by '. Note that all of these quotation marks should be escaped, when there is escaping needed (more about escaping in Expression Language).
 
 
 
All existing tags can be used in following document parts: main document, header, footer, footnotes and endnotes. Only Attribute and Expression tags can be used in comments.
 
 
 
Following abbreviated tag names can be used: '''attribute=att, expression=exp, parameter=par and variable=var'''. Tags must be written in lower case.
 
 
 
====Attribute Tag (att)====
 
 
 
This tag is used to get properties of QPR objects by using QPR Web Service’s '''GetAttributeAsString''' operation (more information: http://kb.qpr.com/qpr2017-1/index.html?getattributeasstring.htm).
 
 
 
This tag uses '''QueryObjects''' instead of GetAttributeAsString, if there are multiple id’s in the '''object''' attribute or if attribute '''followrelations''' used (more information below). If QueryObjects is used, '''separator''' and '''sortby''' attributes are applied
 
 
 
{| class="wikitable"
 
! Attribute
 
!Description
 
|-
 
|object (string) || Object id or list of object id’s separated by comma (,). If this contains only one id, it is passed as a parameter '''objectId''' of '''GetAttributeAsString''' operation. If this attribute is not provided or is empty, the tag will be evaluated to empty. (optional)
 
|-
 
| attribute (string) || This is passed as parameter '''attribute''' of '''GetAttributeAsString''' or '''QueryObjects''' operation.
 
|-
 
| options (string) || This is passed as parameter '''options''' of '''GetAttributeAsString''' or '''QueryObjects''' operation. (optional)
 
|-
 
| expression (exp. string) || An expression where the result is put as an argument "value" (see the examples). (optional)
 
|-
 
| followrelations (string) || Name of the relation attributes to follow to get another object or a set of other objects. If there are multiple subsequent relations to follow, the relations are separated by comma (,) (see the examples). (optional)
 
|-
 
| separator (string) || Character(s) separating list of attributes of different objects. Empty values are not shown (i.e. no empties between separators). Default is a new line characters. (optional)
 
|-
 
| sortby (string) || Sorting if there are multiple objects returned. Default sorting is by attribute “name”. (optional)
 
|-
 
| visible (boolean) || Determines content visibility shown by the tag. See Setting Content Visibility. (optional)
 
|-
 
| style (string) || Determines text style. See Defining Styles. (optional)
 
|}
 
 
 
'''Examples'''
 
<pre>
 
<#attribute object=="[objectId]" attribute="name">
 
<#attribute object="[measureId]" attribute="measure.value(series=\"ACT\",period=\"1 / 2017\")" expression="[value] * 2.54">
 
<#attribute object=="[measureId]" followrelations="childobjects,childobjects"
 
attribute="measure.value(series=\"ACT\",period=\"1 / 2017\")" separator=", " sortby="name">
 
</pre>
 
 
 
====Dataset Tag====
 
 
 
This tag is for showing information from a dataset in the report. Dataset consists of multiple columns and rows. Dataset tags shows a '''header subreport''' (once) and '''row subreports''' for each row in the dataset. Dataset tag has following attributes
 
 
 
{| class="wikitable"
 
!Attribute
 
!Description
 
|-
 
| data (dataset) || Dataset shown by the tag.
 
|-
 
| headertemplat e (string) || Subreport template for dataset header. The header subreport is shown once in the report above the row subreports. Header subreport can be used e.g. for showing a column names. Header subreport is optional, so if the parameter is left out, no header subreport is shown. <br>
 
Following type of parameters are passed to the header subreport: '''columnheader_1, columnheader_2, … columheader_n''' containing names of the dataset columns. If the column names are known, the header can be set fixed in the mainreport and header subreport is not needed. (optional)
 
|-
 
| headertemplat edata (byte array) || Alternative to headertemplate. Contains the used header template as a byte array.
 
(optional)
 
|-
 
| rowtemplate (string) || Subreport template for dataset rows. The subreport is looped for each row in the dataset in the order rows appear in the dataset. Following parameters are passed to the rows subreport:
 
- column_1, column_2, … column_n containing dataset cell data <br>
 
- parameters which names are same as column names, containing dataset cell data<br>
 
- same parameters that are passed to the header subreport, i.e. '''columnheader_1, columnheader_2, … columheader_n''' <br>
 
(optional)
 
|-
 
| rowtemplatedata (byte array) || Alternative to row template. Contains row template as a byte array. (optional)
 
|-
 
| visible (boolean) || Determines content visibility shown by the tag. See Setting Content Visibility. (optional)
 
|-
 
| (all other attributes) || All other attributes are passed to the looped subreports as parameters. Note that all the above mentioned attributes are not passed as parameters, because they have a special meaning in the Dataset tag. (optional)
 
|}
 
 
 
====Embeddedfile Tag====
 
 
 
This tags inserts an embedded file (using OLE technology) into the report. The file can be of any type. In addition to the file, an icon image needs to be defined. The size of the embedded object icon is set based on the size of the icon image.
 
 
 
{| class="wikitable"
 
!Attribute
 
!Description
 
|-
 
| filedata (byte array) || Embedded file data as byte array. See available functions in expression language documentation in Binary Data Functions.
 
|-
 
| icondata (byte array) || Icon image as byte array. See available functions in expression language documentation in Binary Data Functions.. Icondata is not needed when using replace mode and replaceable embedded file is showing its content in the Word instead of icon (DrawAspect="Content"). (optional)
 
|-
 
| contenttype (string) || Embedded file media type (also called MIME type). This information can be defined as fixed (when the content type is known in report design), or fetched using function available in expression language documentation in Binary Data Functions.. List of media
 
 
 
types: http://www.iana.org/assignments/media-types/media-types.xhtml
 
|-
 
| replace (boolean) || Enables the '''replace mode'''. This makes it possible to use an existing embedded file (a.k.a. '''placeholder content''') in the template which is replaced by the actual embedded file. The replace mode enables to use Word styles and formatting, which will end up in the actual content of the report. The placeholder embedded file must be in the same or next paragraph of the tag. It’s advisable to use as small files as possible as a placeholder embedded objects so that the size of the template remains small.
 
Replace mode is activated with "true" or deactivated with "false". Default is false. (optional)
 
|-
 
| visible (boolean) || Determines content visibility shown by the tag. See chapter "5 Setting content visibility".
 
(optional)
 
|}
 
 
'''Example:'''
 
 
 
<pre>
 
<#embeddeddata filedata=="qprEmbeddedFileData([objectid], ‘embeddedata’, ‘’)"
 
icondata=="httpFileData(‘http://url…/’ + GetAttribute([objectid], ‘embeddedfilemimetype’, ‘’) + ‘.png’)" contenttype=="GetAttribute([objectid], ‘embeddedfilemimetype’, ‘’)">
 
</pre>
 
 
 
====Expression Tag (exp)====
 
 
 
This tag is for adding a result of an expression (formula) in the report. The defined expression is evaluated and the result is set in place of this tag.
 
 
 
Note that the tag may contain any attributes which are serving as arguments to the value expression (see examples).
 
 
 
{| class="wikitable"
 
!Attribute
 
!Description
 
|-
 
| value (object) || Shown value itself. Note that the values shown in the report are always technically strings (sequence of characters), so the value must be of a type that can be converted into a string, such as string, integer, double, datetime, boolean, or an array of any of the previous types. If the value is not a string, an implicit conversion to string is made.
 
 
 
In case of datetime type, dateformat defined in the Reportsettings tag is used.
 
|-
 
| visible (boolean) || Determines content visibility shown by the tag. See Setting Content Visibility. (optional)
 
|-
 
| style (string) || Determines text style. See Defining Styles. (optional)
 
|}
 
 
 
'''Examples''':
 
<pre>
 
<#expression value=="[variable1]">
 
<#expression value1=="5" formula=="2 * [value1] + 3"> (result is 13).
 
</pre>
 
 
 
====Image Tag====
 
 
 
This tag is used to show an image in the report. Images can be got using QPR Web Service’s '''GetGraph''' operation, which can be used to get graphical content from QPR system, such as EA/PD diagrams, Metrics dashboards or measure graphs. For more information about GetGraph, see http://kb.qpr.com/qpr2017-1/index.html?ws_getgraph.htm.
 
 
 
When getting images using http, many kind of errors may be encountered, such as the image is not found, it’s not available, or user rights restrict. In case an image cannot be got, the report run still succeeds. If the reason for the error is not known, it’s possible to see the http error message by using the '''loggingmode'''. Note also the '''noimagemessage''' attribute which is used in case of these errors.
 
 
 
Image size in Word depends on its resolution and the properties listed below. Image size is calculated as follows:
 
 
 
: • '''dpi''' defines image base size (dpi can be defined explicitly or used image’s dpi value)
 
 
 
: • '''scaling''' is applied after that (expanding or shrinking) '''maxwidth''' and '''maxheight'''
 
 
 
: •  restrictions are applied last (always shrinking)
 
 
 
In attributes dpi, scaling, maxwidth and maxheight expression it’s possible to use following arguments representing information from the image (see an example below):
 
 
 
: •  '''width''' (int)
 
 
 
: •  '''height''' (int)
 
 
 
: •  '''horizontaldp'''i (decimal)
 
 
 
: •  '''verticaldpi''' (decimal)
 
 
 
: •  '''format''' (string) (e.g. png, jpeg, gif)
 
 
 
Note that image resolution (width and height in pixels) is determined by QPR Web Service, so that can be affected only using web service’s parameters (parameter '''options''').
 
 
 
If you need an image to appear always as a certain size regardless of its resolution, the '''scaling''' can be defined as a large enough number, and set '''maxwidth''' (or '''maxheight''') to be the desired image size. This way the maximum width restriction is always applied and the size of the image is the desired.
 
 
 
{| class="wikitable"
 
!Attribute
 
!Description
 
|-
 
| imagedata (byte array) || Image as a byte array. See available functions in expression language documentation in Binary Data Functions.. Note that the type of the file needs to be a bitmap image e.g. png, jpg or gif. (optional)
 
|-
 
| object (string) || This is passed as a parameter '''objectid''' of '''GetGraph''' operation. (optional)
 
|-
 
| options (string) || This is passed as a parameter '''options''' of '''GetGraph''' operation. (optional)
 
|-
 
| dpi (decimal) || Determines the image size as dots per inches. If not defined, dpi information of the image itself is used. (optional)
 
|-
 
| scaling (decimal) || Image scaling as percentage value ("100" means no change). The scaling is used to change the size of the image in the report.
 
 
 
E.g. value "200" doubles the size of the image. Scaling is applied before maximum width and height restrictions. (optional)
 
|-
 
| maxwidth (decimal) || Maximum image width in centimeters. If the image is wider than this maximum width, the image is scaled smaller to so that its width is this maximum width. (optional)
 
|-
 
| maxheight (decimal) || Maximum image height in centimeters. If the image is higher than this maximum height, the image is scaled smaller to so that its height is this maximum height. (optional)
 
|-
 
| crop (boolean) || Determines whether unnecessary borders are removed from the image. Needed if the image contains too much white (or other background color) space. If the whole image is white color it is removed. Either "true" or "false". Default is false. (optional)
 
|-
 
| backgroundcolor (string) || Defines the background color of the image for cropping unnecessary borders. The background color is defined as an RGB hexadecimals, e.g. "00FFb7". Default is white ("FFFFFF"). (optional)
 
|-
 
| replace (boolean) ||  Enables the '''replace mode'''. There is a possibility to use an existing picture (a.k.a. '''placeholder picture''') in the template which is replaced by the actual picture (this is the replace mode). The replace mode makes it possible to use Word styles and formatting, which will end up in the actual picture in the report. The placeholder picture must be in the next paragraph of the Graph tag. The placeholder picture may be any picture, and its size don’t matter.
 
 
 
Replace mode is activated with “true” or deactivated with “false”. Default is false. (optional)
 
|-
 
| noimagemessage (string) || A text appearing instead of the image if no image could be added to the report for some reason. The reason may be that QPR Web Service didn’t return any image or there was nothing left of the image after the cropping. This message is the only case when '''style''' attribute is needed for this tag.
 
 
 
For instance the message could be "No image is available". (optional)
 
|-
 
| visible (boolean) || Determines content visibility shown by the tag. See Setting Content Visibility. (optional)
 
|-
 
| style (string) || Determines text style. See Defining Styles. (optional)
 
|}
 
 
 
'''Examples'''
 
 
 
<pre>
 
<#image object=="[diagramid]" options="graphtype=processlevel,witdh=1500" dpi="100" maxwidth="17.5">
 
<#image source="embedded" object=="[attachmentId]" options="embeddeddata" maxwidth="17.5" dpi="1.5*[horizontaldpi]">
 
<#image imagedata=="httpFileData('http://someurl…')">
 
</pre>
 
 
 
====Link Tag====
 
 
 
This tag is used to add a hyperlink in the report (both QPR Portal and external links). If the link address is empty or not valid for any reason, no link is displayed by the tag.
 
 
 
{| class="wikitable"
 
!Attribute
 
!Description
 
|-
 
| address (string) || Hyperlink’s url address or location. Note that the address must not be added as a Word’s hyperlink format but as a text. QPR Portal links can be got using an expression and '''GetPortalUrl''' function.
 
|-
 
| text (string) || Link’s displayed text.
 
|-
 
| screentip (string) || Link’s screen tip (see '''Insert hyperlink''' window). (optional)
 
|-
 
| target (string) || Link’s target (see '''Insert hyperlink''' window). (optional)
 
|-
 
| visible (boolean) || Determines content visibility shown by the tag. See Setting Content Visibility. (optional)
 
|-
 
| style (string) || Determines text style. See Defining Styles. (optional)
 
|}
 
 
 
'''Example'''
 
 
 
<pre>
 
<#link address=="getportalurl([diagramid], '', '')" text="Link to QPR Portal" target="_BLANK" screentip="Click here is go to QPR Portal">
 
</pre>
 
 
 
====Loop Tag====
 
 
 
This tag is for looping through content in following alternative ways:
 
 
 
: • Set of QPR elements defined by a QPR Web Service query, or For more information of QueryObjects, see http://kb.qpr.com/qpr2017-1/index.html?queryobjects.htm.
 
 
 
: • List of strings (using attribute '''list'''). The list itself is a string where items are separated using defined character.
 
 
 
The defined subreport is called for every looped object.
 
 
 
Word sections are not transferred from subreports to a mainreport.
 
 
 
{| class="wikitable"
 
! Attribute
 
! Description
 
|-
 
| template (string) || Template name for the looped content for file system templates (without the file type extension). For more information see Working with Report Templates. (optional)
 
|-
 
| templatedata (byte array) || Looped template file as a byte array. See available function from Binary Data Functions. (optional)
 
|-
 
| portaltemplate (string) || Template name for the looped content for templates stored in QPR Portal in Reports tab. Templates are referenced using syntax "category/header", where category is the name of the category and header the name of the header in the report template.
 
|-
 
| query (string) || This is passed as a parameter '''query''' of '''QueryObjects''' operation. "List" attribute is alternative. (optional)
 
|-
 
|  criteria (string) || This is passed as a parameter '''criteria''' of '''QueryObjects''' operation. This filters the output set of objects. (optional)
 
|-
 
| sortby (string) || This is passed as a parameter '''sortby''' of '''QueryObjects''' operation. This determines the order of the looped objects. Note that without sorting the report may look different between runs. (optional)
 
|-
 
| attributes (string) || This is passed as a parameter '''attributes''' of '''QueryObjects''' operation. All the queried attribute values are added as parameters to the subreport. (optional)
 
|-
 
| options (string) || This is passed as a parameter '''options''' of '''QueryObjects''' operation. (optional)
 
|-
 
| loopparameter (string) || Defines the name of the parameter that is passed to the subreport containing the looped object id. Like other parameters, also this parameter needs to be defined in the subreport.
 
|-
 
| filter (exp.string) || Additional filtering for returned objects. This filtering is applied after QPR Web Service query results have been returned to QPR Word Reports. The filter is defined as an expression (it’s not a QPR Web Service criteria), which must evaluate to boolean. The filter expression is evaluated for each returned object separately. If it is evaluated to false, the object is filtered out.
 
 
 
All looped subreport parameters, and report parameters and expressions are available as arguments for the expression.
 
 
 
This additional filtering may be used if the desired condition cannot be written using QPR Web Service’s criteria. Using QPR Web Service’s criteria is recommended because it offers better performance. (optional)
 
|-
 
| sortvalue (exp.string) || An expression which results are used to sort the returned objects. This sorting is applied after the QPR Web Service’s sorting (which is determined by attribute '''sortby'''). All looped subreport parameters, (main)report parameters, (main)report variables are available as expression arguments (subreport parameters have a priority in name conflicts).
 
 
 
Note that because sortvalue is an expression itself, only a single equation sign is usually used.
 
|-
 
| list (array) || List of items as an array that is looped through (instead of a QPR Web Service query). When this attribute is used, no QPR Web Service query is made, and thus the following attributes are ignored: query, criteria, sortby, attributes and options. (optional)
 
|-
 
| visible (boolean) || Determines content visibility shown by the tag. See Setting Content Visibility. (optional)
 
|-
 
| style (string) || Determines text style. See Defining Styles. (optional)
 
|-
 
| (all other attributes) || All other attributes are passed to the looped subreports as parameters. Note that all the above mentioned attributes are not passed as parameters, because they have a special meaning in the Loop tag. (optional)
 
|}
 
 
 
'''Example'''
 
 
 
<pre>
 
<#loop template="Process report" loopparameter="diagramid" query=="'[' + [diagramid] +
 
'].ChildObjects(hierarchy=\"processlevels\")'" sortby="name" attributes="description,owner.name(as= \"processowner\")" recursionlevel=="[recursionlevel] + 1">
 
</pre>
 
 
 
In the example, "recursionlevel" is an additional parameter that is passed to the subreport. Also parameters "description" and "processowner" are passed to the subreport.
 
 
 
====Parameter Tag (par)====
 
 
 
This tag defines parameters for the report. Only parameters that are defined using these tags are used by the report. The report request url may contain other parameters which are omitted.
 
 
 
{| class="wikitable"
 
! Attribute
 
! Description
 
|-
 
| inputname (string) || Name of the parameter (url parameter name or a parameter name passed to subreport). Any tag attribute names mentioned in this documentation cannot be used as parameter or variable names (reserved names).
 
|-
 
| outputname (string) || Parameter name used in the report. If output value is not defined, output value is same as input value. Any tag attribute names mentioned in this documentation cannot be used as parameter or variable names (reserved names). (optional)
 
|-
 
| defaultvalue (object) || The default value is used when a parameter value is not passed to the report. If no default value is defined and no parameter value is passed, an error occurs. (optional)
 
|-
 
| validation (exp. string) || Validation expression for the parameter. There is an argument “value” available for the expression containing the parameter value. If the expression returns false, a validation error is thrown by the report.
 
|-
 
| validationmessage (string) || Error message to show, if the validation fails (see parameter “validation”).
 
|}
 
 
 
'''Example'''
 
 
 
<pre>
 
<parameter inputname="nameOfUrlParameter" outputvalue="nameInTheReport" defaultvalue="value1">
 
</pre>
 
 
 
====Reportsettings Tag====
 
 
 
This tag is for defining report level settings. In subreports this tag is not used (it’s ignored). The tag is optional. Only one tag of this type can exist in a template.
 
 
 
Attributes '''validate''' and '''contentdispositiontype''' are for advanced purposes, so usually they can be ignored.
 
 
 
{| class="wikitable"
 
!Attribute
 
!Description
 
|-
 
| name (string) ||  Name of the downloaded file. If this is not defined, file name is same as name of the template. (optional)
 
|-
 
| updatefields (boolean) ||  Defines that Word updates all the fields in the document (table of contents, references, etc.) when the document is opened. Alternatives are “true” or “false”. Default is false. Note that Word shows an message when a document is opened that fields are to be updated, and gives also an alternative of not to do it. (optional)
 
|-
 
| dateformat (string) || Format for showed dates. More information about formatting http://msdn.microsoft.com/enus/library/8kb3ddd4(v=vs.100).aspx. Default value is dd-MM-yyyy. (optional)
 
|-
 
| validate (boolean) || Defines whether a Word document validation is performed. Validation reveals if a Word document contains structural errors (the xml document is inconsistent with the schema).
 
 
 
It seems that Word sometimes produces files that are not valid (!). If that kind of file is used as a template, it is probable that the output file produced by QPR Word Reports is not valid either and the validation fails. If the validation fails, an error message is shown and the report cannot be downloaded. By default validation is not performed.
 
 
 
Validation is useful, if QPR Word Reports produces a file that Word is not able to open. The validation error message may provide further information of the problem. (optional)
 
|-
 
| contentdispositiontype (string) || Alternative values are "attachment" and "inline". This is the http response’s content disposition’s disposition type. Default value is attachment. For more information http://www.ietf.org/rfc/rfc2183.txt. (optional)
 
|}
 
 
 
'''Example'''
 
<pre>
 
<#reportsettings name="Process report" updatefields="true" contentdispositiontype="inline" validate="true">
 
</pre>
 
 
 
====Subreport Tag====
 
 
 
This tag is for adding content of another report (subreport) to a report (main report). This tag is useful
 
 
 
e.g. when there are parts in a report that are structurally similar (making it possible to reuse a subreport where a part is defined once).
 
 
 
Word sections are not transferred from subreports to a mainreport.
 
 
 
{| class="wikitable"
 
!Attribute
 
!Description
 
|-
 
| template (string) || Report template name (without file type extension in file system templates). For more information see Working with Report Templates. (optional)
 
|-
 
| templatedata (byte array) || Looped template file as a byte array. See available function to get data in Binary Data Functions. (optional)
 
|-
 
| passallparameters (boolean) || Passes all report parameters and variables to the sub report.
 
|-
 
| visible (boolean) || -Determines content visibility shown by the tag. See Setting Content Visibility. (optional)
 
|-
 
| style (string) || Determines text style. See Defining Styles. (optional)
 
|-
 
| (all other attributes) || All other attributes are passed to the subreport as parameters. Note that all the above mentioned attributes are not passed as parameters, because they have a special meaning in the Subreport tag. (optional)
 
|}
 
 
 
'''Example'''
 
 
 
<pre>
 
<#subreport template="Report 2" param1="value1" param2="value2" param3="value3">
 
</pre>
 
 
 
====Variable Tag (var)====
 
 
This tag is used to add variables to the report. One tag defines one variable. Variables can be referenced in other tags using expression arguments. Variables are processed in the order they appear in the report. It’s a good practice to place the variables in a same place in the beginning of a report. Variable values cannot be changed during the report run – their value is calculated when the report run begins.
 
 
 
Variables are useful, when there is an expression which value is used several places in the report. Variables may also be used to simplify formulas, when part of a formula is defined as a variable.
 
 
 
There must not be a variable having a same name as a parameter in the same report. The scope of variables is the report template. If the variable must available in a subreport, the variable must be passed as a parameter to the subreport.
 
 
 
{| class="wikitable"
 
!Attribute
 
!Description
 
|-
 
| name (boolean) || Variable name. Any tag attribute names mentioned in this documentation cannot be used as parameter or variable names (reserved names).
 
|-
 
| value (object) || Variable value.
 
|}
 
 
 
'''Example'''
 
 
 
 
 
Report has tag '''<#variable name="variable1" value="2">'''. This variable can be used in other expressions, e.g. '''<#expression value="3 + [variable1]">''' (result is 5).
 
 
 
==== Direct Tags====
 
 
 
It’s possible to reference to report parameters and variables using tags which name equal parameter or variable name. These are called '''direct tags'''. For example if a report has a variable '''var1''', a tag '''<#var1>''' can be used. Note that, the same result can be achieved using variable tag: '''<#variable value=="[var1]">'''. Purpose of direct tags is to shorten tag syntax.
 
 
 
 
 
Note the following when using direct tags:
 
 
 
: •  Direct tags cannot contain any attributes, unlike all other tags always contain at least one attribute.
 
 
 
: •  In the direct tags, variable value is implicitly converted into string. E.g. date variables are converted using date format defined in the Reportsettings tag.
 
 
 
: •  In direct tags it’s not possible to define styles using styles attribute.
 
 
 
: •  It’s not possible to use "visible" attribute.
 
 
 
: •  When writing direct tags, note the letter case in parameter and variable names.
 
 
 
===Expression Language===
 
 
 
QPR Word Reports uses an expression language enabling all tag parameters can be written using expressions (formulas). Expressions makes it possible to define values dynamically (values that are calculated when the report is run). Expression parameters are defined using two equal signs instead of one. As an example, a parameter value may be static, such as '''visible="false"''', or the parameter value may come from an expression, such as '''visible=="[typename]='Activity'".'''
 
 
 
When writing tags, characters escaping is needed. There are three levels where escaping need to be done, explained in the table below.
 
 
 
{| class="wikitable"
 
! Level
 
! Purpose
 
! Needed escapings
 
! Example
 
|-
 
| 1 || QPR Web Services || Characters \ and " are written \\ and \" || QPR Web Service query:
 
[PG].models(criteria="name=\"model'1\"")
 
|-
 
| 2 || Expressions || Characters \ and ' are written \\ and \' || Previous query escaped for an expression:
 
[PG].models(criteria="name=\\"model\'1\\"")
 
|-
 
| 3 || Template tags || Character " is written \" || Previous expression escaped for template tag:
 
[PG].models(criteria=\"name=\\\"model\\'1\\ \"\")
 
|}
 
  
Note that the escaping for expressions (level 2) is only needed, when the query is an expression.
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
  
Data from main report to subreport may be passed in any datatype, so it doesn’t have to be converted to string. Still, parameters passed to a main report from a url are always strings.
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
  
If an expression returns a datetime value, it is implicitly converted to string if it’s shown in Word report (reportsettings tag’s dateformat parameter is used here).
+
(b) You must cause any modified files to carry prominent notices          stating that You changed the files; and
  
===Setting Content Visibility===
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
  
All applicable tags support the parameter '''visible,''' which is used to remove the whole content that the tag is about to render. Available values are '''true''' (shown) or '''false''' (hidden). The value may be a static or a result of an expression.
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
  
 +
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work      by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
  
When a tag is set to hidden, its expressions are not evaluated nor is related QPR data fetched. Thus the tag may contain errors, which are not emerged when the tag is hidden.
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor,       except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
  
The tag is optional, and by default its value is true (the tag is shown).
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
 +
Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
  
===Defining Styles===
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
  
There are two ways to defined styles in the reports:
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason      of your accepting any such warranty or additional liability.
  
: • '''Apply styles in the template (static way)''': All the styles applied in the template are in the final reports. Styles can also be defined for tags, meaning that the style is applied for the content produced by the tag. If a style of a text block is always same, it is easiest to use this way.
 
  
: • '''Use the "styles" parameter (dynamic way)''': All applicable tags support the parameter '''style,''' which is used to dynamically determine the style of the paragraph or characters that is rendered by the tag. Value of the style tag is simply the name of the style. Both paragraph and character styles may be used.
+
END OF TERMS AND CONDITIONS
 +
APPENDIX: How to apply the Apache License to your work.
 +
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
 +
Copyright 2014 Microsoft Open Technologies, Inc.
 +
Licensed under the Apache License, Version 2.0 (the "License");    you may not use this file except in compliance with the License.    You may obtain a copy of the License at        http://www.apache.org/licenses/LICENSE-2.0
 +
Unless required by applicable law or agreed to in writing, software    distributed under the License is distributed on an "AS IS" BASIS,
 +
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and    limitations under the License.
 +
----
 +
NCalc. Copyright (c) 2011 Sebastien Ros
  
 +
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  
Note that the style must exist in the Word file, so that it can be used dynamically. All the available styles in Word are not necessary stored in the Word file, although they are visible in the ribbon in the Word application. To make sure the style definition is in the Word file, the style needs to be used somewhere in the template. If you need to add text to the report that should not to be in the final report, it is possible to use Variable tags for this purpose because they disappear in the final report.
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 
As an example, in recursive reports the heading level is determined by how deep the processing is in the recursive tree. For that you can add '''style==‘Heading ’ + [recursionlevel]"''', where recursionlevel is a parameter or a variable increased by one on every subreport call when going deeper in the hierarchy.
 
  
===Authentication and Data Security===
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 +
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 +
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 +
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Latest revision as of 11:53, 4 June 2024

Introduction to QPR Reporting Add-on

QPR Reporting Add-on contains the following parts:

Installation

Follow these steps to install QPR Reporting Add-on. Installation package is available in the downloads page.

Note that there are different folder paths for each QPR Suite version. These instructions use X in the folder names which should be replaced with the actual QPR Suite version.

1. Check whether the QPR environment uses Windows authentication (IWA) and/or HTTPS connection. Windows authentication is used when QPR system is connected to LDAP/AD and Windows user accounts are used to login to QPR. HTTPS connection is in use when QPR Portal url starts with https.

2. Open Programs and Features (in Windows Control Panel) and click Turn Windows features on or off. Check that components listed in the following table are installed. The installation procedure depends on Windows version. QPR Reporting Add-on needs .Net Framework 4.6.1 or later version.

Windows Version Required Components
Windows 10

(already includes .NET Framework 4.6)

  • All components in Internet Information Services (except FTP Server and WebDAV Publishing)
  • Following Windows features: (see the image below)
    • .Net Framework 4.6 Advanced Services > ASP.NET 4.6
    • .Net Framework 4.6 Advanced Services > WCF Services > HTTP Activation

Windows features 1.jpg

Windows 8

(already includes .NET Framework 4.5.1)

  • All components in Internet Information Services (except FTP Server and WebDAV Publishing)
  • Following Windows features: (see the image below)
    • .Net Framework 4.5 Advanced Services > ASP.NET 4.5
    • .Net Framework 4.5 Advanced Services > WCF Services > HTTP Activation

Windows 8 features.jpg

3. (This step is for checking the QPR Suite has been configured properly.) Check that QPR Web Services web.config file is a proper one (located in C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices). In the default QPR installation, there are files web.config and web.config.IWA. If QPR environment uses Windows authentication (refer to step 1), the latter file must be taken into use by renaming

  • web.config to web.config.noIWA, and
  • web.config.IWA to web.config.

4. (This step is for checking the QPR Suite has been configured properly.) If using Windows authentication (refer to step 1), make sure C:\ProgramData\QPR Software\QPR 20XX\20XX.1\Servers\Settings\QPR_Servers.ini has settings IWACGIBinaryHost=127.0.0.1 and CGIBinaryHost=127.0.0.1. under WAS Settings section.

5. Common QPR authentication needs to be configured (to establish common authentication between QPR Suite WAS and WS). Follow these instructions: Configuring Common Authentication for QPR Suite Portal and QPR Suite Web Service.

5. Copy QPRWebServicesExtensions folder from installation package to IIS published files in C:\inetpub\wwwroot\.

6. Installation package contains the following preconfigured files to be used as QPR Reporting Add-on web.config file:

  • a) web.config: for HTTP connection and Anonymous authentication to the Reporting Add-on
  • b) IWA.web.config: for HTTP connection and Windows authentication to the Reporting Add-on
  • c) HTTPS.web.config: for HTTPS connection and Anonymous authentication to the Reporting Add-on
  • d) HTTPS+IWA.web.config: for HTTPS connection and Windows authentication to the Reporting Add-on

Copy a suitable configuration file to C:\inetpub\wwwroot\QPRWebServicesExtensions\ folder and rename it as web.config.

Do not mix up QPR Reporting Add-on's web.config file (in C:\inetpub\wwwroot\QPRWebServicesExtensions\) with QPR Web Services' web.config file (in C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices\web.config).

7. Configure QPR Reporting Add-on settings listed in the Settings section. The settings are located in the C:\inetpub\wwwroot\QPRWebServicesExtensions\web.config file in the appSettings section. Quick guide for usual configurations (file C:\inetpub\wwwroot\QPRWebServicesExtensions\web.config):

  • a. When Windows authentication is not in use and Common QPR Authentication is used: wcfsecuritymode=none and qprauthenticationmode=commonqprauthentication
  • b. When Windows authentication is in use: wcfsecuritymode=message and qprauthenticationmode=windows

8. Make a backup copy of the C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices\servicetester.aspx file. Replace the file with the servicetester.aspx. file from the installation package.

9. Make sure QPR Web Services Server is running. The installation cannot be continued until QPR Web Services Server is running properly.

10. In IIS Management Console, go to Application Pools (in left side hierarchy). Create a new application pool by clicking Add Application Pool…. Use the settings in the image below (settings v.4.0.x and Integrated). Please do not change settings for existing application pools, if they are used by other web applications because then the other applications may stop working. Especially QPR Suite has an application pool that is v.2.0.x and Integrated.

Add application pool.jpg

11. Click the previously created application pool, click Advanced settings… and select Identity setting. In the opening Application Pool Identity window, click Built-in account and select LocalSystem (see the image below). Click OK for the both open windows.

Application pool.jpg

12. Find the QPRWebServicesExtensions folder in IIS Management Console and click Convert to Application (secondary mouse button). Select the previously created application pool QPR Web Services Extensions.

13. Check the IIS authentication settings by clicking QPRWebServicesExtensions web application is IIS Management Console (on the left side hierarchy). Check that Features View is opened (in bottom), and doubleclick Authentication. The authentication settings must match with the web.config file, which was set in step 3: a. For Windows authentication: Anonymous Authentication must be Disabled and Windows Authentication must be Enabled. (see the image below) b. For Anonymous authentication: Anonymous Authentication must be Enabled and Windows Authentication must be Disabled. ASP.NET Impersonation must be Enabled in both cases.

Authentication.jpg

14. Check that QPR Reporting Add-on is working by making the tests listed in chapter Installation tests. If you encounter any issues, check if any of the error situations described in Troubleshooting were encountered.

15. These rest steps are only needed when using the Reporting Add-on in the QPR Suite portal. Copy DWV templates folder from installation package as a DWV templates root folder (setting dwvtemplatesphysicalpath in QPR Reporting Add-on’ web.config file). Also copy Word report templates folder as the templates root folder (setting dwrtemplatesphysicalpath in QPR Reporting Add-on’ web.config file) and trend_down.png and trend_up.png files from DWV templates\Dashboard folder to C:\inetpub\wwwroot\qpr20XX-1\qprsoftware\portal\images.

16. Deploy Reports Menu UI element to the Portal by replacing mainview.tpl and headerview.tpl files from the installation package Reports Menu folder to C:\ProgramData\QPR Software\QPR 20XX\20XX.1\Servers\Templates\WAS\Portal. (Alternatively, use the externalreportsmenu.patch file.)

17. Copy icon_reports.png from Reports Menu folder to C:\inetpub\wwwroot\qpr20XX-1\qprsoftware\portal\images.

18. Copy jquery.filedownload.js from Reports Menu folder to C:\inetpub\wwwroot\qpr20XX-1\qprsoftware\Common\scripts.

19. Add the following CSS to C:\inetpub\wwwroot\qpr20XX-1\qprsoftware\stylesheets\custom.css:

#ReportsToolbarMenu {
  cursor: pointer;
}

#ReportsToolbarMenu .activetarget {
  background-color: inherit;
}

.visiblereportmenulink, .reportmenumain > a {
  background: url(../portal/images/icon_reports.png) no-repeat left -1px;
}

.disabledreportmenulink {
  background: url(../portal/images/icon_reports.png) no-repeat left -1px;
  color: #BBBBBB !important;
  cursor: default;
}

#InformationViewFrame {
  background-color: white;
}

20. Restart Windows service for QPR Suite, or clear QPR Portal templates cache (http://SERVERNAME/QPR20XX-1/Portal/QPR.Isapi.dll?QPRWAS&*cleartemplatecache). In addition, clear web browser’s cache.

21. Check that the detailed error message are enabled in IIS.

Web.config File Settings

QPR Reporting Add-on is configured using the C:\inetpub\wwwroot\QPRWebServicesExtensions\web.config file. The file has following settings in the configuration > appSettings section.

Attribute Description
qprwebserviceaddress QPR Web Service url address. This should point directly to QPR Web Service server’s port. The default port is 9002, but the actual port in use can be seen in QPR Configuration Manager (Common > Server locations > Web services server). Example: http://localhost:9002/QPR20XX-1/Portal/QPR.Isapi.dll/wsforward/mainservice.svc/wshttp

Notes:

  • It's recommended to use localhost as a hostname if the QPR Web Service Server is in the same computer.
  • The address starts with http even if QPR environment uses https.
  • Check the proper url path from QPR Portal address (QPR20XX-1 in the example). The path is QPR version specific by default.
  • Validity of the address can be checked by opening the address in the server computer using browser without the ending /wshttp, e.g. http://localhost:9002/QPR20XX-1/Portal/QPR.Isapi.dll/wsforward/mainservice.svc. A page displaying You have created a service should open. Note that this address doesn't work in client computers (this is because localhost always references to that computer where the browser is running).
qprauthenticationmode Determines how the Reporting Add-on authenticates users to QPR Web Service. There are following options:
  • windows: Windows user making the request is used to authenticate to QPR Web Service. It’s advisable to use this authentication method if available. If the session id is provided (in the xsession parameter) while the windows authentication mode is used, the provided session id is not used. When this option is used, wcfsecuritymode must be message. Note that when using QPR Reporting Add-on with QPR UI, the setting cannot be used, because QPR UI connects to the Reporting Add-on using the user account which runs the Payara web server (not the person's user account).
  • commonqprauthentication: Common QPR authentication is a mechanism where QPR products have been configured to trust each other in a way that when a user is authenticated to one of the products, the user is also authenticated to other QPR products as well. When common QPR authentication is in use, session id of the source QPR system is passed as a parameter to the Reporting Add-on. Note that the session id doesn't need to be the QPR Web Service session id, but the session id of any QPR product may be used. The xsession parameter is used to pass the common authentication session id. This options can be used when wcfsecuritymode is either none or message. Also the token authentication introduced in QPR Suite 2019.1 works with the commonqprauthentication setting.
  • fixedcredentials: The defined user account is used for all access to QPR Web Service. The account's username and password are defined in the configuration (see settings username and password). Note that from the data security point of view this is not the best option, because users running the reports may see data that they don't see in their own account. If the session id is provided (in the xsession parameter), when the fixedcredentials authentication mode is used, the provided session id is used instead of authenticating using the fixed credentials. This options can be used when wcfsecuritymode is either none or message.
wcfsecuritymode

This setting defines which security settings are used by the QPR Web Service (i.e. whether the Windows authentication is in use). This setting must correspond to QPR Web Service settings (in C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices\web.config). Options:

  • none: Use this when Windows authentication in the QPR Web Service is not in use.
  • message: Use this when Windows authentication in the QPR Web Service is in use.
dprtemplatesphysicalpath Folder in the file system where QPR PowerPoint Reports template files are located.
dwrtemplatesphysicalpath Folder in the file system where QPR Word Reports template files are located.
dwvtemplatesphysicalpath Folder in the file system where QPR Web Views template files are located.
installpath Path for QPR Web Services Extensions binaries installation folder, which is by default C:\inetpub\wwwroot\QPRWebServicesExtensions. This information is needed by Expression language WebpageAsImage function.
templatecaching Determines whether template files caching is enabled (true) or disabled (false). Template caching means that templates are read from file system to server memory when the IIS web application starts. When template caching is enabled, pages are processed faster and disk load as reduces. Template caching should be enabled for production environments.

Template caching is usually be disabled for development work, so that changes in templates can be seen immediately in result pages. When template caching is disabled, all templates are read into memory every time, when a page is requested.

disallowedfunctions Comma separated list of functions that are not allowed to be executed by the Reporting Add-On. There are some functions which are able to manipulate files in the server computer, and enabling those files may cause security issues. Function names must be written in lowercase.
loglevel Possible values: None, Error, Information and Verbose.
qprwebapplicationname Setting for Dynamic Web Views: Name of the QPR web application in IIS. This parameter is not mandatory, but it should be defined, as it can be used by html content to reference QPR resources published in IIS (such as images and css files).
reporttemplateparameter Setting for Word reports: Defines the name of the parameter which passes the report template path. See chapter Working with Report Templates.
qprtemplateidparameter Setting for Word reports: Parameter name which passes QPR’s Word report template object id. This can be used when the report templates are stored in QPR Portal (i.e. QPR system objects) (see chapter Working with Report Templates)
username Password for QPR Suite when authenticationmode is fixedcredentials.
password Password for QPR Suite when authenticationmode is fixedcredentials.
executionTimeout (in the httpRuntime tag) Timeout for request processing in seconds. Usually there is no need to change this setting. The value should be increased if there are heavy requests which take time to run. Note that the timeout limit works as a protection when the processing never ends as a results of an error (this may be possible in e.g. recursive reports).

Installation Test

Do the following tests to confirm that QPR Reporting Add-on is working:

  1. Open http://SERVERNAME/QPRWebServicesExtensions/ExpressionEngine.svc. The address starts with https instead of http, when also QPR Portal address starts with https. There should open a page stating You have created a service. If an internal server error (error code 500) with no error details is returned, test the url in the server, because in the server the error message has more details.
    • If this works, the .Net application is running properly in IIS.
    • If this doesn’t work, there is a problem with IIS settings or .Net installation.
  2. Open QPR Web Services Tester, which is usually in http://SERVERNAME/QPR20XX-1/Portal/QPR.Isapi.dll/wsforward/servicetester.aspx. The SERVERNAME can be found in QPR Portal url address. The address starts with https instead of http, when also QPR Portal address starts with https.
  3. Set valid credentials in the Authentication tab. Confirm that QPR Web Services is working by making a query using QPR Web Services Tester in the QueryObjects tab.
  4. Check that the page contains RunExpression tab.
  5. Query for example [UM].users like in the image below. When clicking QueryObjectsAsXml, the test is successful, if a text starting with <ResultsetHierarchy … appears. Note that your query results may be different than the results in the image. If this test doesn’t work, there is a problem with QPR Web Services.


Installation test.jpg

6. Go to RunExpression tab, click Run using the expression it contains by default. It should return Ok (below the Run button). This confirms that the .Net application is running in IIS and the QPR Web Services connection works.

Running Multiple QPR Reporting Add-ons

It may be needed to run multiple QPR Reporting Add-on instances in the same server machine, e.g. when different versions or different QPR Reporting Add-on settings are needed. Running multiple QPR Reporting Add-on instances simultaneously is possible: Copy the QPRWebServicesExtensions folder with a different name to IIS root folder, and make all the settings made to the default folder to that folder. The other instance is referenced using the other folder name in URLs.

Troubleshooting Installation Issues

Issue Resolution
Web browser returns Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. See the resolution here: https://support.microsoft.com/en-us/kb/2015129
Web browser returns: Memory gates checking failed because the free memory (nnn bytes) is less than x% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element. The reason for this error is that there is little free memory in the system, and thus the primary solution is to get more free memory in the system. It’s still possible to set the free memory limit to a lower level, but this may cause instability. To do that, find the setting minFreeMemoryPercentageToActivateService from the QPR Web Services Extensions’ web.config and set the limit lower (e.g. to 2). More information:

https://msdn.microsoft.com/en-us/library/dn458357(v=vs.110).aspx

Web Server returns Request URL Too Long and HTTP Error 414. The request URL is too long. Open IIS Management Console, open QPR Web Services Extensions, click Request Filtering, click Edit Feature Settings... and increase Maximum URL length (Bytes) setting (e.g. add two or three zeroes at the end).
Following errors are returned by Expression Engine tester: The message with Action 'http:// schemas.xmlsoap.org/ws/2005/02/trust/RST/ Issue' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding\security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint. The reason is the QPR Web Services and QPR Web Services Extensions WCF settings don’t match. Please check installation steps 3, 4 and 6.

When running a report, the following error appears:

Requested registry access is not allowed.
The type initializer for 'MS.Utility.EventTrace' threw an exception.
Error in opening document - the document is not valid Office Open XML format

This is a user rights issue. Check that the Application Pool Identity is LocalSystem.

When opening QPR Web Services Tester, the following message appears: ... Redirecting to mainservice page .... There may be a problem with IIS handler mappings. Tests with following settings:
  • Remove C:\inetpub\wwwroot\web.config if it exists. Make a backup before deleting.
  • Contents of C:\inetpub\wwwroot\qpr20XX-1\web.config should be
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="false" />
        <httpErrors>
            <clear />
        </httpErrors>
        <handlers accessPolicy="Read, Execute, Script">
            <remove name="AssemblyResourceLoader-Integrated-4.0" />
            <remove name="AssemblyResourceLoader-Integrated" />
            <remove name="AXD-ISAPI-4.0_64bit" />
            <remove name="AXD-ISAPI-4.0_32bit" />
            <remove name="AXD-ISAPI-2.0" />
            <remove name="AXD-ISAPI-2.0-64" />
            <remove name="PageHandlerFactory-ISAPI-4.0_64bit" />             
       <remove name="PageHandlerFactory-Integrated-4.0" />
            <remove name="PageHandlerFactory-ISAPI-4.0_32bit" />
            <remove name="PageHandlerFactory-Integrated" />
            <remove name="PageHandlerFactory-ISAPI-2.0" />
            <remove name="PageHandlerFactory-ISAPI-2.0-64" />
            <remove name="svc-ISAPI-4.0_64bit" />
            <remove name="svc-ISAPI-4.0_32bit" />
            <remove name="svc-Integrated-4.0" />
            <remove name="svc-ISAPI-2.0-64" />
            <remove name="svc-ISAPI-2.0" />
            <remove name="svc-Integrated" />
        </handlers>
    </system.webServer>
</configuration>
  • Contents of C:\inetpub\wwwroot\qpr20XX-1\Portal\web.config should be
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers accessPolicy="Read, Execute, Script" />
        <directoryBrowse enabled="false" />
        <defaultDocument>
            <files>
                <clear />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
                <add value="QPR.Isapi.Dll" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

Uninstallation

Follow these steps to uninstall QPR Reporting Add-on:

  1. In IIS Management Console click Remove for the QPRWebServicesExtensions web application (mouse secondary button).
  2. Delete the web application’s folder C:\inetpub\wwwroot\QPRWebServicesExtensions in the disk.
  3. Revert the original C:\Program Files\QPR Software Plc\QPR 20XX.1 Servers\WebServices\servicetester.aspx from release package.

QPR Reports Menu

QPR Reports Menu is a dropdown menu for QPR Suite Portal to open reports and web pages that can be referenced using urls. The menu is able to add context related information automatically to the url as parameters, such as model, diagram and object id. Report items in the menu are configured in the file C:\DWV templates\ReportsMenu\ReportsMenuConfiguration.xml (the location may vary).

Reports Configuration

Report items in the menu are configured in the file C:\DWV templates\ReportsMenu\ReportsMenuConfiguration.xml (note that your location may be different). The configuration is an xml file having a root tag reportsmenu and subtags menuitem for individual report items. The menuitem tag has menu item settings as subtags which are described in the following table.

Settings can be defined using static string values or expressions. If the value is defined using an expression following attribute is added to the settings tag: expression="true". Note that the setting tags must be in the order that they are defined in the following table. Settings that are not mandatory, can be left out.

Parameter Description
reportname (string) Visible name of the report in the dropdown menu.
reporturl (string) Url to the report. Characters ? and & are automatically added to the end of the url if needed for appending url parameters. To build SSRS report urls, see http://msdn.microsoft.com/en-us/library/ms153586(v=sql.110).aspx.
availabletabs (string) List of QPR Portal tabs where the report is available. Available tab names can be found in http://kb.qpr.com/qpr2017-1/index.html?getportalurl.htm (see "Also Portal internal view names..."). The tabs need to be defined in lower case. If this parameter is empty, the report is visible in all tabs.

Following default tabs name are available: pgplugin_processmaps, pgplugin_navigator, pgplugin_actions, pgplugin_organizations, scplugin_scorecards, scplugin_strategymaps, scplugin_analysis, scplugin_navigator, scplugin_reports, scplugin_actions, discussion, byuser, bytime, actionanalysis

passparameters (string) List of parameters that are passed to the external report (see available parameters in chapter Portal Context Parameters). Passed parameters may be restricted, because e.g. SSRS gives an error when parameters are passed that are not defined in the report.
order (integer) An integer which determines order of reports in the menu. The reports are shown in the ascending order. If there are multiple reports with a same order number, the alphabetical order of the reportName parameter determines the ordering (secondary sorting).
waitanimation (boolean) Determines whether to use animation while waiting report loading. This only works in the Word reports. Options true and false.

The animation may only be used if the report access url has same DNS name and port than QPR Portal. This is because the disappearance of the animation is based on a cookie that is set by report providing server when the report is ready. When the cookie is received from the response of the report providing server, the loading animation is removed. If the loading animation doesn’t work correctly for any compatibility issue, disable it (set to false).

visibility (string) Determines the visibility status of the report item in the menu. Available statuses are:
  • visible: The report is visible and can be opened.
  • disabled: The report is visible in the menu in a grey color, and it’s not openable. This status can be used to imply, that there is some condition preventing from running the report, such as the required type of element is not selected.
  • hidden: The report item is not visible in the menu at all.
visiblemessage (string) Tooltip text shows for visible report items when cursor is moved over the report item. The text may contain html code.
disabledmessage (string) Tooltip text shown for disabled report items when cursor is moved over the report item. The text may contain html code.
accessrights (boolean) Determines if user has access to see the report item as boolean value (“true” if there are rights to see the report item).
[OpenWindow parameters] QPR Portal’s OpenWindow function parameters. These parameters determine e.g. size and position of the window. Available parameters:
  • target (string)
  • width (integer)
  • height (integer)
  • scroll (boolean)
  • preventcaching (boolean)
  • x (integer)
  • y (integer)

Portal Context Parameters

The following table lists information that can be passed to reports as url parameters.

Parameter Description
modelid PD/EA or Metrics model id
diagramid Diagram id (i.e. process level). Note that for the top diagram level, the id is "PG.<modelid>.0" which represents the model object.
objectid Object in details pane.
tab Name of the tab where the report is run.
zoom Zoom percentage. Only available in PD/EA tabs.
viewid View id
xsession QPR Web Service session id. External report can use this to login to QPR Web Service.
currentuserid Current user id.
scorecardid Scorecard id. Only available in Metrics.
seriesid Series id. Only available in Metrics.
periodid Period id. Only available in Metrics.

Acknowledgements

Open XML Power Tools. Copyright (c) Microsoft Corporation

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors'name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim areinfringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent,trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so onlyunder this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors giveno express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.

"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).

Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.


3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.


END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2014 Microsoft Open Technologies, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


NCalc. Copyright (c) 2011 Sebastien Ros

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.