Skip to main content

Jasper Reports

Header

Level: Expert

Keywords: report, JasperReports

The result: integration of BS reports to your project

How to create a SAMO BS report

Use of Business Server (BS) to create a final report is an advanced task in templating. BS in together with JasperReports XML-file brings to the implementation a very wide range of options in templating. Similar to a LIDS report, the application server fills that templates with a specific data when a request on a report is invoked. The request can be invoked from an intent or from "action button" or as a secondary step during other action.

1. Template creation

First of all you need to create JasperReports XML-file according to your needs. All templates are stored in the main project package (..\metadata-packages\package_name\lids-business-service\templates\documents). It is recommended to sort templates in groups (make a folder structure).

Example of JasperReports XML-file with JSON as data source can be found here

warning

Fonts may be missing at the server from which the application is launched (mostly on LINUX servers) and report generating can crash. If that occurs, you need to add given xxx.ttf file in the font's folder in the main project package (..\metadata-packages\package_name\lids-business-service\templates\fonts). Name of the file must be in a specific format (e.g. Arial_bold.ttf or TimesNewRoman.ttf)

2. Intent/action button configuration

Second step is to create an icon or button from which request will be invoked. Add intent configuration to ..\gateway\applications\applicationName\metadata\dynamic-client\samo-entities\intents folder.

