Embedding Quick Report outputs

Table of contents:


Description

By integrating Quick Reports, reports can be output comparable to the Innosoft Classic applications. These reports are created as PDF files. As with the Innosoft Classic applications, the report structures are based on QRA files. In order to use this functionality, settings must be made on the computer or server, possibly in the database and in the FSM. Then this functionality can be implemented in the JSON file. This service works with the ISPrintService.

Installation

To use the Quick Reports in the web application, the ISPrintService must be installed and the system must be adapted. For more information on the ISPrintService, see here .

Implementation

Required parameters

The parameters are written here in the same way as in the files.

reportName

Enter the name of the QRA file with the file extension.

fileName

Enter the name of the PDF file to be created. The name is entered without the file extension.

delete

Here you can use a Boolean (true/false) to specify whether the PDF file just created should be deleted, i.e. the file is then not to be found in the target directory but only in the download directory of the browser. If no specification is made, the value is set to false.

withDateTime

If there is a timestamp in the file names, the boolean parameter (true/false) must be set to true.

paramValues

This parameter is itself an array consisting of the value pair "name" and "value". Under "name" you enter the name of the parameter from the QRA file and under "value" the value that you want to give to this value pair. The value can be specified statically or set dynamically from a field of the entity.

If you do not know the parameter name of the QRA file, you can view it yourself with the Report Designer (Repo32.exe).

Implementation as a menu item

In order to create an action button that is to create pfd reports, you must adapt the appropriate JSON file. The adaptation is done under "menuDataSource". There are two ways to do this:

If a menu item with the type "qrreport" is added, you can specify the parameters under this new menu item, as usual, as JSON format. The parameters are specified in an array with the name "params". If you are not familiar with JSON and the FormConfig, you can find more information here.

Example

"type": "qrreport",
"text": "Erzeuge Report",
"show": "true",
"data": {
"params": [
{
"fileName": "Bericht",
"reportName": "DE_Service_Assignment.QRA",
"download": true,
"withDateTime": false,
"deleteReport": true,
"paramValues": [
{
"name": "PNummer",
"value": "entity.ProjNr"
},
{
"name": "INummer",
"value": "entity.PIndex"
}
]
}
]
}

Structure of a corresponding URL

The URL link for generating a report contains all the parameters needed to generate a report. After entering the link in the web browser, the file is generated and downloaded.

http://<server>/<app>/PrintService/DownloadReport?filename=<filename>&reportname=<Name des Reports>&delete=<wert>&withdatetime=<wert>&paramValues[n].name=<Name des Parmeters>&paramValues[n].value=<Wert des Parameters>

The value n starts with 0 and increases with each further parameter.

Implementation as a menu item in the Dynamic Search

If you want to call the output of the reports in the context menu, you have to adapt the corresponding xml file. Under the tag "<menu>" you have to add another "<menuitem>".

Please be careful to write "&amp;" instead of "&".

Example

<menu>
<menuitem name="servicereports" link="ServiceReport/Index?projNr={{{primarykey}}}&amp;pIndex={{{additionalkey}}}" primarykey="projnr" additionalkey="pindex" translationkey="WebSMS.ServiceReport.ServiceReports"></menuitem>
<menuitem name="Report" link="PrintService/DownloadReport?filename=test&amp;reportname=DE_Service_Assignment.QRA&amp;delete=false&amp;withdatetime=false&amp;paramValues[0].name=PNummer&amp;paramValues[0].value={{{primarykey}}}&amp;paramValues[1].name=INummer&amp;paramValues[1].value={{{additionalkey}}}" primarykey="projnr" additionalkey="pindex" translationkey="Report"></menuitem>
</menu>

Implementation as a function or similar in a tsx file (client-side programming)

If you want to create a report through a process in the main window (e.g. through certain buttons or events), you have to add a function in the tsx file that opens a new tab page in the web browser.

Example

onClick = () => {
Helper.openInNewBrowserTab(
Config.baseUrl + "Skills/PrintService/DownloadReport?filename=test&reportname=DE_Service_Assignment.QRA&delete=false&withdatetime=false&"
+ "paramValues[0].name=PNummer&paramValues[0].value=" + this.props.entity.ProjNr + "&paramValues[1].name=INummer&paramValues[1].value=" + this.props.entity.PIndex
);
}

Other

Advanced management

In the Settings section, you will find the item images/download/thumbnails/494471326/Suche-Text_Lupe_EN_img.png in the images/download/thumbnails/494470787/Reports_men%C3%BC_img.png menu. There a user has the possibility to download his last generated reports again. The administrator can view the reports of all users.

FAQ

  • Can any QRA file be implemented without additional editing?

In most cases, yes. QRA reports with parameters that cannot be filled with a field of the entity or a static value, but were previously specified manually, cannot currently be integrated correctly. Manual parameter entry during report creation is currently not possible.