Загрузка данных


<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.12.2.final using JasperReports Library version 6.12.2-75c5e90a222ab406e416cbf590a5397028a52de3  -->
<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="pu_bu" pageWidth="1000" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="960" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="aab4d06b-4c0a-4c47-be0a-8ae82a99a6f6">
	<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="NEW.xml"/>
	<property name="net.sf.jasperreports.default.locale" value="ru_RU"/>
	<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="#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>
	<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>
	<style name="RowStyle">
		<conditionalStyle>
			<conditionExpression><![CDATA[$F{pid} == 0 && ($F{cid} == 1 || $F{cid} == 2 || $F{cid} == 3 || $F{cid} == 4 || $F{cid} == 5 || $F{cid} == 7 || $F{cid} == 12)]]></conditionExpression>
			<style backcolor="#E0E0E0"/>
		</conditionalStyle>
	</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="#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 1_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>
	<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_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 2_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="Dataset1" uuid="de3b076e-5efd-417b-bbd5-910538cdb715">
		<property name="com.jaspersoft.studio.data.defaultdataadapter" value="NEW.xml"/>
		<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
		<parameter name="id" class="java.lang.Integer">
			<defaultValueExpression><![CDATA[30]]></defaultValueExpression>
		</parameter>
		<queryString>
			<![CDATA[with cte as (
    select
        2 as cid,
        0 as pid,
        'текущие обязательства' as name,
        '' as strateg,

        sum(case
            when account = '38302'
             and contract_class_code = 'INS'
             and contract_model_label = 'VFA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end) as sVFA_рu,

        sum(case
            when account = '38902'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end) as ВВА_рu,

        sum(case
            when account in ('39002', '39022', '39023', '39024')
             and coalesce(contract_class_code, 'INV') = 'INV'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end) as iVFA_рu,

        sum(case
            when account = '38302'
             and coalesce(contract_class_code, 'INS') = 'INS'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end) as sVFA_bu,

        sum(case
            when account = '38902'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end) as ВВА_bu,

        sum(case
            when account in ('39002', '39022', '39023', '39024')
             and coalesce(contract_class_code, 'INV') = 'INV'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end) as iVFA_bu

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        3, 0, 'обязательства к выплате', '',

        sum(case
            when account = '38311.1'
             and contract_class_code = 'INS'
             and contract_model_label = 'VFA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '38911.1'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account in ('39011.1', '39032.1', '39033.1', '39037.1')
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '38311.1'
             and coalesce(contract_class_code, 'INS') = 'INS'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '38911.1'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account in ('39011.1', '39032.1', '39033.1', '39037.1')
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        4, 0, 'обязательства, не исполненные в срок', '',

        sum(case
            when account = '38311.2'
             and contract_class_code = 'INS'
             and contract_model_label = 'VFA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '38911.2'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account in ('39011.2', '39032.2', '39033.2', '39037.2')
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '38311.2'
             and coalesce(contract_class_code, 'INS') = 'INS'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '38911.2'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account in ('39011.2', '39032.2', '39033.2', '39037.2')
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        5, 0, 'Страховой резерв', '',
        null,

        sum(case
            when account = '39703'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '39703'
             and coalesce(contract_class_code, 'INV') = 'INV'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '39703'
             and coalesce(contract_class_code, 'INS') = 'INS'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '39703'
             and coalesce(contract_class_code, 'INV') = 'INV'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        8, 0, 'Незавершенные (неопознанные) платежи', '',
        null,

        sum(case
            when account = '48309'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '48309'
             and coalesce(contract_class_code, 'INV') = 'INV'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '48309'
             and coalesce(contract_class_code, 'INS') = 'INS'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '48309'
             and coalesce(contract_class_code, 'INV') = 'INV'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        9, 0, 'Расчеты по пенсионным взносам (переплаты)', '',
        null,

        sum(case
            when account = '48306.1'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '48306.3'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '48306.1'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '48306.3'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        10, 0, 'Расчеты по пенсионным взносам с ФЛ', '',
        null,

        sum(case
            when account = '48301.1'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '48301.3'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '48301.1'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '48301.3'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        11, 0, 'Расчеты по пенсионным взносам с ЮЛ', '',
        null,

        sum(case
            when account = '48303.1'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '48303.3'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '48303.1'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '48303.3'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        13, 0, 'Незавершенные (неопознанные) платежи', '',
        null,

        sum(case
            when account = '48310'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '48310'
             and coalesce(contract_class_code, 'INV') = 'INV'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '48310'
             and coalesce(contract_class_code, 'INS') = 'INS'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '48310'
             and coalesce(contract_class_code, 'INV') = 'INV'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        14, 0, 'Расчеты по выплатам по договорам', '',
        null,

        sum(case
            when account = '48305.1'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '48305.3'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '48305.1'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '48305.3'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        15, 0, 'Расчеты по пенсионным взносам с ФЛ', '',
        null,

        sum(case
            when account = '48302.1'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '48302.3'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '48302.1'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '48302.3'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}

    union all

    select
        16, 0, 'Расчеты по пенсионным взносам с ЮЛ', '',
        null,

        sum(case
            when account = '48304.1'
             and contract_class_code = 'INS'
             and contract_model_label = 'BBA'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        sum(case
            when account = '48304.3'
            then abs(coalesce(sum_dt_pu, 0) - coalesce(sum_ct_pu, 0))
        end),

        null,

        sum(case
            when account = '48304.1'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end),

        sum(case
            when account = '48304.3'
            then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
        end)

    from back_office.report_conformity_pu_bu_detail
    where report_conformity_pu_bu_id = $P{id}
),
cte_gr as (
    select
        1 as cid, 0 as pid,
        'РППО, итого' as name, '' as strateg,
        sum(svfa_рu) as svfa_рu,
        sum(ВВА_рu) as ВВА_рu,
        sum(ivfa_рu) as ivfa_рu,
        sum(svfa_bu) as svfa_bu,
        sum(ВВА_bu) as ВВА_bu,
        sum(ivfa_bu) as ivfa_bu
    from cte
    where cid in (2, 3, 4)

    union all

    select
        7, 0, 'Дебиторская задолженность, итого', '',
        sum(svfa_рu),
        sum(ВВА_рu),
        sum(ivfa_рu),
        sum(svfa_bu),
        sum(ВВА_bu),
        sum(ivfa_bu)
    from cte
    where cid in (8, 9, 10, 11)

    union all

    select
        12, 0, 'Кредиторская задолженность, итого', '',
        sum(svfa_рu),
        sum(ВВА_рu),
        sum(ivfa_рu),
        sum(svfa_bu),
        sum(ВВА_bu),
        sum(ivfa_bu)
    from cte
    where cid in (13, 14, 15, 16)
),
cte_gr_gr as (
    select
        0 as cid, 0 as pid,
        'ПЕНСИОННЫЕ ОБЯЗАТЕЛЬСТВА по НПО, итого' as name,
        '' as strateg,
        sum(svfa_рu) as svfa_рu,
        sum(ВВА_рu) as ВВА_рu,
        sum(ivfa_рu) as ivfa_рu,
        sum(svfa_bu) as svfa_bu,
        sum(ВВА_bu) as ВВА_bu,
        sum(ivfa_bu) as ivfa_bu
    from cte
    where cid in (1, 5)

    union all

    select
        6, 0, 'РАСЧЕТЫ ПО ДОГОВОРАМ НПО', '',
        sum(case when cid = 12 then svfa_рu * -1 else svfa_рu end),
        sum(case when cid = 12 then ВВА_рu * -1 else ВВА_рu end),
        sum(case when cid = 12 then ivfa_рu * -1 else ivfa_рu end),
        sum(case when cid = 12 then svfa_bu * -1 else svfa_bu end),
        sum(case when cid = 12 then ВВА_bu * -1 else ВВА_bu end),
        sum(case when cid = 12 then ivfa_bu * -1 else ivfa_bu end)
    from cte_gr
    where cid in (7, 12)
),
cte_ps as (
    select
        1 as cid,
        row_number() over (
            order by
                g.uidpensionscheme,
                g.pension_scheme_id,
                g.uidsubtypeactivity,
                g.strategy_id
        ) as pid,

        coalesce(
            ps_id.name,
            ps_uid.name,
            case
                when g.pension_scheme_id is null
                 and nullif(btrim(g.uidpensionscheme), '') is null
                then 'Пенсионная схема не указана'
                else 'Пенсионная схема не сопоставлена'
            end
        ) as name,

        coalesce(
            st_id.name,
            st_uid.name,
            case
                when g.strategy_id is null
                 and nullif(btrim(g.uidsubtypeactivity), '') is null
                then 'Стратегия не указана'
                else 'Стратегия не сопоставлена'
            end
        ) as strateg,

        g.svfa_рu,
        g.ВВА_рu,
        g.ivfa_рu,
        g.svfa_bu,
        g.ВВА_bu,
        g.ivfa_bu

    from (
        select
            rd.pension_scheme_id,
            rd.uidpensionscheme,
            rd.strategy_id,
            rd.uidsubtypeactivity,

            sum(case
                when rd.account = '38302'
                 and rd.contract_class_code = 'INS'
                 and rd.contract_model_label = 'VFA'
                then abs(
                    coalesce(rd.sum_dt_pu, 0)
                    - coalesce(rd.sum_ct_pu, 0)
                )
            end) as svfa_рu,

            sum(case
                when rd.account = '38902'
                 and rd.contract_class_code = 'INS'
                 and rd.contract_model_label = 'BBA'
                then abs(
                    coalesce(rd.sum_dt_pu, 0)
                    - coalesce(rd.sum_ct_pu, 0)
                )
            end) as ВВА_рu,

            sum(case
                when rd.account in (
                    '39002', '39022', '39023', '39024'
                )
                 and coalesce(rd.contract_class_code, 'INV') = 'INV'
                then abs(
                    coalesce(rd.sum_dt_pu, 0)
                    - coalesce(rd.sum_ct_pu, 0)
                )
            end) as ivfa_рu,

            sum(case
                when rd.account = '38302'
                 and coalesce(rd.contract_class_code, 'INS') = 'INS'
                then abs(
                    coalesce(rd.sum_dt_bu, 0)
                    - coalesce(rd.sum_ct_bu, 0)
                )
            end) as svfa_bu,

            sum(case
                when rd.account = '38902'
                then abs(
                    coalesce(rd.sum_dt_bu, 0)
                    - coalesce(rd.sum_ct_bu, 0)
                )
            end) as ВВА_bu,

            sum(case
                when rd.account in (
                    '39002', '39022', '39023', '39024'
                )
                 and coalesce(rd.contract_class_code, 'INV') = 'INV'
                then abs(
                    coalesce(rd.sum_dt_bu, 0)
                    - coalesce(rd.sum_ct_bu, 0)
                )
            end) as ivfa_bu

        from back_office.report_conformity_pu_bu_detail rd
        where rd.report_conformity_pu_bu_id = $P{id}
          and rd.account in (
              '38302', '38902', '39002',
              '39022', '39023', '39024'
          )
        group by
            rd.pension_scheme_id,
            rd.uidpensionscheme,
            rd.strategy_id,
            rd.uidsubtypeactivity
    ) g

    left join prod_line.pens_scheme ps_id
        on ps_id.id = g.pension_scheme_id

    left join prod_line.hb_invest_strategy st_id
        on st_id.id = g.strategy_id

    left join lateral (
        select max(ps.name) as name
        from prod_line.pens_scheme ps
        where g.pension_scheme_id is null
          and nullif(
              lower(btrim(cast(ps.uid_1c as text))), ''
          ) = nullif(
              lower(btrim(g.uidpensionscheme)), ''
          )
        having count(*) = 1
    ) ps_uid on true

    left join lateral (
        select max(st.name) as name
        from prod_line.hb_invest_strategy st
        where g.strategy_id is null
          and nullif(
              lower(btrim(cast(st.uid_1c as text))), ''
          ) = nullif(
              lower(btrim(g.uidsubtypeactivity)), ''
          )
        having count(*) = 1
    ) st_uid on true
),
cte_all as (
    select * from cte

    union all

    select * from cte_gr

    union all

    select * from cte_gr_gr

    union all

    select * from cte_ps
),
cte_all_itog as (
    select
        *,
        coalesce(svfa_рu, 0)
            + coalesce(ВВА_рu, 0) as s_pu,

        coalesce(svfa_рu, 0)
            + coalesce(ВВА_рu, 0)
            + coalesce(ivfa_рu, 0) as itog_pu,

        coalesce(svfa_bu, 0)
            + coalesce(ВВА_bu, 0) as s_bu,

        coalesce(svfa_bu, 0)
            + coalesce(ВВА_bu, 0)
            + coalesce(ivfa_bu, 0) as itog_bu

    from cte_all
)
select
    *,
    s_pu - s_bu as rash_s,
    coalesce(ivfa_рu, 0)
        - coalesce(ivfa_bu, 0) as rash_i,
    itog_pu - itog_bu as rash_itog
from cte_all_itog
order by cid, pid]]>
		</queryString>
		<field name="cid" class="java.lang.Integer">
			<property name="com.jaspersoft.studio.field.label" value="cid"/>
		</field>
		<field name="pid" class="java.lang.Long">
			<property name="com.jaspersoft.studio.field.label" value="pid"/>
		</field>
		<field name="name" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="name"/>
		</field>
		<field name="strateg" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="strateg"/>
		</field>
		<field name="svfa_рu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="svfa_рu"/>
		</field>
		<field name="ВВА_рu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="ВВА_рu"/>
		</field>
		<field name="ivfa_рu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="ivfa_рu"/>
		</field>
		<field name="svfa_bu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="svfa_bu"/>
		</field>
		<field name="ВВА_bu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="ВВА_bu"/>
		</field>
		<field name="ivfa_bu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="ivfa_bu"/>
		</field>
		<field name="s_pu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="s_pu"/>
		</field>
		<field name="itog_pu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="itog_pu"/>
		</field>
		<field name="s_bu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="s_bu"/>
		</field>
		<field name="itog_bu" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="itog_bu"/>
		</field>
		<field name="rash_s" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="rash_s"/>
		</field>
		<field name="rash_i" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="rash_i"/>
		</field>
		<field name="rash_itog" class="java.math.BigDecimal">
			<property name="com.jaspersoft.studio.field.label" value="rash_itog"/>
		</field>
	</subDataset>
	<subDataset name="Dataset2" uuid="7eddebc8-2fca-40a5-86fa-915edecbbeeb">
		<property name="com.jaspersoft.studio.data.defaultdataadapter" value="postgre"/>
		<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
		<parameter name="signAgentIdPU" class="java.lang.String"/>
		<queryString>
			<![CDATA[select distinct on (a.id) a.id, ap.position, concat(a.last_name, ' ', a.first_name, ' ', a.middle_name) as fio 
from ourpension.agent a
join ourpension.agent_position ap
  on ap.agent_id = a.id
where a.id = ANY(string_to_array($P{signAgentIdPU}, ',') ::int[])]]>
		</queryString>
		<field name="id" class="java.lang.Integer">
			<property name="com.jaspersoft.studio.field.label" value="id"/>
			<property name="com.jaspersoft.studio.field.tree.path" value="agent"/>
		</field>
		<field name="position" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="position"/>
			<property name="com.jaspersoft.studio.field.tree.path" value="agent_position"/>
		</field>
		<field name="fio" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="fio"/>
		</field>
	</subDataset>
	<subDataset name="Dataset3" uuid="2d0d266b-ffd9-4486-a5e8-b6ab2c00219f">
		<property name="com.jaspersoft.studio.data.defaultdataadapter" value="postgre"/>
		<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
		<parameter name="signAgentIdBU" class="java.lang.String"/>
		<queryString>
			<![CDATA[select distinct on (a.id) a.id, ap.position, concat(a.last_name, ' ', a.first_name, ' ', a.middle_name) as fio 
from ourpension.agent a
join ourpension.agent_position ap
  on ap.agent_id = a.id
where a.id = ANY(string_to_array($P{signAgentIdBU}, ',') ::int[])]]>
		</queryString>
		<field name="id" class="java.lang.Integer">
			<property name="com.jaspersoft.studio.field.label" value="id"/>
			<property name="com.jaspersoft.studio.field.tree.path" value="agent"/>
		</field>
		<field name="position" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="position"/>
			<property name="com.jaspersoft.studio.field.tree.path" value="agent_position"/>
		</field>
		<field name="fio" class="java.lang.String">
			<property name="com.jaspersoft.studio.field.label" value="fio"/>
		</field>
	</subDataset>
	<parameter name="id" class="java.lang.Integer"/>
	<parameter name="signAgentIdPU" class="java.lang.String"/>
	<parameter name="signAgentIdBU" class="java.lang.String"/>
	<parameter name="executorAgentIdPU" class="java.lang.String"/>
	<parameter name="executorAgentIdBU" class="java.lang.String"/>
	<queryString language="SQL">
		<![CDATA[select
    r.form_date,
    to_char(
        to_date(r.m_y_report, 'MM.YYYY')
            + interval '1 month - 1 day',
        'DD.MM.YYYY'
    ) as endDate,

    (
        select concat_ws(
            ' ', a.last_name, a.first_name, a.middle_name
        )
        from ourpension.agent a
        where a.id = cast(
            nullif(btrim($P{executorAgentIdPU}), '')
            as integer
        )
    ) as executor_fio_pu,

    (
        select concat_ws(
            ' ', a.last_name, a.first_name, a.middle_name
        )
        from ourpension.agent a
        where a.id = cast(
            nullif(btrim($P{executorAgentIdBU}), '')
            as integer
        )
    ) as executor_fio_bu

from back_office.report_conformity_pu_bu r
where r.id = $P{id}]]>
	</queryString>
	<field name="form_date" class="java.sql.Date">
		<property name="com.jaspersoft.studio.field.label" value="form_date"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="report_conformity_pu_bu"/>
	</field>
	<field name="enddate" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.label" value="enddate"/>
	</field>
	<field name="executor_fio_pu" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.label" value="executor_fio_pu"/>
	</field>
	<field name="executor_fio_bu" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.label" value="executor_fio_bu"/>
	</field>
	<detail>
		<band height="300" splitType="Stretch">
			<property name="com.jaspersoft.studio.unit.height" value="px"/>
			<componentElement>
				<reportElement stretchType="RelativeToBandHeight" x="0" y="120" width="842" height="60" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="5441010e-6e5a-461d-8d9a-f47e56a27027">
					<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"/>
				</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" whenNoDataType="AllSectionsNoDetail">
					<datasetRun subDataset="Dataset1" uuid="f236a7a0-1935-4802-a0ff-df5cda08ee2d">
						<datasetParameter name="id">
							<datasetParameterExpression><![CDATA[$P{id}]]></datasetParameterExpression>
						</datasetParameter>
						<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					</datasetRun>
					<jr:column width="60" uuid="165499e6-de25-45bb-8a55-eac69ca5b6d5">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
						<jr:columnHeader style="Table_CH" height="70" rowSpan="2">
							<property name="com.jaspersoft.studio.unit.width" value="px"/>
							<staticText>
								<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="60" height="70" uuid="521d07d7-979e-4b15-875c-11821ad221d6"/>
								<textElement textAlignment="Center" verticalAlignment="Middle"/>
								<text><![CDATA[Показатель/Пенсионная схема]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell style="Table_TD" height="15">
							<property name="com.jaspersoft.studio.unit.height" value="px"/>
							<textField textAdjust="StretchHeight" isBlankWhenNull="true">
								<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="60" height="15" isPrintWhenDetailOverflows="true" uuid="6fc3f20a-89b6-4a3c-a719-77a92b7bf86d"/>
								<textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="55" uuid="444c5831-25f8-475f-98e0-454a6fa76e86">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
						<jr:columnHeader style="Table_CH" height="70" rowSpan="2">
							<property name="com.jaspersoft.studio.unit.width" value="px"/>
							<staticText>
								<reportElement x="0" y="0" width="55" height="70" uuid="292719be-fdb0-4bc0-86fc-9a68f99f380b"/>
								<textElement textAlignment="Center" verticalAlignment="Middle"/>
								<text><![CDATA[Стратегия]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:detailCell style="Table_TD" height="15">
							<textField textAdjust="StretchHeight" isBlankWhenNull="true">
								<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="55" height="15" uuid="183b11e8-f67b-478e-b42d-5914317dbb27"/>
								<textElement textAlignment="Center" verticalAlignment="Middle"/>
								<textFieldExpression><![CDATA[$F{strateg}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:columnGroup width="215" uuid="35c83d6c-ff42-40c7-8769-026893d0119a">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Columns [4]"/>
						<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="175" height="30" uuid="22dd917a-88ec-4674-83b3-faeb54431a40"/>
								<textElement textAlignment="Center" verticalAlignment="Middle"/>
								<text><![CDATA[Система персонифицированного учета]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:column width="60" uuid="2ec736bd-a1ed-4592-afa4-d154774649db">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<property name="com.jaspersoft.studio.unit.height" value="px"/>
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="60" height="40" uuid="5a23d8d5-1dd6-45af-806c-629d8a34a8a7"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Страховые договоры НПО VFA"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="60" height="15" uuid="35ffe4e8-2916-4504-9fce-77ef67e11acb"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{svfa_pu}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="60" uuid="8484f0a4-2de7-4304-914f-08df63bb0bd6">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="60" height="40" uuid="641a42c0-8dd8-4008-a19a-4df0c091d045"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Страховые договоры НПО BBA"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="60" height="15" uuid="b0d006df-5df8-4f5c-a9e2-b78af4089468"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{BBA_pu}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="40" uuid="61599f9a-437b-4c93-be30-84186bba4ebf">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/>
							<jr:columnHeader style="Table_CH" height="40">
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="40" height="40" uuid="fdbf74d4-3ef6-46e3-9c5e-a5bf0b79b7f8"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Инвестиционные договоры НПО"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="40" height="15" uuid="09b9db31-4ff4-4b20-9cee-cc5db5343cdf"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{ivfa_pu}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="55" uuid="bfefd073-152c-4d1b-81ea-63410d4459e9">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column6"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<property name="com.jaspersoft.studio.unit.width" value="px"/>
								<staticText>
									<reportElement x="0" y="0" width="55" height="40" uuid="7129f623-aea6-4921-afb9-10f4abc66e66"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<text><![CDATA[Итого]]></text>
								</staticText>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="55" height="15" uuid="836b59a9-1b4b-49ea-b6c3-5a767522f4d5"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{itog_pu} == null ? 0 : $F{itog_pu}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
					</jr:columnGroup>
					<jr:columnGroup width="220" uuid="a99fda5c-cfc0-4350-9e22-1b75aec21dd7">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Columns [4]"/>
						<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="220" height="30" uuid="f3e0909f-b56a-4b27-8e82-07e67945aa23"/>
								<textElement textAlignment="Center" verticalAlignment="Middle"/>
								<text><![CDATA[Система бухгалтерского учета]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:column width="55" uuid="525c9c36-0cbf-4428-955b-0dcdfd18d120">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column7"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<property name="com.jaspersoft.studio.unit.width" value="px"/>
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="55" height="40" uuid="ee4febd1-9643-41d7-b154-431a1d1bbe7c"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Страховые договоры НПО VFA"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="55" height="15" uuid="7b63b478-4249-4da2-9666-71c3ba50c6f3"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{svfa_bu} == null ? 0 : $F{svfa_bu}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="55" uuid="cf8ad68b-cca9-4aea-b593-999e14405bb7">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column8"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<property name="com.jaspersoft.studio.unit.width" value="px"/>
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="55" height="40" uuid="078d411a-9a18-4809-91e3-702fcf8c088d"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Страховые договоры НПО  BBA"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="55" height="15" uuid="71359ac9-86d4-4978-9919-fd88820db50f"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{ВВА_bu} == null ? 0 : $F{ВВА_bu}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="55" uuid="c8152a81-4f1f-413a-bcdb-e0385d04cdac">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column9"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<property name="com.jaspersoft.studio.unit.width" value="px"/>
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="55" height="40" uuid="88327389-9b89-4d9a-a8bd-9c2dc1e1a90c"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Инвестиционные договоры НПО"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="55" height="15" uuid="a46028b0-99eb-4c5d-84c7-88fa1825fc5c"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{ivfa_bu} == null ? 0 : $F{ivfa_bu}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="55" uuid="b8108eb4-10f5-4dcf-bc56-c0c6cedf4f98">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column10"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<property name="com.jaspersoft.studio.unit.width" value="px"/>
								<staticText>
									<reportElement x="0" y="0" width="55" height="40" uuid="551de6f8-e078-4732-a222-53db8566e9f1"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<text><![CDATA[Итого]]></text>
								</staticText>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="55" height="15" uuid="d2583305-2c98-40b1-be56-ddd201520f6b"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{itog_bu} == null ? 0 : $F{itog_bu}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
					</jr:columnGroup>
					<jr:columnGroup width="175" uuid="7da6d55b-259f-4723-ba1a-3ca93832bb20">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Columns [3]"/>
						<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="175" height="30" uuid="81059cc3-5802-44bc-b576-01655cc67133"/>
								<textElement textAlignment="Center" verticalAlignment="Middle"/>
								<text><![CDATA[Расхождения]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:column width="60" uuid="0f360215-d5f6-446b-957a-f84cb42df895">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column11"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="60" height="40" uuid="fde45534-6ee1-4158-b9f5-bb52a776aad1"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Страховые договоры НПО"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="60" height="15" uuid="8aedb24e-7527-447c-ace9-9e0240fd6854"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{rash_s} == null ? 0 : $F{rash_s}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="60" uuid="0c4ef5d7-65af-443a-be43-0e7441de5242">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column12"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="60" height="40" uuid="c04e1df8-d84f-4bd9-8e80-ea11cd171b39"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Инвестиционные договоры НПО"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="60" height="15" uuid="2333df4c-9a0c-4b29-b8ee-6cec485b560d"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{rash_i} == null ? 0 : $F{rash_i}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="55" uuid="49b3b983-e25a-416a-a63e-48eb7d035e82">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column13"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<property name="com.jaspersoft.studio.unit.width" value="px"/>
								<staticText>
									<reportElement x="0" y="0" width="55" height="40" uuid="1c2ee407-6538-47a9-b5e9-011e28d6f23e"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<text><![CDATA[Итого]]></text>
								</staticText>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" pattern="#,##0.00#" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="55" height="15" uuid="81decc8a-3fe6-49b7-8cf6-87f719d0d58b"/>
									<textElement textAlignment="Right" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{rash_itog} == null ? 0 : $F{rash_itog}]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
					</jr:columnGroup>
					<jr:columnGroup width="120" uuid="2801b40c-9522-4ab6-90a7-245e0b6e9f90">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Columns [2]"/>
						<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
							<staticText>
								<reportElement x="0" y="0" width="120" height="30" uuid="3208295f-dd9e-4813-9f54-c75527594b1d"/>
								<textElement textAlignment="Center" verticalAlignment="Middle"/>
								<text><![CDATA[Счет БУ]]></text>
							</staticText>
						</jr:columnHeader>
						<jr:column width="60" uuid="dca83372-e497-4352-a045-9e38a0d82d63">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column14"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="60" height="40" uuid="371934a6-ed54-4d3e-b0c2-01930af8b7e9"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Страховые договоры НПО"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="60" height="15" uuid="8f40e508-c23c-46c4-8cc0-38115fc674bc"/>
									<textElement verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{cid} == 1 ? "38302, 38902, 38311.2, 38911.2" : 
$F{cid} ==2 ? "38302, 38902": 
$F{cid} == 3 ? "38311.1, 38911.1" : 
$F{cid} == 4 ? "38311.2, 38911.2" :
$F{cid} == 5 ? "39703" : 
$F{cid} == 6 ? "КЗ-ДЗ" :
$F{cid} == 8 ? "48309" : 
$F{cid} == 9 ? "48306.1" : 
$F{cid} == 10 ? "48301.1" : 
$F{cid} == 11 ? "48303.1" : 
$F{cid} == 13 ? "48310" : 
$F{cid} == 14 ? "48305.1" :  
$F{cid} == 15 ? "48302.1" :
$F{cid} == 16 ? "48304.1" : null]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
						<jr:column width="60" uuid="860ddacc-3fca-49f7-a074-4b6a6f785315">
							<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column15"/>
							<jr:columnHeader style="Table_CH" height="40" rowSpan="1">
								<textField textAdjust="StretchHeight">
									<reportElement x="0" y="0" width="60" height="40" uuid="f34103da-e445-4e32-87be-463691b39492"/>
									<textElement textAlignment="Center" verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA["Инвестиционные договоры НПО"]]></textFieldExpression>
								</textField>
							</jr:columnHeader>
							<jr:detailCell style="Table_TD" height="15">
								<textField textAdjust="StretchHeight" isBlankWhenNull="true">
									<reportElement style="RowStyle" stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="60" height="15" uuid="4fd7d114-e197-4186-9bd3-a0a372beee43"/>
									<textElement verticalAlignment="Middle"/>
									<textFieldExpression><![CDATA[$F{cid} == 1 ? "39002 + 39022+39023+39024, 39011.2+39032.2+39033.2+39037.2" : 
$F{cid} ==2 ? "39002 + 39022+39023+39024": 
$F{cid} == 3 ? "39011.1+39032.1+39033.1+39037.1" : 
$F{cid} == 4 ? "39011.2+39032.2+39033.2+39037.2" :
$F{cid} == 5 ? "39703" : 
$F{cid} == 6 ? "КЗ-ДЗ" :
$F{cid} == 8 ? "48309" : 
$F{cid} == 9 ? "48306.3" : 
$F{cid} == 10 ? "48301.3" : 
$F{cid} == 11 ? "48303.3" : 
$F{cid} == 13 ? "48310" : 
$F{cid} == 14 ? "48305.3" :  
$F{cid} == 15 ? "48302.3" :
$F{cid} == 16 ? "48304.3" : null]]></textFieldExpression>
								</textField>
							</jr:detailCell>
						</jr:column>
					</jr:columnGroup>
				</jr:table>
			</componentElement>
			<staticText>
				<reportElement x="0" y="0" width="800" height="15" uuid="6ad7e374-2015-4a7e-b77b-ba4360c3f345">
					<property name="com.jaspersoft.studio.unit.x" value="px"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center"/>
				<text><![CDATA[Акт соответствия сведений № 09/25-ПР]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="15" width="800" height="15" uuid="cb3e463f-0b5b-44dd-9a6c-2148d229db60">
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center"/>
				<text><![CDATA[персонифицированного и бухгалтерского учетов Фонда]]></text>
			</staticText>
			<textField pattern="dd.MM.yyyy">
				<reportElement x="630" y="30" width="170" height="30" uuid="a4791603-11cd-4903-aed8-6912ad84a233"/>
				<textElement textAlignment="Right" verticalAlignment="Bottom"/>
				<textFieldExpression><![CDATA[$F{form_date}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="30" width="180" height="30" uuid="0b29544e-0234-4f4e-b7a4-5853008a76db"/>
				<textElement verticalAlignment="Bottom"/>
				<text><![CDATA[АО "НПФ "БУДУЩЕЕ"]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="60" width="800" height="30" uuid="2ded7b03-e81f-4761-8fd2-3437085a8de0"/>
				<textElement verticalAlignment="Bottom"/>
				<text><![CDATA[В соответствии с Регламентом взаимодействия подразделений (утв. Приказом Генерального директора № 339 от «30» декабря 2016 года), произведена сверка учета операций.	]]></text>
			</staticText>
			<textField>
				<reportElement x="0" y="90" width="800" height="15" uuid="7ec9fce3-b47a-4c2e-87bf-5c96bc5cb63a">
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textFieldExpression><![CDATA["На дату "+$F{enddate}+"г.  в системах Фонда отражены следующие показатели:	"]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="440" y="105" width="110" height="15" uuid="ec295a81-8e2a-4518-a2ee-33d0c2efa906">
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<text><![CDATA[(руб.)]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" x="0" y="180" width="100" height="30" uuid="3c45c4fb-db51-49c5-a6bd-e6506c20b8ed"/>
				<textElement verticalAlignment="Bottom"/>
				<text><![CDATA[От ДПУ:]]></text>
			</staticText>
			<componentElement>
				<reportElement positionType="Float" x="0" y="210" width="270" height="50" uuid="aaaefab0-0211-4fa8-825d-21b4eca4336b">
					<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"/>
				</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="Dataset2" uuid="a87fb043-3252-4f24-9b8d-07ac9e1a1e93">
						<datasetParameter name="signAgentIdPU">
							<datasetParameterExpression><![CDATA[$P{signAgentIdPU}]]></datasetParameterExpression>
						</datasetParameter>
						<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					</datasetRun>
					<jr:column width="100" uuid="c96ae7f2-87b6-4cbf-8ba7-8c9b1ff8548e">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
						<jr:detailCell style="Table 1_TD" height="30">
							<property name="com.jaspersoft.studio.unit.width" value="px"/>
							<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>
							<textField textAdjust="StretchHeight" isBlankWhenNull="true">
								<reportElement x="0" y="0" width="100" height="30" uuid="a8ff79af-0041-466d-9e4d-2ff22a2b978b"/>
								<textFieldExpression><![CDATA[$F{position}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="100" uuid="66ccd66c-ebe4-4405-925b-24a7f1b029b6">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
						<jr:detailCell style="Table 1_TD" height="30">
							<property name="com.jaspersoft.studio.unit.width" value="px"/>
							<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>
							<textField textAdjust="StretchHeight" isBlankWhenNull="true">
								<reportElement x="0" y="0" width="100" height="30" uuid="8870776d-739b-43df-96a2-96bbc11c197b"/>
								<textFieldExpression><![CDATA[$F{fio}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="70" uuid="c25a5834-96b7-41f2-bd97-e488ab32a233">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
						<jr:detailCell style="Table 1_TD" height="30">
							<property name="com.jaspersoft.studio.unit.width" value="px"/>
							<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>
							<staticText>
								<reportElement mode="Opaque" x="0" y="0" width="70" height="30" isPrintWhenDetailOverflows="true" uuid="19307b7c-2780-4f1b-a668-750bd1a7c661"/>
								<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="Bottom"/>
								<text><![CDATA[____________ ]]></text>
							</staticText>
						</jr:detailCell>
					</jr:column>
				</jr:table>
			</componentElement>
			<staticText>
				<reportElement positionType="Float" x="280" y="180" width="100" height="30" uuid="00eabeac-a090-489d-a3e6-a67d208ce7ca"/>
				<textElement verticalAlignment="Bottom"/>
				<text><![CDATA[От Бухгалтерии:]]></text>
			</staticText>
			<componentElement>
				<reportElement positionType="Float" x="280" y="210" width="270" height="50" uuid="33bac409-d178-4c8d-95b6-32e8e3d5b51d">
					<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="com.jaspersoft.studio.unit.width" value="px"/>
				</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="Dataset3" uuid="ad371718-4603-4260-8858-1f59ca97e829">
						<datasetParameter name="signAgentIdBU">
							<datasetParameterExpression><![CDATA[$P{signAgentIdBU}]]></datasetParameterExpression>
						</datasetParameter>
						<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
					</datasetRun>
					<jr:column width="100" uuid="10c5ecbf-5763-49bf-b403-6bfa01f96394">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
						<jr:detailCell style="Table 2_TD" height="30">
							<property name="com.jaspersoft.studio.unit.width" value="px"/>
							<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>
							<textField textAdjust="StretchHeight" isBlankWhenNull="true">
								<reportElement x="0" y="0" width="100" height="30" uuid="2e5c2378-9626-4faf-9ef6-e158158b2799"/>
								<textFieldExpression><![CDATA[$F{position}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="100" uuid="215a459b-62a6-42c6-b770-f36a7abca1ad">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
						<jr:detailCell style="Table 2_TD" height="30">
							<property name="com.jaspersoft.studio.unit.width" value="px"/>
							<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>
							<textField textAdjust="StretchHeight">
								<reportElement x="0" y="0" width="100" height="30" uuid="2e95c451-bdc0-4ff8-a1fa-1a1c266a030e"/>
								<textFieldExpression><![CDATA[$F{fio}]]></textFieldExpression>
							</textField>
						</jr:detailCell>
					</jr:column>
					<jr:column width="70" uuid="1c2d39a8-db2a-4b67-93fa-8b90206e4782">
						<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
						<jr:detailCell style="Table 2_TD" height="30">
							<property name="com.jaspersoft.studio.unit.width" value="px"/>
							<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>
							<staticText>
								<reportElement x="0" y="0" width="70" height="30" uuid="0aa3cb18-697b-4d30-a9f9-60840ebac0c1"/>
								<textElement verticalAlignment="Bottom"/>
								<text><![CDATA[____________ ]]></text>
							</staticText>
						</jr:detailCell>
					</jr:column>
				</jr:table>
			</componentElement>
			<textField>
				<reportElement positionType="Float" x="0" y="267" width="270" height="30" uuid="80a4dcc6-7108-4288-a8c7-a311f2cb1fec"/>
				<textFieldExpression><![CDATA["Подписант от ДПУ: " + $F{executor_fio_pu}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement positionType="Float" x="280" y="267" width="270" height="30" uuid="ea2af3d5-375e-4619-93d7-5537f941771d"/>
				<textFieldExpression><![CDATA["Подписант от Бухгалтерии: " + $F{executor_fio_bu}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
</jasperReport>