intent - configuration example
{
"title" : "Print data from process control"
"entitiesGroup" : "processControl",
"icon" : "icons:print",
"type" : "business-action",
"display" : ["detail"],
"singleEntity" : true,
"actionId" : "printDecision",
"fullIdsProperty" : "selectedEntities",
"openFilesProperty": "files",
"noResultDetail" : true,

"security": {
"loggedIn": true
}

Define action for report creating in desired entity business metadata configuration.

action - configuration example
{
"printDecision": {
"title": "Print data from process control",
"includeStates" : ["*"],
"steps": [
{
"type": "script",
"source": "scripts/printDecision.js"
}
]
}
}

3. Business action configuration

You need to configure bussines action in JS which invokes request for a report. Also the action prepares data for the template. There are many possibilites how to prepare data model for the template. Here is a simple example of business action which serves data to the server and prepares temporary file for download. More examples can be found on the Examples of templating page.

business action - configuration example
function action (context) {
var processControl = context.entity;

var request = api.features().prepareGetRelatedFeatures(context)
.entityRef(processControl)
.addRelation("as_zadost_processControl")
.childRoleOnly()
.get();

request = (request != null && request.length > 0) ? request[0] : {};

var members = api.features()
.prepareQueryFeatures(context)
.prepareAddQuery()
.addEntityRef(processControl)
.output("none")
.add()
.prepareCreatePath()
.output("none")
.prepareAddQuery()
.addEntityType("ft_personProcessControl")
.add()
.prepareCreatePath()
.prepareAddQuery()
.addEntityType("ft_legalPerson")
.addEntityType("ft_individualPerson")
.add()
.create()
.create()
.getAll();

var tempFile = api.temporaryFiles()
.prepareCreateTemplatedFile(context)
.fileName("report_from_processControl.docx")
.outputType(docx)
.model({"processControl" : processControl,
"request" : request,
"members" : members})
.template("processControl.docx")
.templateGroup("controlActivity")
.create();

var response = api.response()
.prepareCreateClientResponse(context)
.prepareAddTemporaryFile()
.fileId(tempFile.getId())
.add()
.create();

return api.result()
.prepareCreateActionResult(context)
.result(response)
.create();
}

4. Report with input parameters

You can send as many input parameters from client application as you want. These should be used in SQL query.

template - example
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="A11V03" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="de50e221-27ee-4dd8-bce3-6ec43c77788b">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Aissbs"/>
<property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w1" value="298"/>
<property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w2" value="694"/>
<style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#CFE6CF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="tabulka kontroly" uuid="0f12030d-d7fe-4600-b39c-dae172c1de7e">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Aissbs"/>
<parameter name="INSPEKTOR" class="java.lang.String">
<defaultValueExpression><![CDATA[new java.lang.String("%")]]></defaultValueExpression>
</parameter>
<parameter name="DATUMOD" class="java.sql.Timestamp">
<parameterDescription><![CDATA[datum od]]></parameterDescription>
</parameter>
<parameter name="DATUMDO" class="java.sql.Timestamp">
<parameterDescription><![CDATA[datum do]]></parameterDescription>
</parameter>
<queryString language="SQL">
<![CDATA[SELECT COUNT(sid_kontroly) AS pocet_kontrol, SUM(den_jednotka) AS pocet_dnu, SUM(typ_kontroly) AS pocet_planovanych,
SUM(pocet_hodin) AS pocet_hodin, inspektor, prijmeni, den_kontroly
FROM report_kontroly_inspektori1
WHERE report_kontroly_inspektori1.inspektor::text = $P{INSPEKTOR}
AND den_kontroly >= (SELECT COALESCE( $P{DATUMOD} , '2000-01-01')::date)
AND den_kontroly <= (SELECT COALESCE( $P{DATUMDO} , CURRENT_DATE))
GROUP BY inspektor, prijmeni, den_kontroly]]>
</queryString>
<field name="pocet_kontrol" class="java.lang.Long">
<property name="com.jaspersoft.studio.field.label" value="pocet_kontrol"/>
</field>
<field name="pocet_dnu" class="java.lang.Long">
<property name="com.jaspersoft.studio.field.label" value="pocet_dnu"/>
</field>
<field name="pocet_planovanych" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="pocet_planovanych"/>
</field>
<field name="pocet_hodin" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="pocet_hodin"/>
</field>
<field name="inspektor" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="inspektor"/>
</field>
<field name="prijmeni" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="prijmeni"/>
</field>
<field name="den_kontroly" class="java.sql.Date">
<property name="com.jaspersoft.studio.field.label" value="den_kontroly"/>
</field>
<group name="prijmeni">
<groupExpression><![CDATA[$F{prijmeni}]]></groupExpression>
</group>
</subDataset>
<parameter name="INSPEKTOR" class="java.lang.String">
<defaultValueExpression><![CDATA[new java.lang.String("%")]]></defaultValueExpression>
</parameter>
<parameter name="DATUMOD" class="java.sql.Timestamp">
<parameterDescription><![CDATA[datum od]]></parameterDescription>
</parameter>
<parameter name="DATUMDO" class="java.sql.Timestamp">
<parameterDescription><![CDATA[datum do]]></parameterDescription>
</parameter>
<queryString language="SQL">
<![CDATA[SELECT COUNT(sid_kontroly) AS pocet_kontrol, SUM(den_jednotka) AS pocet_dnu, SUM(typ_kontroly) AS pocet_planovanych,
SUM(pocet_hodin) AS pocet_hodin, inspektor, prijmeni, den_kontroly
FROM report_kontroly_inspektori1
WHERE report_kontroly_inspektori1.inspektor::text = $P{INSPEKTOR}
AND den_kontroly >= (SELECT COALESCE( $P{DATUMOD} , '2000-01-01')::date)
AND den_kontroly <= (SELECT COALESCE( $P{DATUMDO} , CURRENT_DATE))
GROUP BY inspektor, prijmeni, den_kontroly]]>
</queryString>
<field name="pocet_kontrol" class="java.lang.Long">
<property name="com.jaspersoft.studio.field.label" value="pocet_kontrol"/>
</field>
<field name="pocet_dnu" class="java.lang.Long">
<property name="com.jaspersoft.studio.field.label" value="pocet_dnu"/>
</field>
<field name="pocet_planovanych" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="pocet_planovanych"/>
</field>
<field name="pocet_hodin" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="pocet_hodin"/>
</field>
<field name="inspektor" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="inspektor"/>
</field>
<field name="prijmeni" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="prijmeni"/>
</field>
<field name="den_kontroly" class="java.sql.Date">
<property name="com.jaspersoft.studio.field.label" value="den_kontroly"/>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="40" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="555" height="30" uuid="b756af77-06d9-49d9-9e1d-d649137cce2d"/>
<textElement textAlignment="Center">
<font size="18" isBold="true"/>
</textElement>
<text><![CDATA[PŘEHLED ČINNOSTI INSPEKTORŮ]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="112" splitType="Stretch">
<textField>
<reportElement stretchType="RelativeToBandHeight" x="0" y="77" width="555" height="29" uuid="f11eb4d7-3a83-4e6a-bb67-6250347061ff"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="16"/>
</textElement>
<textFieldExpression><![CDATA["Inspektor: " + $P{INSPEKTOR}]]></textFieldExpression>
</textField>
<textField>
<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="555" height="29" uuid="0ca12b8d-59a5-4efe-b4cd-6da053f17472"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="15"/>
</textElement>
<textFieldExpression><![CDATA[$P{DATUMOD} == null ? "Interval od: od počátku evidence" : "Interval od: " + (new SimpleDateFormat("dd.MM.yyyy").format($P{DATUMOD}))]]></textFieldExpression>
</textField>
<textField>
<reportElement stretchType="RelativeToBandHeight" x="0" y="40" width="555" height="29" uuid="4d54fccf-9114-4531-818e-ad8f6217492a"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="15"/>
</textElement>
<textFieldExpression><![CDATA[$P{DATUMDO} == null ? "Interval do: " + new SimpleDateFormat("dd.MM.yyyy").format(new Date()) : ("Interval do: " + new SimpleDateFormat("dd.MM.yyyy").format($P{DATUMDO}))]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<summary>
<band height="130" splitType="Stretch">
<componentElement>
<reportElement x="72" y="10" width="410" height="110" uuid="e6aab28c-44cb-4d36-b878-817a801e858f">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Kontroly INS"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="tabulka kontroly" uuid="e739bca1-2ad0-40ec-bf10-30b4eae964da">
<datasetParameter name="DATUMOD">
<datasetParameterExpression><![CDATA[$P{DATUMOD}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="DATUMDO">
<datasetParameterExpression><![CDATA[$P{DATUMDO}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="INSPEKTOR">
<datasetParameterExpression><![CDATA[$P{INSPEKTOR}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="120" uuid="33ca19d1-1463-4f52-b7c4-f3140e2b4e30">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:columnHeader style="Table_CH" height="50">
<staticText>
<reportElement x="0" y="0" width="120" height="50" uuid="5491198a-83e7-4b1a-99e8-c9945674edf9"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Inspektor]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement x="0" y="0" width="120" height="30" uuid="9d24a1ec-7190-4df1-89ba-d497bde54aa1"/>
<textElement verticalAlignment="Middle">
<paragraph leftIndent="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{inspektor}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="72" uuid="d39922fa-10da-406e-a8b0-8713a4419ed5">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:columnHeader style="Table_CH" height="50">
<staticText>
<reportElement x="0" y="0" width="72" height="50" uuid="9f44cf97-6d47-4b70-9c5b-bab9095b8315"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Počet kontrol]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement x="0" y="0" width="72" height="30" uuid="d0c5cf13-fec3-4775-911a-f7d9fc557ff5"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{pocet_kontrol}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="73" uuid="5439eed6-4832-43a8-9292-1298cd225150">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
<jr:columnHeader style="Table_CH" height="50">
<staticText>
<reportElement x="0" y="0" width="73" height="50" uuid="2bfae24e-9706-4290-b8e2-18a565dec434"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Plánované kontroly]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement x="0" y="0" width="73" height="30" uuid="dcee8b66-5f36-496f-bdd3-1560b588f3e7"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{pocet_planovanych}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="72" uuid="7ee7b3ee-f463-46b6-98cd-e0b6d275eddf">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
<jr:columnHeader style="Table_CH" height="50">
<staticText>
<reportElement x="0" y="0" width="72" height="50" uuid="9c6c5a2a-a037-4708-971f-08ae48534184"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Kontrola celkem - dny]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement x="0" y="0" width="72" height="30" uuid="64ae173a-ebcc-47fe-9925-8af7debed639"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{pocet_dnu}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="73" uuid="3b282045-5521-4987-9dee-50eb60c55c60">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/>
<jr:columnHeader style="Table_CH" height="50">
<staticText>
<reportElement x="0" y="0" width="73" height="50" uuid="7f9ed83b-ab01-4364-9293-8184160deab8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Kontrola celkem - hodiny]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement x="0" y="0" width="73" height="30" uuid="403d021a-084f-4f40-8c89-cc350a2d25f3"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{pocet_hodin}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</summary>
</jasperReport>
````

### 5. `codelistRef` input parameter definition - example

```xml title="inputParameter definition - example"
<ber:inputParameter id="City" name="City">
<ber:description>Codelist ref</ber:description>
<ber:dataType>
<ber:codeListRefExt>
<ber:codeList xlink:href="model.xml#cl_city"/>
<ber:displayColumn xlink:href="model.xml#ca_city_name"/>
</ber:codeListRefExt>
</ber:dataType>
</ber:inputParameter>

6. Report with two data sources (DB+JSON)

template - example
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_A4_1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="92452338-9bb1-4077-9ccb-89ab06b00719">
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="protokolOKontrole"/>
<style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#A9E8C5">
<box>
<pen lineWidth="1.25" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="Table 1_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 1_CH" mode="Opaque" backcolor="#A9E8C5">
<box>
<pen lineWidth="1.25" lineColor="#000000"/>
</box>
</style>
<style name="Table 1_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="1.25" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.0" lineColor="#000000"/>
</box>
</style>
<style name="Table 2_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 2_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.0" lineColor="#000000"/>
</box>
</style>
<style name="Table 2_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 4_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 4_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 4_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="kontrolujici" uuid="e5ce535d-456e-42a1-8b0b-3836cdd5c5c4">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="protokolOKontrole"/>
<queryString language="json">
<![CDATA[kontrolujici]]>
</queryString>
<field name="related[0].at_zamestnanecSbs_uplneJmeno" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="related[0].at_zamestnanecSbs_uplneJmeno"/>
</field>
<field name="related[0].at_zamestnanecSbs_jmeno" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="related[0].at_zamestnanecSbs_jmeno"/>
</field>
<field name="related[0].at_zamestnanecSbs_sluzebniZarazeni" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="related[0].at_zamestnanecSbs_sluzebniZarazeni"/>
</field>
<field name="related[0].at_zamestnanecSbs_cisloPrukazu" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="related[0].at_zamestnanecSbs_cisloPrukazu"/>
</field>
</subDataset>
<subDataset name="prizvana Osoba" uuid="920f605e-7cc4-4af4-9777-9f92136beea3">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="protokolOKontrole"/>
<queryString language="json">
<![CDATA[prizvana]]>
</queryString>
<field name="related[0].at_osoba_nazev" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="related[0].at_osoba_nazev"/>
<fieldDescription><![CDATA[related[0].at_osoba_nazev]]></fieldDescription>
</field>
<field name="at_osobaObjekt_ko_duvodPrizvani" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="at_osobaObjekt_ko_duvodPrizvani"/>
<fieldDescription><![CDATA[at_osobaObjekt_ko_duvodPrizvani]]></fieldDescription>
</field>
</subDataset>
<subDataset name="zmocneni ke kontrole" uuid="e5ce535d-456e-42a1-8b0b-3836cdd5c5c4">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="protokolOKontrole"/>
<queryString language="json">
<![CDATA[vyhlaska]]>
</queryString>
<field name="at_ustanoveniPravnihoPredpisu_textUstanoveni" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="at_ustanoveniPravnihoPredpisu_textUstanoveni"/>
</field>
</subDataset>
<subDataset name="Kontrola1" uuid="e3e37e37-0284-458b-88f4-15b80d86ed48">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Aissbs"/>
<parameter name="KONTROLA_SID" class="java.lang.String"/>
<queryString language="SQL">
<![CDATA[select zjistenystavveci, rf_kontrola, cl_typkontrolnihozjisteni FROM kontrolnizjisteni
where kontrolnizjisteni.rf_kontrola = $P{KONTROLA_SID}::numeric
AND cl_typkontrolnihozjisteni = '1']]>
</queryString>
<field name="zjistenystavveci" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="zjistenystavveci"/>
</field>
<field name="rf_kontrola" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="rf_kontrola"/>
</field>
<field name="cl_typkontrolnihozjisteni" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="cl_typkontrolnihozjisteni"/>
</field>
</subDataset>
<subDataset name="Kontrola2" uuid="9e919bba-e957-4d9a-b0b4-a57c22bca5e5">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Aissbs"/>
<parameter name="KONTROLA_SID" class="java.lang.String"/>
<queryString language="SQL">
<![CDATA[select zjistenystavveci, rf_kontrola, cl_typkontrolnihozjisteni FROM kontrolnizjisteni
where kontrolnizjisteni.rf_kontrola = $P{KONTROLA_SID}::numeric
AND cl_typkontrolnihozjisteni = '2']]>
</queryString>
<field name="zjistenystavveci" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="zjistenystavveci"/>
</field>
<field name="rf_kontrola" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="rf_kontrola"/>
</field>
<field name="cl_typkontrolnihozjisteni" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="cl_typkontrolnihozjisteni"/>
</field>
</subDataset>
<subDataset name="Kontrola3" uuid="9e919bba-e957-4d9a-b0b4-a57c22bca5e5">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Aissbs"/>
<parameter name="KONTROLA_SID" class="java.lang.String"/>
<queryString language="SQL">
<![CDATA[select zjistenystavveci, rf_kontrola, cl_typkontrolnihozjisteni FROM kontrolnizjisteni
where kontrolnizjisteni.rf_kontrola = $P{KONTROLA_SID}::numeric
AND cl_typkontrolnihozjisteni = '3']]>
</queryString>
<field name="zjistenystavveci" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="zjistenystavveci"/>
</field>
<field name="rf_kontrola" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="rf_kontrola"/>
</field>
<field name="cl_typkontrolnihozjisteni" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="cl_typkontrolnihozjisteni"/>
</field>
</subDataset>
<parameter name="JSON_INPUT_STREAM" class="java.io.InputStream" isForPrompting="false"/>
<parameter name="net.sf.jasperreports.json.source" class="java.lang.String" isForPrompting="false"/>
<parameter name="net.sf.jasperreports.json.sources" class="java.util.List" isForPrompting="false"/>
<parameter name="net.sf.jasperreports.json.date.pattern" class="java.lang.String" isForPrompting="false"/>
<parameter name="net.sf.jasperreports.json.number.pattern" class="java.lang.String" isForPrompting="false"/>
<parameter name="JSON_LOCALE" class="java.util.Locale" isForPrompting="false"/>
<parameter name="net.sf.jasperreports.json.locale.code" class="java.lang.String" isForPrompting="false"/>
<parameter name="JSON_TIME_ZONE" class="java.util.TimeZone" isForPrompting="false"/>
<parameter name="net.sf.jasperreports.json.timezone.id" class="java.lang.String" isForPrompting="false"/>
<parameter name="KONTROLA_SID" class="java.lang.String"/>
<queryString language="JSON">
<![CDATA[]]>
</queryString>
<field name="prokolOKontrole.at_dokument_cisloJednaci" class="java.lang.String"/>
<field name="vyhlaska[0].at_ustanoveniPravnihoPredpisu_textUstanoveni" class="java.lang.String"/>
<field name="vyhlaska[1].at_ustanoveniPravnihoPredpisu_textUstanoveni" class="java.lang.String"/>
<field name="kontrola.at_kontrola_cl_uradSbs.ca_uradSbs_popis" class="java.lang.String"/>
<field name="kontrolovana[0].at_osoba_uplneJmeno" class="java.lang.String"/>
<field name="kontrolovana[0].related[0].at_adresa_uplnaAdresa" class="java.lang.String"/>
<field name="zmocnenec[0].related[0].at_fyzickaOsoba_prijmeni" class="java.lang.String"/>
<field name="zmocnenec[0].related[0].at_fyzickaOsoba_jmeno" class="java.lang.String"/>
<field name="zmocnenec[0].at_zmocnenecKontrolovaneOsoby_pracovniZarazeni" class="java.lang.String"/>
<field name="zmocnenec[0].related[0].at_osoba_nazev" class="java.lang.String"/>
<field name="datumZahajeni" class="java.lang.String"/>
<field name="kontrola.at_kontrola_casZacatkuKontroly" class="java.lang.String"/>
<field name="kontrola.at_kontrola_predmetKontroly" class="java.lang.String"/>
<field name="datumUkonceni" class="java.lang.String"/>
<field name="kontrola.at_kontrola_an_pokuta.ca_anoNe_popis" class="java.lang.String"/>
<field name="kontrola.at_kontrola_castka" class="java.lang.String"/>
<field name="kontrola.at_kontrola_an_pokuta.ca_anoNe_id" class="java.lang.Integer"/>
<field name="kontrola.at_kontrola_posledniKontrolniUkonPopis" class="java.lang.String"/>
<field name="kontrola.at_kontrola_casUkonceniKontroly" class="java.lang.String"/>
<field name="kontrola1" class="java.lang.String"/>
<field name="kontrola2" class="java.lang.String"/>
<field name="kontrola3" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="93">
<staticText>
<reportElement x="0" y="16" width="100" height="14" uuid="907947f9-2dfe-4cd1-b49e-e2f305fc181f"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Výtisk č.:]]></text>
</staticText>
<textField>
<reportElement x="0" y="0" width="370" height="15" uuid="7933601f-08b2-447a-b59c-625b113fab08"/>
<textElement>
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Č.j.: " + T($F{prokolOKontrole.at_dokument_cisloJednaci})]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="0" y="32" width="370" height="15" uuid="6a562d22-8a9e-4dea-853a-894f55ca1093"/>
<textElement>
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Počet stran protokolu: " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="50" width="555" height="40" uuid="482ee933-47fb-418b-bfc6-ee2bc49665eb"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="18" isBold="true"/>
</textElement>
<text><![CDATA[PROTOKOL O KONTROLE]]></text>
</staticText>
</band>
</title>
<detail>
<band height="98" splitType="Stretch">
<componentElement>
<reportElement style="Table_TD" stretchType="RelativeToBandHeight" x="180" y="20" width="364" height="70" uuid="d1328526-3145-4637-8d17-849c2a910b35">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="kontrolujici"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="kontrolujici" uuid="103afdda-5e5f-4cda-8bb2-98abef8d52b4">
<datasetParameter name="REPORT_CONNECTION">
<datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource) $P{REPORT_DATA_SOURCE}).subDataSource("kontrolujici")]]></dataSourceExpression>
</datasetRun>
<jr:column width="150" uuid="37abf1c4-ccd0-473e-9fe3-0903de800ebe">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:columnHeader style="Table_CH" height="50" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="150" height="50" uuid="15900aad-2dda-439e-a054-e1743a017d83"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<text><![CDATA[Úplné jméno]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="20">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="150" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="f89496b6-9720-4662-90da-6d20d55992f2"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{related[0].at_zamestnanecSbs_uplneJmeno}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="121" uuid="96d46937-9c40-46a5-a181-63797af37ec8">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:columnHeader style="Table_CH" height="50" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="121" height="50" uuid="4f9bb6aa-4770-4b8a-a290-30084c70e7ad"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<text><![CDATA[Služební zařazení]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="20">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="121" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="c4ad3199-c123-4be2-b2ff-d7952a8c8090"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{related[0].at_zamestnanecSbs_sluzebniZarazeni}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="93" uuid="128f918b-7faf-40be-81fe-9ac686238551">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
<jr:columnHeader style="Table_CH" height="50" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="93" height="50" uuid="52a3e88c-a0fb-4624-9900-353a76843fde"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<text><![CDATA[Číslo průkazu zaměstnance]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="20">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="93" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="e9980464-e552-4bf3-ab8d-fb7df6fe8e49"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{related[0].at_zamestnanecSbs_cisloPrukazu}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<staticText>
<reportElement x="0" y="0" width="100" height="14" uuid="13b81b36-2072-4248-8bd2-57af465722a1"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Kontrolní orgán:]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="180" y="1" width="344" height="13" uuid="51dea967-32b9-4f36-a1a1-3d6de9286569"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
<textFieldExpression><![CDATA[T($F{kontrola.at_kontrola_cl_uradSbs.ca_uradSbs_popis})]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="20" width="100" height="14" uuid="9d3b0014-e209-4fbe-8740-e796ba45b915"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Kontrolující:]]></text>
</staticText>
</band>
<band height="29">
<staticText>
<reportElement positionType="Float" x="0" y="3" width="120" height="14" uuid="c4f62bfe-0ca6-41a5-8ac4-f46697e1d581"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Kontrolní pravomoc:]]></text>
</staticText>
<componentElement>
<reportElement positionType="Float" x="180" y="3" width="364" height="20" uuid="9cd68cd5-0953-4d29-a467-c754fe2bf87d">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table 3_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table 3_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table 3_TD"/>
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="zmocneni ke kontrole"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="zmocneni ke kontrole" uuid="c33cf298-540c-46b3-a25c-13d4b4a3670e">
<datasetParameter name="REPORT_CONNECTION">
<datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource) $P{REPORT_DATA_SOURCE}).subDataSource("vyhlaska")]]></dataSourceExpression>
</datasetRun>
<jr:column width="364" uuid="f66ba11c-f36c-4593-9d05-ef61c3dca01b">
<jr:detailCell style="Table 3_TD" height="20">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="364" height="20" isPrintWhenDetailOverflows="true" uuid="a38a81fe-0e93-40f3-9057-0fdd1080bba4"/>
<textElement verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="0"/>
</textElement>
<textFieldExpression><![CDATA[$F{at_ustanoveniPravnihoPredpisu_textUstanoveni}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
<band height="84">
<componentElement>
<reportElement style="Table_TD" positionType="Float" x="180" y="6" width="364" height="70" uuid="5df080f2-32cd-44c1-84e3-3d3b90027081">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table 1_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table 1_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table 1_TD"/>
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="prizvana osoba"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="prizvana Osoba" uuid="3ca1e7dc-2bb6-4972-ae1b-dd190388de54">
<datasetParameter name="REPORT_CONNECTION">
<datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource) $P{REPORT_DATA_SOURCE}).subDataSource("prizvana")]]></dataSourceExpression>
</datasetRun>
<jr:column width="140" uuid="05c10724-8e2a-4c3a-9b75-0b1887d57a5b">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:columnHeader style="Table 1_CH" height="50" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="140" height="50" uuid="08289b03-4b92-4f49-bbe7-d8cb725e354e"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<text><![CDATA[Příjmní a jméno/
Název právnické osoby]]>
</text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table 1_TD" height="20">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="140" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="b5a2661c-b851-44f6-87a9-65f1ca8c6756"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{related[0].at_osoba_nazev}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="224" uuid="04ad4a03-a0c8-473f-937a-0bf9bd8cd429">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:columnHeader style="Table 1_CH" height="50" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="224" height="50" uuid="32d05a2c-5325-4dbc-901b-9f6b15a66b2e"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<text><![CDATA[Důvod přizvání]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table 1_TD" height="20">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="224" height="20" uuid="32460e2a-3a0c-4c64-98d1-93672d8377ca"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{at_osobaObjekt_ko_duvodPrizvani}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<staticText>
<reportElement x="0" y="6" width="100" height="14" uuid="fbd1ae16-5bed-4a4e-a200-4668021a501b"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Přizvaná osoba: ]]></text>
</staticText>
</band>
<band height="261">
<staticText>
<reportElement positionType="Float" x="0" y="0" width="130" height="14" uuid="4ce19aa7-aa89-4a08-883c-507e94026c27"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Kontrolovaná osoba: ]]></text>
</staticText>
<textField>
<reportElement x="180" y="0" width="374" height="33" uuid="bb0954d7-fb64-45f4-97af-894bc1167441"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{kontrolovana[0].at_osoba_uplneJmeno} != null ? T($F{kontrolovana[0].at_osoba_uplneJmeno}) + ", adresa: " + T($F{kontrolovana[0].related[0].at_adresa_uplnaAdresa}) : ""]]></textFieldExpression>
</textField>
<staticText>
<reportElement positionType="Float" x="0" y="42" width="180" height="14" uuid="c0e8ed76-18e2-4e4f-ab4a-51bd68e097bc"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Účast za kontrolovanou osobu:]]></text>
</staticText>
<textField>
<reportElement x="180" y="42" width="374" height="33" uuid="d79993f3-2d1a-4c64-943f-bce13bc5855b"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{zmocnenec[0].related[0].at_fyzickaOsoba_prijmeni} != null ? T($F{zmocnenec[0].related[0].at_fyzickaOsoba_prijmeni}) + " " + T($F{zmocnenec[0].related[0].at_fyzickaOsoba_jmeno}) + ", pracovní zařazení: " + T($F{zmocnenec[0].at_zmocnenecKontrolovaneOsoby_pracovniZarazeni}) : ""]]></textFieldExpression>
</textField>
<staticText>
<reportElement positionType="Float" x="0" y="82" width="150" height="14" uuid="467a82b5-21f1-44d8-8935-7a4aa9c3f5aa"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Datum (popř. čas kontroly):]]></text>
</staticText>
<textField>
<reportElement x="180" y="82" width="374" height="14" uuid="d336cd86-3294-4c9e-b887-cf52dad0eb9c"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA[T($F{datumZahajeni}) + ($F{kontrola.at_kontrola_casZacatkuKontroly} != null ? ", " + T($F{kontrola.at_kontrola_casZacatkuKontroly}) : "")]]></textFieldExpression>
</textField>
<staticText>
<reportElement positionType="Float" x="0" y="98" width="150" height="14" uuid="885dddc5-4985-4b52-9474-930c544be07b"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Předmět kontroly:]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="180" y="98" width="374" height="14" uuid="8b73bcf6-e84f-425f-9c17-269e63bf1e62"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA[T($F{kontrola.at_kontrola_predmetKontroly})]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="120" width="555" height="40" uuid="ac0bf19e-8ccc-4a34-b573-b50aa7b89e0f"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="13" isBold="true"/>
</textElement>
<text><![CDATA[I.
Zahájení kontroly]]>
</text>
</staticText>
<staticText>
<reportElement positionType="Float" x="0" y="160" width="150" height="14" uuid="3a776411-7d97-41bc-9eb2-f2b41e237993"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[1. Zahájení kontroly]]></text>
</staticText>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="11" y="180" width="544" height="14" isPrintWhenDetailOverflows="true" uuid="0f9f148c-12da-47ef-9c7d-e08249d8694a"/>
<textElement markup="styled">
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA["Kontrola byla zahájena doručením oznámení o zahájení kontroly č.j. " + T($F{prokolOKontrole.at_dokument_cisloJednaci}) + " dne " + T($F{datumZahajeni}) + " organizaci " + T($F{kontrolovana[0].at_osoba_uplneJmeno}) + "."]]></textFieldExpression>
</textField>
<textField>
<reportElement positionType="Float" x="11" y="198" width="544" height="14" uuid="caffde2d-3c2c-416b-bdca-faecef8d5cc1"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA["Kontrola byla zahájena předložením pověření ke kontrole č.j. " + T($F{prokolOKontrole.at_dokument_cisloJednaci}) + " dne " + T($F{datumZahajeni}) + "."]]></textFieldExpression>
</textField>
<staticText>
<reportElement positionType="Float" x="0" y="220" width="150" height="14" uuid="16b8b8ae-8338-48f2-9c24-175c9374ea8b"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[2. Vyžádané podklady ]]></text>
</staticText>
</band>
<band height="119">
<staticText>
<reportElement x="0" y="0" width="555" height="40" uuid="a6ea813a-4417-40bb-b60d-115ae63f395b"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="13" isBold="true"/>
</textElement>
<text><![CDATA[II.
Průběh kontroly]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" x="0" y="42" width="555" height="14" uuid="133dca5c-7f01-4dee-820f-94e1f2adf4d6"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[1. Kontrola opatření uložených při předcházející kontrole]]></text>
</staticText>
<textField>
<reportElement positionType="Float" x="11" y="60" width="544" height="14" uuid="cb4ec36c-b640-40b5-93bf-f7bdc73c95c3"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA[("ano".equals($F{kontrola1}) ? T($F{prokolOKontrole.at_dokument_cisloJednaci}) + ", " + T($F{datumZahajeni}) + ", " + T($F{datumUkonceni}) + ", " + T($F{kontrola.at_kontrola_predmetKontroly}) + ", pokuta: " + T($F{kontrola.at_kontrola_an_pokuta.ca_anoNe_popis}) + ("Ano".equals($F{kontrola.at_kontrola_an_pokuta.ca_anoNe_popis}) ? ", částka:" + T($F{kontrola.at_kontrola_castka}) : "") : "")]]></textFieldExpression>
</textField>
<componentElement>
<reportElement x="11" y="94" width="543" height="15" uuid="1d6f1896-15a5-48b3-a788-01208979cf47">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table 2_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table 2_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table 2_TD"/>
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Kontrola1"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="Kontrola1" uuid="5aa09c74-1a04-4e82-9bf7-30b04e20c012">
<datasetParameter name="KONTROLA_SID">
<datasetParameterExpression><![CDATA[$P{KONTROLA_SID}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="543" uuid="7f7bb194-b68a-48f5-8b35-cd07f2f5867a">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:detailCell style="Table 2_TD" height="15">
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="543" height="15" isPrintWhenDetailOverflows="true" uuid="684dc7dd-84cf-4ffd-a073-68f11ea62568"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{zjistenystavveci}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<textField>
<reportElement x="11" y="80" width="334" height="14" uuid="5f13ea27-28e3-47ba-8fbd-7b26021f60a9"/>
<textElement>
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[("ano".equals($F{kontrola1}) ? "Kontrolní zjištění: " : "")]]></textFieldExpression>
</textField>
</band>
<band height="82">
<staticText>
<reportElement positionType="Float" x="0" y="0" width="360" height="14" uuid="515b9c35-6b31-41d6-abf4-b0d43dae77ca"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[2. Kontrola dokumentace]]></text>
</staticText>
<textField>
<reportElement positionType="Float" x="11" y="18" width="544" height="14" uuid="f828ad00-1318-4c06-887f-fa9557706e22"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA[("ano".equals($F{kontrola2}) ? T($F{prokolOKontrole.at_dokument_cisloJednaci}) + ", " + T($F{datumZahajeni}) + ", " + T($F{datumUkonceni}) + ", " + T($F{kontrola.at_kontrola_predmetKontroly}) + ", pokuta: " + T($F{kontrola.at_kontrola_an_pokuta.ca_anoNe_popis}) + ("Ano".equals($F{kontrola.at_kontrola_an_pokuta.ca_anoNe_popis}) ? ", částka:" + T($F{kontrola.at_kontrola_castka}) : "") : "")]]></textFieldExpression>
</textField>
<componentElement>
<reportElement x="11" y="52" width="543" height="15" uuid="7e50919b-6364-420b-8e1a-b8263c3260e4">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table 2_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table 2_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table 2_TD"/>
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Kontrola2"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="Kontrola2" uuid="ec84b1d1-b0ae-45fc-8fb5-5d5582b30f0b">
<datasetParameter name="KONTROLA_SID">
<datasetParameterExpression><![CDATA[$P{KONTROLA_SID}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="543" uuid="038b937c-9451-416c-b8a8-51265c748fed">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:detailCell style="Table 2_TD" height="15">
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="543" height="15" isPrintWhenDetailOverflows="true" uuid="79793661-50e3-43c9-9537-03a24ae6d7cf"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{zjistenystavveci}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<textField>
<reportElement x="11" y="38" width="334" height="14" uuid="5f13ea27-28e3-47ba-8fbd-7b26021f60a9"/>
<textElement>
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[("ano".equals($F{kontrola2}) ? "Kontrolní zjištění: " : "")]]></textFieldExpression>
</textField>
</band>
<band height="72">
<staticText>
<reportElement positionType="Float" x="0" y="0" width="360" height="14" uuid="1d52c0c2-d8f1-427e-a851-6aec6242ecb0"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[3. Kontrola pracovišť]]></text>
</staticText>
<textField>
<reportElement positionType="Float" x="11" y="18" width="544" height="14" uuid="9959e9ec-277c-4fdf-a588-dbc441ca22d6"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA[("ano".equals($F{kontrola3}) ? T($F{prokolOKontrole.at_dokument_cisloJednaci}) + ", " + T($F{datumZahajeni}) + ", " + T($F{datumUkonceni}) + ", " + T($F{kontrola.at_kontrola_predmetKontroly}) + ", pokuta: " + T($F{kontrola.at_kontrola_an_pokuta.ca_anoNe_popis}) + ("Ano".equals($F{kontrola.at_kontrola_an_pokuta.ca_anoNe_popis}) ? ", částka:" + T($F{kontrola.at_kontrola_castka}) : "") : "")]]></textFieldExpression>
</textField>
<componentElement>
<reportElement x="11" y="52" width="543" height="15" uuid="7e50919b-6364-420b-8e1a-b8263c3260e4">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table 2_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table 2_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table 2_TD"/>
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Kontrola3"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="Kontrola3" uuid="ec84b1d1-b0ae-45fc-8fb5-5d5582b30f0b">
<datasetParameter name="KONTROLA_SID">
<datasetParameterExpression><![CDATA[$P{KONTROLA_SID}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="543" uuid="038b937c-9451-416c-b8a8-51265c748fed">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:detailCell style="Table 2_TD" height="15">
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="543" height="15" isPrintWhenDetailOverflows="true" uuid="79793661-50e3-43c9-9537-03a24ae6d7cf"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{zjistenystavveci}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<textField>
<reportElement x="11" y="38" width="334" height="14" uuid="5f13ea27-28e3-47ba-8fbd-7b26021f60a9"/>
<textElement>
<font fontName="Times New Roman" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[("ano".equals($F{kontrola3}) ? "Kontrolní zjištění: " : "")]]></textFieldExpression>
</textField>
</band>
<band height="150">
<staticText>
<reportElement positionType="Float" x="0" y="10" width="360" height="14" uuid="53e228d9-b461-44b3-9ac7-824e861cd1e6"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[4. Sankce uložené v průběhu kontroly]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" x="0" y="36" width="360" height="14" uuid="e0541350-e564-4f04-8ce0-5a24c388b87c"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[5. Opatření nebo doporučení k nápravě nedostatků zjištěných při kontrole]]></text>
</staticText>
<staticText>
<reportElement x="11" y="57" width="544" height="30" uuid="957f3ef7-4dfb-4b25-bede-66988982226a"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
<text><![CDATA[Kontrolovaná osoba je povinna ve lhůtě do …… podat kontrolnímu orgánu písemnou zprávu o odstranění nebo prevenci nedostatků zjištěných kontrolou.
]]></text>
</staticText>
<staticText>
<reportElement positionType="Float" x="0" y="90" width="360" height="14" uuid="b77fc8ee-aa20-4c08-b064-b4e51bf0dc8c"/>
<textElement textAlignment="Left">
<font fontName="Times New Roman" size="12" isBold="true"/>
</textElement>
<text><![CDATA[6. Poslední kontrolní úkon:
]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="11" y="110" width="469" height="14" uuid="2aaf921f-5e45-4bcf-89a5-00baac2d306b"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
<textFieldExpression><![CDATA[$F{kontrola.at_kontrola_posledniKontrolniUkonPopis}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="11" y="130" width="544" height="14" isPrintWhenDetailOverflows="true" uuid="62104734-910b-432e-9bf6-cbec77669964"/>
<textElement>
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA["Následně byla kontrola na místě ukončena dne " + T($F{datumUkonceni}) + " v " + ($F{kontrola.at_kontrola_casUkonceniKontroly} != null ? T($F{kontrola.at_kontrola_casUkonceniKontroly}) : " ") +"hod. podáním předběžné informace o kontrolních zjištěních (poslední kontrolní úkon)."]]></textFieldExpression>
</textField>
</band>
<band height="56">
<staticText>
<reportElement x="0" y="0" width="555" height="40" uuid="b0df9ac0-4adb-44c3-b3e6-9730fd07a599"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Times New Roman" size="13" isBold="true"/>
</textElement>
<text><![CDATA[III.
Poučení]]></text>
</staticText>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="40" width="554" height="14" isPrintWhenDetailOverflows="true" uuid="87caf3f8-d160-4fdc-a6a7-8681cbc17e17"/>
<textElement textAlignment="Justified">
<font fontName="Times New Roman" size="10"/>
</textElement>
<textFieldExpression><![CDATA["Proti kontrolnímu zjištění uvedenému v tomto protokolu o kontrole může kontrolovaná osoba, podle ustanovení § 13 odst. 1 zákona č. 255/2012 Sb., o kontrole (kontrolní řád), ve lhůtě 15 dnů ode dne doručení tohoto protokolu podat kontrolnímu orgánu " + T($F{kontrola.at_kontrola_cl_uradSbs.ca_uradSbs_popis}) +" námitky. Případné námitky se podle § 13 odst. 2 kontrolního řádu podávají písemně; musí z nich být zřejmé, proti jakému kontrolnímu zjištění směřují a musí obsahovat odůvodnění nesouhlasu s namítaným kontrolním zjištěním."]]></textFieldExpression>
</textField>
</band>
<band height="89">
<textField>
<reportElement positionType="Float" x="0" y="8" width="400" height="20" uuid="cc4f296b-7349-43bf-966d-2c03fcbcc2e9"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
<textFieldExpression><![CDATA["Protokol byl sepsán dne: " + new SimpleDateFormat("dd.MM.yyyy").format(new Date())]]></textFieldExpression>
</textField>
<staticText>
<reportElement positionType="Float" x="0" y="39" width="190" height="13" uuid="e8ef98d6-d6e9-490e-a8d1-20ed257b4004"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
<text><![CDATA[jména a podpisy kontrolujících:]]></text>
</staticText>
<componentElement>
<reportElement positionType="Float" x="0" y="62" width="200" height="20" uuid="9cd68cd5-0953-4d29-a467-c754fe2bf87d">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table 3_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table 3_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table 3_TD"/>
<property name="net.sf.jasperreports.export.headertoolbar.table.name" value="podpisy"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="kontrolujici" uuid="c33cf298-540c-46b3-a25c-13d4b4a3670e">
<datasetParameter name="REPORT_CONNECTION">
<datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource) $P{REPORT_DATA_SOURCE}).subDataSource("kontrolujici")]]></dataSourceExpression>
</datasetRun>
<jr:column width="200" uuid="f66ba11c-f36c-4593-9d05-ef61c3dca01b">
<jr:detailCell style="Table 3_TD" height="20">
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="200" height="20" isPrintWhenDetailOverflows="true" uuid="a38a81fe-0e93-40f3-9057-0fdd1080bba4"/>
<textElement>
<font fontName="Times New Roman"/>
<paragraph leftIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{related[0].at_zamestnanecSbs_uplneJmeno}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
</jasperReport>

7. Report with a static map

You can print a static map in report. But picture content must be in Base64 encoding. After that, Jasper library is able to decode it back and print proper picture. Look in the business action example, attachmentContent variable. Every picture picked at client application is "saved" to this variable and then coded to Base64.

business action for static map preparing - example
function action(context) {

var request = context.entity;

var attachmentContent = null;
attachmentsWithSituationMap.forEach(function(attachment) {
if (attachment.attachmentType.id == "att_reqRecapitulationMapNC") {
attachmentContent = api.features().attachments().prepareGetFeatureAttachmentContent(context)
.attachmentId(attachment.id)
.get();
}
});

api.features().attachments().prepareAddTemplatedAttachment(context)
.entityRef(request)
.templateGroup("requests")
.template("requestNCrecapitulation")
.model({
request: request,
mapImage: attachmentContent != null ? attachmentContent.getBase64EncodedContent() : null
})
.fileName("Recapitulation.pdf")
.outputType("pdf")
.attachmentType("att_reqRecapitulationNC")
.attach();
}

There is a defined field for mapImage object in the template. It is of String data type.

mapImage field definition - example
<field name="mapImage" class="java.lang.String"/>

And finally, the object prepared in the business action is decoded back to the proper picture.

picture in Base64 decoding - example
<image onErrorType="Icon">
<reportElement mode="Transparent" x="20" y="23" width="510" height="276" uuid="081bc376-8406-4413-81f1-ba0b5c01578a"/>
<imageExpression><![CDATA[new java.io.ByteArrayInputStream(org.apache.commons.codec.binary.Base64.decodeBase64($F{mapImage}.getBytes()))]]></imageExpression>
</image>

8. Configuration of image element in template

You can put some pictures to the template using their project location path.

image element configuration - example
<image>
<reportElement x="275" y="0" width="300" height="64" uuid="ca9a08f3-d5d0-41b5-880d-589c49b56bf3"/>
<imageExpression><![CDATA["{@packageRoot(samo-defects)}/templates/documents/defects/testJasperTemplateImage.png"]]></imageExpression>
</image>

9. Configuration of subDataset element in template

You can define more subDatasets. You can "divide" your main JSON Data Source to the miner objects by defining new subDatasets element.

subDataset element configuration - example
<subDataset name="controll person" uuid="e5ce535d-456e-42a1-8b0b-3836cdd5c5c4">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="protocol"/>
<queryString language="json">
<![CDATA[controller]]>
</queryString>
<field name="related[0].at_employee_name" class="java.lang.String">
</field>
</subDataset>

Then you need to define table element in your template and use dataset created in the previous step. datasetParameter and dataSourceExpression are very important elements.

table element configuration - example
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="controll person" uuid="103afdda-5e5f-4cda-8bb2-98abef8d52b4">
<datasetParameter name="REPORT_CONNECTION">
<datasetParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource) $P{REPORT_DATA_SOURCE}).subDataSource("controller")]]></dataSourceExpression>
</datasetRun>
</jr:table>
tip

There might be a problem with table element rendering in "docx" files. Some of the table borders might not be rendered properly (usually right or left vertical border). To avoid this, just add special parameter to your jrxml file:

jrxml property table element proper rendering
<property name="net.sf.jasperreports.export.docx.frames.as.nested.tables" value="false"/>

10. Passing parameters to the subDataset

You can use parameteres in subdataset which are defined in main dataset. But you must "pass" them to the subdataset.

datasetParameter configuration - example
<datasetParameter name="VALID_FROM">
<datasetParameterExpression><![CDATA[$P{VALID_FROM}]]></datasetParameterExpression>
</datasetParameter>