Problems with iReport subload loading with Codeigniter

0

Hi I would like to see if you can help me I am trying to make a report that contains a subreport but this only works locally when I upload to the server and change the urls does not work I enclose the report father and son:

Parent Report:

<?xml version="1.0" encoding="UTF-8"?>
<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="reporteHistorialConsulta" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f109ce01-c74c-4dfa-b6a1-a84a88be10a6">
    <property name="ireport.zoom" value="1.4641000000000006"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <parameter name="codigoConsulta" class="java.lang.Integer">
        <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["http://christian.com.ec/proyecto/reporteHistorialConsultaRevisionActual"]]></defaultValueExpression>
    </parameter>
    <queryString>
        <![CDATA[SELECT
     CONCAT(paciente.'PAC_NOMBRE',' ',paciente.'PAC_APELLIDO') AS paciente_PAC_NOMBRE,
     CONCAT(empleado.'EMP_NOMBRE',' ',empleado.'EMP_APELLIDO') AS empleado_EMP_NOMBRE,
     DATE_FORMAT(consulta.'CON_FECHA_CREACION',"%H:%i") AS consulta_CON_HORA,
     consulta.'CON_MOTIVO' AS consulta_CON_MOTIVO,
     consulta.'CON_PROBLEMA_ACTUAL' AS consulta_CON_PROBLEMA_ACTUAL,
     consulta.'CON_PLAN_TRATAMIENTO' AS consulta_CON_PLAN_TRATAMIENTO,
     consulta.'CON_FECHA_CONSULTA' AS consulta_CON_FECHA_CONSULTA,
     paciente.'PAC_SEXO' AS paciente_PAC_SEXO,
     paciente.'PAC_FECHA_NACIMIENTO' AS paciente_PAC_FECHA_NACIMIENTO,
     paciente.'PAC_ANT_FAMILIARES' AS paciente_PAC_ANT_FAMILIARES,
     paciente.'PAC_ANT_PERSONALES' AS paciente_PAC_ANT_PERSONALES,
     paciente.'PAC_HIS_NUMERO' AS paciente_PAC_HIS_NUMERO,
     empleado.'EMP_CODIGO_LICENCIA' AS empleado_EMP_CODIGO_LICENCIA
FROM
     'CONSULTA' consulta INNER JOIN 'HISTORIA_CLINICA_USUARIO' historia_clinica_usuario ON consulta.'CON_CODIGO' = historia_clinica_usuario.'CON_CODIGO'
     INNER JOIN 'PACIENTE' paciente ON historia_clinica_usuario.'PAC_CODIGO' = paciente.'PAC_CODIGO'
     INNER JOIN 'USUARIO' usuario ON historia_clinica_usuario.'USU_CODIGO' = usuario.'USU_CODIGO'
     INNER JOIN 'EMPLEADO' empleado ON usuario.'EMP_CODIGO' = empleado.'EMP_CODIGO'
WHERE
    consulta.'CON_CODIGO'=$P{codigoConsulta}]]>
    </queryString>
    <field name="paciente_PAC_NOMBRE" class="java.lang.String"/>
    <field name="empleado_EMP_NOMBRE" class="java.lang.String"/>
    <field name="consulta_CON_HORA" class="java.lang.String"/>
    <field name="consulta_CON_MOTIVO" class="java.lang.String"/>
    <field name="consulta_CON_PROBLEMA_ACTUAL" class="java.lang.String"/>
    <field name="consulta_CON_PLAN_TRATAMIENTO" class="java.lang.String"/>
    <field name="consulta_CON_FECHA_CONSULTA" class="java.sql.Date"/>
    <field name="paciente_PAC_SEXO" class="java.lang.Integer"/>
    <field name="paciente_PAC_FECHA_NACIMIENTO" class="java.sql.Date"/>
    <field name="paciente_PAC_ANT_FAMILIARES" class="java.lang.String"/>
    <field name="paciente_PAC_ANT_PERSONALES" class="java.lang.String"/>
    <field name="paciente_PAC_HIS_NUMERO" class="java.lang.String"/>
    <field name="empleado_EMP_CODIGO_LICENCIA" class="java.lang.String"/>
    <group name="revisionActualreporte">
        <groupExpression><![CDATA[$P{codigoConsulta}]]></groupExpression>
        <groupFooter>
            <band height="49">
                <subreport>
                    <reportElement uuid="e4f614f6-e5c1-45fc-a77b-0fee883eec7a" x="0" y="11" width="555" height="36"/>
                    <subreportParameter name="codigoConsulta">
                        <subreportParameterExpression><![CDATA[$P{codigoConsulta}]]></subreportParameterExpression>
                    </subreportParameter>
                    <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                    <subreportExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportExpression>
                </subreport>
            </band>
        </groupFooter>
    </group>
    <pageHeader>
        <band height="331" splitType="Stretch">
            <rectangle>
                <reportElement uuid="8b56470d-b3f9-47d8-a472-5ac422588f9d" x="0" y="0" width="138" height="11"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="8b56470d-b3f9-47d8-a472-5ac422588f9d" x="138" y="0" width="117" height="11"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="8b56470d-b3f9-47d8-a472-5ac422588f9d" x="255" y="0" width="122" height="11"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="8b56470d-b3f9-47d8-a472-5ac422588f9d" x="377" y="0" width="35" height="11"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="8b56470d-b3f9-47d8-a472-5ac422588f9d" x="412" y="0" width="30" height="11"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="8b56470d-b3f9-47d8-a472-5ac422588f9d" x="442" y="0" width="113" height="11"/>
            </rectangle>
            <staticText>
                <reportElement uuid="1c31d90e-4f76-4d32-901a-69de36dc1ae6" x="0" y="0" width="138" height="11"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[ESTABLECIMIENTO]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="ae5abb60-a417-464f-999f-60fc52e6b43b" x="138" y="0" width="117" height="11"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[NOMBRE]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="ae5abb60-a417-464f-999f-60fc52e6b43b" x="412" y="0" width="30" height="11"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[EDAD]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="ae5abb60-a417-464f-999f-60fc52e6b43b" x="377" y="0" width="35" height="11"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[SEXO]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="ae5abb60-a417-464f-999f-60fc52e6b43b" x="255" y="0" width="122" height="11"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[APELLIDO]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="ae5abb60-a417-464f-999f-60fc52e6b43b" x="442" y="0" width="113" height="11"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[N° HISTORIA CLÍNICA]]></text>
            </staticText>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="0" y="11" width="138" height="16"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="138" y="11" width="117" height="16"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="255" y="11" width="122" height="16"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="377" y="11" width="35" height="16"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="412" y="11" width="30" height="16"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="442" y="11" width="113" height="16"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="0" y="37" width="555" height="13"/>
            </rectangle>
            <staticText>
                <reportElement uuid="f2f445e6-4adb-4e79-a87e-6f6f0ed25fd7" x="0" y="37" width="555" height="13"/>
                <textElement verticalAlignment="Middle">
                    <font size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ 1  MOTIVO DE CONSULTA]]></text>
            </staticText>
            <rectangle>
                <reportElement uuid="b866688f-5bb1-43da-89b0-035947f6e460" x="0" y="50" width="555" height="25"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="0" y="85" width="555" height="13"/>
            </rectangle>
            <staticText>
                <reportElement uuid="f2f445e6-4adb-4e79-a87e-6f6f0ed25fd7" x="0" y="85" width="373" height="13"/>
                <textElement verticalAlignment="Middle">
                    <font size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ 2  ANTECEDENTES PERSONALES]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="039ce9eb-2b64-467f-a6ff-893bca08558b" x="373" y="85" width="182" height="13"/>
                <textElement verticalAlignment="Middle">
                    <font size="5"/>
                </textElement>
                <text><![CDATA[DATOS CLÍNICO - QUIRURGICOS RELEVANTES Y GINECO OBSTÉTRICO]]></text>
            </staticText>
            <rectangle>
                <reportElement uuid="53454b46-769d-4502-a804-227234aca041" x="0" y="98" width="555" height="54"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="0" y="162" width="555" height="13"/>
            </rectangle>
            <staticText>
                <reportElement uuid="f2f445e6-4adb-4e79-a87e-6f6f0ed25fd7" x="0" y="162" width="555" height="13"/>
                <textElement verticalAlignment="Middle">
                    <font size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ 3  ANTECEDENTES FAMILIARES]]></text>
            </staticText>
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="0" y="252" width="555" height="13"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="53454b46-769d-4502-a804-227234aca041" x="0" y="265" width="555" height="66"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="53454b46-769d-4502-a804-227234aca041" x="0" y="175" width="555" height="66"/>
            </rectangle>
            <staticText>
                <reportElement uuid="f2f445e6-4adb-4e79-a87e-6f6f0ed25fd7" x="0" y="252" width="555" height="13"/>
                <textElement verticalAlignment="Middle">
                    <font size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ 4  ENFERMEDAD O PROBLEMA ACTUAL]]></text>
            </staticText>
        </band>
    </pageHeader>
    <columnFooter>
        <band height="45" splitType="Stretch"/>
    </columnFooter>
