Difference between revisions of "QPR Reporting Add-on"
Line 454: | Line 454: | ||
Following table contains QPR Word Reports’s parameters, which are configured in the '''web.config''' file of QPR Web Services Extensions. | 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. |
Revision as of 07:52, 15 June 2017
introduction
QPR Reporting Add-on is a combined installation package containing the following parts:
- •QPR Web Views
- •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.
windows version | required components |
---|---|
Windows 10 (already includes .NET Framework 4.6) | •All components in Internet Information Services (except FTP Server) •Following Windows features: (see image below) .Net Framework 4.6 Advanced Services > ASP.NET 4.6 .Net Framework 4.5 Advanced Services > WCF Services > HTTP Activation |
Windows 8 (already includes .NET Framework4.5.1) | •All components in Internet Information Services (except FTP Server) •Following Windows features: (see image below) .Net Framework 4.5 Advanced Services > ASP.NET 4.5 .Net Framework 4.5 Advanced Services > WCF Services > HTTP Activation |
Windows Server 2012 R2 (already includes .NET Framework 4.5.1) |
•All components in Internet Information Services (except FTP Server) •Following Windows features: (see image below) .Net Framework 4.5 Features > .Net Framework 4.5 .Net Framework 4.5 Features > ASP.NET 4.5 .Net Framework 4.5 Features > WCF Services > HTTP Activation 600px |
Windows Server 2012 (needed .Net Framework is not installed by default) | •All components in Internet Information Services (except FTP Server) •Following Windows features: .Net Framework 4.5 Advanced Services > .Net Framework 4.5 .Net Framework 4.5 Advanced Services > ASP.NET 4.5 .Net Framework 4.5 Advanced Services> WCF Services > HTTP Activation •Install .Net Framework 4.5.2: Online installer: http://www.microsoft.com/en-us/download/details.aspx?id=42643 Offline installer: http://www.microsoft.com/en-us/download/details.aspx?id=42642 |
Windows Server 2008 R2 (needed .Net Framework is not installed by default) |
•All components in Internet Information Services (except FTP Server) •All components in .Net Framework 3.5.1 (see image below) •Install .Net Framework 4.5.2: Online installer: http://www.microsoft.com/en-us/download/details.aspx?id=42643 Offline installer: http://www.microsoft.com/en-us/download/details.aspx?id=42642 600px |
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
a. web.config to web.config.noIWA, and
b. web.config.IWA to web.config.
4. If using Windows authentication (refer to step 1), make sure C:\ProgramData\QPR Software \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. There are following preconfigured files available to be used QPR Reporting Add-on web.config file:
- a) web.config: for HTTP connection and Anonymous authentication
- 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 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).
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. Set the parameters in the QPRWebServicesExtensions web.config’s appSettings section. Parameters are listed in Settings.
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.
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.
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.
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:
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.
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.)
14. Configure QPR Reporting Add-on settings listed in Settings. Especially check the qprwebserviceaddress carefully. Quick guide for usual configurations:
- c. When Windows authentication is not in use: wcfsecuritymode=none and qprauthenticationmode=passedsession
- d. When Windows authentication is in use: wcfsecuritymode=message and qprauthenticationmode=windows
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.
16. Create folder C:\temp. It is possible to use other folder but its location must be changed to web.config temppath setting.
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.
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:
#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; }
10. Restart Windows service for QPR Suite, or clear QPR Portal templates cache. In addition, clear web browser’s cache.
settings
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.
attribute | description |
---|---|
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). Example: http://localhost:9002/QPR201X- 1/Portal/QPR.Isapi.dll/ wsforward/mainservice.svc/wshttp Notes: • It’s recommended to use localhost as a hostname if the QPR Web Services 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 (QPR201X-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/QPR201X-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). |
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: • none: Use this when Windows authentication is not in use. • message: Use this when Windows authentication is in use • transport: Usually not used. • transportwithmessagecredential: Usually not used. |
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. • 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). • 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: https://devnet.onqpr.com/pawiki/index.php/Common_QPR_Authentication#Linking_between_QPR_Products. 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. |
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. |
temppath | Path to a file where Reporting Add-on may write temporary files. |
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, 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) |
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. |
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. 1. Open QPR Web Services Tester, which is usually in http://SERVERNAME/QPR201X-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.
- 2. Check that the page contains RunExpression tab.
- 3. Set valid credentials in the Authentication 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.
- 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 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.
- 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.
Authentication and Data Security
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
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 |
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 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\qpr201X-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\qpr201X-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>
QPR Expression Engine
Expression Engine for QPR Suite contains the following components:
- - Expression Engine Web Service
- - 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:
var1=3 + 9 / 3
var2=2*[var1]
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
type:rootobject | ||
---|---|---|
attribute | type | description |
webServiceSessionId | string | QPR Web Service’s session id. Used only if authenticationmode=passedsession. |
expressionSet | string[] | List of expressions |
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. |
Following output data format is used by both services.
Output Data Format
type: ResultDataTable | ||
---|---|---|
Attribute | Type | Description |
headers | header[] | Array of header rows. There can be one or two headers. |
rows | ResultDataTabl eRow[] | Array of data rows |
type: ResultDataTableRow | ||
Attribute | Type | Description |
cells | ResultDataTableCell[] | Array of data cells |
leftIdentifier | string | |
rightIdentifier | string | |
type: ResultDataTablecell | ||
Attribute | Type | Description |
rawValue | string | Unformatted raw value |
formattedValue | string | Value that is displayed to users |
sortValue | string | Value that can be used to sort the values |
datatype | string | Datatype of the value: string, numeric, int |
type: ResultDataTableHeader | ||
Attribute | Type | Description |
cells | ResultDataTableHeaderCell[] | |
type: ResultDataTableHeaderCell | ||
Attribute | Type | Description |
label | string | |
columnspan | int | Number of columns the header extends |
Example
Following image shows QPR Web Service tester where Expression Engine Service Tester is installed.
QPR Word Reports
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.
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).
Main features
QPR Word Reports contains the following main features:
- • The reports are run as they are requested, so the reports always contain the latest data.
- • Reports can have parameters affecting report contents.
- • 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.
- • 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).
- • 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
Concepts
QPR Word Reports is based on the following concepts:
- •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.
- • Templates contain tags, which instruct how the content is added to the report and how dynamic parts of the report are built.
- • Tags contain attributes, which offer additional information for the tag.
- • 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 http://kb.qpr.com/qpr2017-1/index.html? functions.htm.
- • 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.
- • 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.
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.
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¶meter1=param1value¶meter2=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.