</jasperReport>

Son Report:

<?xml version="1.0" encoding="UTF-8"?>
<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="reporteHistorialConsultaRevisionActual" language="groovy" pageWidth="595" pageHeight="842" columnWidth="575" leftMargin="0" rightMargin="20" topMargin="0" bottomMargin="0" uuid="4407bf1d-bcc1-491a-9958-b448e750e086">
    <property name="ireport.zoom" value="1.4641000000000006"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <parameter name="codigoConsulta" class="java.lang.Integer">
        <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <queryString>
        <![CDATA[SELECT
     consulta_revision_actual.'CRA_DESCRIPCION' AS consulta_revision_actual_CRA_DESCRIPCION,
     revision_actual.'REV_NOMBRE' AS revision_actual_REV_NOMBRE
FROM
     'CONSULTA_REVISION_ACTUAL' consulta_revision_actual INNER JOIN 'REVISION_ACTUAL' revision_actual ON consulta_revision_actual.'REV_CODIGO' = revision_actual.'REV_CODIGO'
WHERE consulta_revision_actual.'CON_CODIGO' = $P{codigoConsulta}]]>
    </queryString>
    <field name="consulta_revision_actual_CRA_DESCRIPCION" class="java.lang.String"/>
    <field name="revision_actual_REV_NOMBRE" class="java.lang.String"/>
    <columnHeader>
        <band height="23" splitType="Stretch">
            <rectangle>
                <reportElement uuid="80cf588d-2a53-4170-99ac-b7bc20047946" x="0" y="0" width="555" height="13"/>
            </rectangle>
            <staticText>
                <reportElement uuid="f2f445e6-4adb-4e79-a87e-6f6f0ed25fd7" x="0" y="0" width="555" height="13"/>
                <textElement verticalAlignment="Middle">
                    <font size="9" isBold="true"/>
                </textElement>
                <text><![CDATA[ 5  REVISIÓN ACTUAL DE ÓRGANOS Y SISTEMAS]]></text>
            </staticText>
            <rectangle>
                <reportElement uuid="ccc25d5c-875f-452d-b5df-97b5fbabf192" x="0" y="12" width="217" height="11"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="ccc25d5c-875f-452d-b5df-97b5fbabf192" x="217" y="12" width="338" height="11"/>
            </rectangle>
            <staticText>
                <reportElement uuid="f2f445e6-4adb-4e79-a87e-6f6f0ed25fd7" x="0" y="12" width="217" height="11"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="7" isBold="true"/>
                </textElement>
                <text><![CDATA[ÓRGANOS / SISTEMAS]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="f2f445e6-4adb-4e79-a87e-6f6f0ed25fd7" x="217" y="12" width="338" height="11"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="7" isBold="true"/>
                </textElement>
                <text><![CDATA[DESCRIPCIÓN]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="13" splitType="Stretch">
            <rectangle>
                <reportElement uuid="ccc25d5c-875f-452d-b5df-97b5fbabf192" x="217" y="0" width="338" height="13"/>
            </rectangle>
            <rectangle>
                <reportElement uuid="ccc25d5c-875f-452d-b5df-97b5fbabf192" x="0" y="0" width="217" height="13"/>
            </rectangle>
            <textField>
                <reportElement uuid="33400b76-39c1-4b74-af76-7084d9677036" x="11" y="0" width="206" height="13"/>
                <textElement>
                    <font size="8"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{revision_actual_REV_NOMBRE}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="1ede2a00-28d1-4161-a1cc-c86456116ac0" x="227" y="0" width="328" height="13"/>
                <textElement>
                    <font size="8"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{consulta_revision_actual_CRA_DESCRIPCION}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>

These are the lines of code that change for the server:

In Local parent report:

<defaultValueExpression><![CDATA["C:\Users\Christian\Documents\proyecto\"]]></defaultValueExpression>

<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "reporteHistorialConsultaRevisionActual.jasper"]]></subreportExpression>

On parent report server

<defaultValueExpression><![CDATA["http://christian.com.ec/proyecto/reporteHistorialConsultaRevisionActual"]]></defaultValueExpression>

<subreportExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportExpression>

I hope you can help me regards Thanks

    
asked by Christian Esk 05.04.2018 в 23:50
source

0 answers