Jump to content
We've recently updated our Privacy Statement, available here ×

reportdev

Members
  • Posts

    413
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by reportdev

  1. Dont know the max number of pages, but I just generated 1.6 million pages and it handled very well.

    Jasper uses itext library for pdf generation. Jasper for some reason still uses 2.1.7 itext version.

    So you are looking at 2 gb limit on the pdf document

     

    iText documentation is as below:  https://developers.itextpdf.com/question/what-size-limit-pdf-file

    The maximum size of a PDF created with iText versions before 5.3 is 2 gigabytes. The maximum size of a PDF created with iText versions 5.3 and higher is 1 terabyte.

  2. Sharing libraries is possible in Jasper by creating jar files using java code.

    I have worked in the same setup and its not an easy task to convert Oracle reports to Jasper as-is.

    We salvaged as much as psuedo code from Oracle reports libraries and then rewrote as Oracle objects.

    You need to convert all the Program Units of pl/sql libraries to normal database objects and then write sql queries.

  3. JasperViewer is just an implementation of JFrame. So you can try adding new buttons and action listeners to it. 

    It was time consuming for me to find the Print button component in the Jframe.. So I have created a new button and added action listener which initiates the JasperPrintManager. 

            final JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, con);         JFrame frame = new JFrame("Report");        JButton b = new JButton("PrintToDefaultPrinter");        b.setBounds(500, 0, 250, 25);        b.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent arg0) {                try {                    JasperPrintManager.printReport(jasperPrint, false);                } catch (JRException e) {                    e.printStackTrace();                }            }        });         frame.add(b);        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        frame.getContentPane().add(new JRViewer(jasperPrint));        frame.pack();        frame.setVisible(true);[/code]

     

  4.  

            JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, con);                  //For Viewing the report        JasperViewer.viewReport(jasperPrint, false);                //For Printing to the Default Printer        JasperPrintManager.printReport(jasperPrint, false); [/code]
  5. I think its the dependencies causing this error  'file is not a valid jrxml file'.

    Add all these dependencies. if it fails again with these dependencies... post the entire log and jrxml.

    jasperreports-6.4.2.jar

    jasperreports-fonts-6.1.1.jar

    jasperreports-functions-6.4.2.jar

     

     

  6. In the Studio, your expression works fine with dependencies.

    Check if you are missing these dependencies in your framework. 

     

        <import value="com.google.zxing.*"/>
        <import value="com.google.zxing.client.j2se.*"/>

    <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.4.2.final using JasperReports Library version 6.4.1  --><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="dataMatrix" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="3b05d319-6bc1-41cc-9f50-1733cb19849f">    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>    <import value="com.google.zxing.*"/>    <import value="com.google.zxing.client.j2se.*"/>    <queryString>        <![CDATA[]]>    </queryString>    <background>        <band splitType="Stretch"/>    </background>    <title>        <band height="79" splitType="Stretch"/>    </title>    <pageHeader>        <band height="35" splitType="Stretch"/>    </pageHeader>    <columnHeader>        <band height="61" splitType="Stretch"/>    </columnHeader>    <detail>        <band height="210" splitType="Stretch">            <image>                <reportElement x="0" y="0" width="300" height="210" uuid="548ff446-5c8b-4d33-a2ce-9553abfad2fb"/>                <imageExpression><![CDATA[com.google.zxing.client.j2se.MatrixToImageWriter.toBufferedImage(new com.google.zxing.datamatrix.DataMatrixWriter().encode("123456789", com.google.zxing.BarcodeFormat.DATA_MATRIX,100,100))]]></imageExpression>            </image>        </band>    </detail>    <columnFooter>        <band height="45" splitType="Stretch"/>    </columnFooter>    <pageFooter>        <band height="54" splitType="Stretch"/>    </pageFooter>    <summary>        <band height="42" splitType="Stretch"/>    </summary></jasperReport>[/code]

     

  7. I agree with Hozawa, that by default Jasper does not support dynamic connnections. but if you can write some scriptlets

    Check Default Data adapters
    When Default data adapter configuration is mentioned, the report will try to connect to a database using the configuration given in a default data adapter.
    For configuring default data adapter on a report, you would write up a database config xml file and place that on the Root level of Jasper server
    I'm just throwing an idea: 
    May be you could write a scriptlet based on a parameter and update this default data adapter Configuration file on the server dynamically (but by no means this is secure since the configuration file carries unhashed username/password for the data adapter).

  8. As mentioned in my first answer, it was alignment issue in the grid lines of a jrxml. (please mark the jrxml comment as correct so that it can be resolved)

    dont worry about com.jaspersoft.studio.unit.x and y units. These are added by the tool itself. 

    Lets say you have 6 columns in a report along with some subtotals ,headers and you want to export it to excel.  

    All the text fields in all the bands should align with each other in vertical pattern. One field should not overlap with the other field in any way. 

    play around with a simple jrxml by placing text fields here and there... you will understand. 

    for your API question. refer this tutorialspoint site https://www.tutorialspoint.com/jasper_reports/jasper_exporting_reports.htm

  9. check ths jrxml

    <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.4.2.final using JasperReports Library version 6.4.1  --><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="Saldo" pageWidth="595"              pageHeight="842" columnWidth="555"              leftMargin="20" rightMargin="20"              topMargin="30" bottomMargin="30"              uuid="ecf54744-a704-47f2-89ed-acbcaff6f1df">    <property name="com.jaspersoft.studio.data.defaultdataadapter"              value="OwnhelperTimeWriterDataAdapter.xml"/>    <import value="xso.report.utils.*"/>    <style name="Font_Normal" isDefault="true" fontName="Arial"           fontSize="10" pdfFontName="Helvetica" pdfEncoding="Cp1252"           isPdfEmbedded="false">        <box leftPadding="3" rightPadding="3"/>    </style>    <style name="Font_Bold" fontName="Arial" fontSize="10"           isBold="true" pdfFontName="Helvetica-Bold"           pdfEncoding="Cp1252" isPdfEmbedded="false">        <box leftPadding="3" rightPadding="3"/>    </style>    <style name="Font_Italic" fontName="Arial" fontSize="10"           isItalic="true" pdfFontName="Helvetica-Oblique"           pdfEncoding="Cp1252" isPdfEmbedded="false">        <box leftPadding="3" rightPadding="3"/>    </style>    <style name="Font_Balance" style="Font_Normal"           fontName="Arial" fontSize="10">        <conditionalStyle>            <conditionExpression>                <![CDATA[$V{SALDO} < 0]]>            </conditionExpression>            <style forecolor="#FF0000"/>        </conditionalStyle>    </style>    <style name="Font_Balance_Italic" style="Font_Balance"           fontName="Arial" fontSize="10" isItalic="true"/>    <style name="Font_Running_Balance" style="Font_Italic"           fontName="Arial" fontSize="10">        <conditionalStyle>            <conditionExpression>                <![CDATA[$V{SALDO_TOTAL} < 0]]>            </conditionExpression>            <style forecolor="#FF0000"/>        </conditionalStyle>    </style>    <parameter name="DECIMAL_SEPARATOR" class="java.lang.Character"               isForPrompting="false">        <defaultValueExpression>            <![CDATA[',']]>        </defaultValueExpression>    </parameter>    <parameter name="TITLE" class="java.lang.String"               isForPrompting="false"/>    <parameter name="DATE_PATTERN" class="java.lang.String"               isForPrompting="false">        <defaultValueExpression>            <![CDATA["dd-MM-yyyy"]]>        </defaultValueExpression>    </parameter>    <parameter name="TIME_PATTERN" class="java.lang.String"               isForPrompting="false">        <defaultValueExpression>            <![CDATA["H:mm"]]>        </defaultValueExpression>    </parameter>    <parameter name="COMPANY_LOGO" class="java.lang.String"               isForPrompting="false"/>    <parameter name="FOOTER_LABEL_GROUP" class="java.lang.String"               isForPrompting="false"/>    <parameter name="FOOTER_LABEL_FILTER" class="java.lang.String"               isForPrompting="false"/>    <field name="SALDO_IT_MED" class="java.lang.String"/>    <field name="SALDO_WEEK" class="java.lang.String"/>    <field name="SALDO_DUUR_TIJD" class="java.lang.Long"/>    <field name="SALDO_REFERENTIE_TIJD" class="java.lang.Long"/>    <field name="SALDO_DAGEN" class="java.lang.Long"/>    <variable name="SALDO_IT_MED_DAGEN_SUM" class="java.lang.Long"              resetType="Group" resetGroup="SALDO_IT_MED__TOTAAL"              calculation="Sum">        <variableExpression>            <![CDATA[$F{SALDO_DAGEN}]]>        </variableExpression>    </variable>    <variable name="SALDO_DAGEN_SUM_SUMMARY" class="java.lang.Long"              calculation="Sum">        <variableExpression>            <![CDATA[$F{SALDO_DAGEN}]]>        </variableExpression>    </variable>    <variable name="SALDO_IT_MEDSALDO_DUUR_TIJD__SUM"              class="java.lang.Long" resetType="Group"              resetGroup="SALDO_IT_MED__TOTAAL" calculation="Sum">        <variableExpression>            <![CDATA[$F{SALDO_DUUR_TIJD}]]>        </variableExpression>    </variable>    <variable name="SALDO_IT_MEDSALDO_REFERENTIE_TIJD__SUM"              class="java.lang.Long" resetType="Group"              resetGroup="SALDO_IT_MED__TOTAAL" calculation="Sum">        <variableExpression>            <![CDATA[$F{SALDO_REFERENTIE_TIJD}]]>        </variableExpression>    </variable>    <variable name="SALDO_DUUR_TIJD__SUM__SUMMARY"              class="java.lang.Long" calculation="Sum">        <variableExpression>            <![CDATA[$F{SALDO_DUUR_TIJD}]]>        </variableExpression>    </variable>    <variable name="SALDO_REFERENTIE_TIJD__SUM__SUMMARY"              class="java.lang.Long" calculation="Sum">        <variableExpression>            <![CDATA[$F{SALDO_REFERENTIE_TIJD}]]>        </variableExpression>    </variable>    <variable name="SALDO" class="java.lang.Long">        <variableExpression>            <![CDATA[$F{SALDO_DUUR_TIJD} - $F{SALDO_REFERENTIE_TIJD}]]>        </variableExpression>    </variable>    <variable name="SALDO_TOTAL" class="java.lang.Long"              resetType="Group" resetGroup="SALDO_IT_MED__TOTAAL"              calculation="Sum">        <variableExpression>            <![CDATA[$V{SALDO}]]>        </variableExpression>    </variable>    <group name="SALDO_IT_MED__TOTAAL"           isReprintHeaderOnEachPage="true"           minHeightToStartNewPage="40">        <groupExpression>            <![CDATA[$F{SALDO_IT_MED}]]>        </groupExpression>        <groupHeader>            <band height="15">                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold"                                   mode="Opaque" x="0" y="0"                                   width="555" height="15"                                   backcolor="#BDD5EC"                                   uuid="72a5f48c-fd84-4b2e-9704-1350fd1e87a2"/>                    <textElement textAlignment="Left" verticalAlignment="Middle"/>                    <textFieldExpression>                        <![CDATA[string.valueOf($F{SALDO_IT_MED})]]>                    </textFieldExpression>                </textField>            </band>        </groupHeader>        <groupFooter>            <band height="21">                <frame>                    <reportElement mode="Opaque" x="0" y="0"                                   width="555" height="15" backcolor="#BDD5EC"                                   uuid="09d4a27b-0cb7-4cdf-ba7b-5f6805174188"/>                    <box padding="0">                        <topPen lineWidth="1.0" lineStyle="Double"                                lineColor="#0D62B2"/>                    </box>                    <textField isStretchWithOverflow="true">                        <reportElement style="Font_Italic" x="0" y="0"                                       width="130" height="15"                                       uuid="70d5281b-c79b-43bd-abcb-2023365e699d">                            <property name="com.jaspersoft.studio.unit.width"                                      value="pixel"/>                        </reportElement>                        <textFieldExpression>                            <![CDATA[string.valueOf($F{SALDO_IT_MED})]]>                        </textFieldExpression>                    </textField>                    <textField isStretchWithOverflow="true">                        <reportElement style="Font_Italic" x="130" y="0"                                       width="100" height="15"                                       uuid="64bdba19-0771-49d4-aa4a-d99e894d84f2">                            <property name="local_mesure_unitwidth" value="pixel"/>                            <property name="local_mesure_unitx" value="pixel"/>                            <property name="com.jaspersoft.studio.unit.x" value="pixel"/>                            <property name="local_mesure_unity" value="pixel"/>                            <property name="com.jaspersoft.studio.unit.y" value="px"/>                            <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                        </reportElement>                        <textElement textAlignment="Right" verticalAlignment="Middle"/>                        <textFieldExpression>                            <![CDATA[$V{SALDO_IT_MEDSALDO_DUUR_TIJD__SUM}]]>                        </textFieldExpression>                    </textField>                    <textField isStretchWithOverflow="true">                        <reportElement style="Font_Italic" x="230" y="0"                                       width="75" height="15"                                       uuid="7386087a-4bd1-41d8-b01c-05759e959eed">                            <property name="local_mesure_unity" value="pixel"/>                            <property name="local_mesure_unitwidth" value="pixel"/>                            <property name="local_mesure_unitx" value="pixel"/>                            <property name="com.jaspersoft.studio.unit.x" value="pixel"/>                            <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                        </reportElement>                        <textElement textAlignment="Right" verticalAlignment="Middle"/>                        <textFieldExpression>                            <![CDATA[$V{SALDO_IT_MEDSALDO_REFERENTIE_TIJD__SUM}]]>                        </textFieldExpression>                    </textField>                    <textField isStretchWithOverflow="true">                        <reportElement style="Font_Italic" x="305" y="1"                                       width="75" height="15"                                       uuid="d4144d42-c12f-4534-893e-6908bd58744c">                            <property name="local_mesure_unitx" value="pixel"/>                            <property name="com.jaspersoft.studio.unit.x" value="pixel"/>                        </reportElement>                        <textElement textAlignment="Right" verticalAlignment="Middle"/>                        <textFieldExpression>                            <![CDATA[$V{SALDO_IT_MED_DAGEN_SUM}]]>                        </textFieldExpression>                    </textField>                    <textField isStretchWithOverflow="true">                        <reportElement style="Font_Balance_Italic" x="380" y="1"                                       width="75" height="15"                                       uuid="b6e3a998-4b62-44fc-bb3d-1fd10acb8c68">                            <property name="local_mesure_unity" value="pixel"/>                            <property name="local_mesure_unitx" value="pixel"/>                            <property name="com.jaspersoft.studio.unit.x" value="pixel"/>                            <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                        </reportElement>                        <textElement textAlignment="Right" verticalAlignment="Middle"/>                        <textFieldExpression>                            <![CDATA[$V{SALDO_TOTAL}]]>                        </textFieldExpression>                    </textField>                </frame>            </band>        </groupFooter>    </group>    <background>        <band height="782">            <rectangle radius="4">                <reportElement stretchType="RelativeToBandHeight"                               x="0" y="0" width="555" height="782"                               forecolor="#0D62B2"                               uuid="2394b119-07cb-4be2-884c-269c62df3838"/>                <graphicElement>                    <pen lineWidth="1.0"/>                </graphicElement>            </rectangle>        </band>    </background>    <pageHeader>        <band height="36">            <textField isStretchWithOverflow="true">                <reportElement style="Font_Bold" x="0" y="8"                               width="555" height="26" forecolor="#0D62B2"                               uuid="76157a5d-a308-412a-aa72-e67f9708db25"/>                <box leftPadding="40"/>                <textElement>                    <font size="16"/>                </textElement>                <textFieldExpression>                    <![CDATA[$P{TITLE}]]>                </textFieldExpression>            </textField>            <line>                <reportElement x="535" y="12" width="8" height="8"                               forecolor="#0D62B2"                               uuid="a0898faf-870f-49fc-832e-2a2320907592"/>            </line>            <line direction="BottomUp">                <reportElement x="535" y="12" width="8" height="8"                               forecolor="#0D62B2"                               uuid="ac2d6d48-d623-4f66-aa59-b7c6a0a7ac2a"/>            </line>        </band>    </pageHeader>    <columnHeader>        <band height="23">            <frame>                <reportElement mode="Opaque" x="0" y="0" width="555" height="23"                               forecolor="#FFFFFF" backcolor="#FFFFFF"                               uuid="85350719-9e1f-41f0-bf10-53bbdf3b36fe"/>                <box padding="0">                    <topPen lineWidth="1.0" lineColor="#0D62B2"/>                    <leftPen lineWidth="0.0"/>                    <bottomPen lineWidth="1.0" lineColor="#0D62B2"/>                    <rightPen lineWidth="0.0"/>                </box>                <staticText>                    <reportElement style="Font_Bold" x="0" y="0" width="130"                                   height="23"                                   uuid="8ab1affc-dee0-438f-8882-c89e11feba68">                        <property name="com.jaspersoft.studio.unit.width"                                  value="pixel"/>                        <property name="com.jaspersoft.studio.unit.x"                                  value="pixel"/>                    </reportElement>                    <text><![CDATA[Week]]></text>                </staticText>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold" mode="Transparent"                                   x="130" y="0" width="100" height="23"                                   forecolor="#000000" backcolor="#FFFFFF"                                   uuid="9402fc18-db35-4969-9fb2-2964cab5ea43">                        <property name="com.jaspersoft.studio.unit.width"                                  value="pixel"/>                        <property name="local_mesure_unitx" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.x" value="px"/>                        <property name="local_mesure_unity" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.y" value="px"/>                    </reportElement>                    <box padding="0" topPadding="0" leftPadding="3"                         bottomPadding="0" rightPadding="3"/>                    <textElement textAlignment="Right" verticalAlignment="Middle"                                 rotation="None" markup="none">                        <paragraph lineSpacing="Single" lineSpacingSize="1.0"                                   firstLineIndent="0" leftIndent="0" rightIndent="0"                                   spacingBefore="0" spacingAfter="0" tabStopWidth="40"/>                    </textElement>                    <textFieldExpression>                        <![CDATA["%Duration%"]]>                    </textFieldExpression>                </textField>                <textField isStretchWithOverflow="true" hyperlinkType="">                    <reportElement style="Font_Bold" mode="Transparent"                                   x="230" y="0" width="75" height="23"                                   forecolor="#000000" backcolor="#FFFFFF"                                   uuid="07d9daa6-3847-495b-9f8d-06f90d11745c">                        <property name="com.jaspersoft.studio.unit.width"                                  value="pixel"/>                        <property name="local_mesure_unitx" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.x" value="px"/>                        <property name="local_mesure_unitwidth" value="pixel"/>                    </reportElement>                    <box padding="0" topPadding="0" leftPadding="3"                         bottomPadding="0" rightPadding="3"/>                    <textElement textAlignment="Right" verticalAlignment="Middle"                                 rotation="None" markup="none">                        <paragraph lineSpacing="Single" lineSpacingSize="1.0"                                   firstLineIndent="0" leftIndent="0" rightIndent="0"                                   spacingBefore="0" spacingAfter="0"                                   tabStopWidth="40"/>                    </textElement>                    <textFieldExpression><![CDATA["RefHours"]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold" mode="Transparent"                                   x="380" y="1" width="75" height="23"                                   forecolor="#000000" backcolor="#FFFFFF"                                   uuid="140bef68-7215-40f3-a842-776ea2b13635">                        <property name="local_mesure_unitwidth" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.width"                                  value="pixel"/>                        <property name="local_mesure_unitx" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.x" value="pixel"/>                        <property name="local_mesure_unity" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.y" value="px"/>                    </reportElement>                    <box padding="0" topPadding="0" leftPadding="3"                         bottomPadding="0" rightPadding="3"/>                    <textElement textAlignment="Right" verticalAlignment="Middle"                                 rotation="None" markup="none">                        <paragraph lineSpacing="Single" lineSpacingSize="1.0"                                   firstLineIndent="0" leftIndent="0" rightIndent="0"                                   spacingBefore="0" spacingAfter="0"                                   tabStopWidth="40"/>                    </textElement>                    <textFieldExpression><![CDATA["%Balance%"]]></textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold" mode="Transparent"                                   x="305" y="1" width="75" height="23"                                   forecolor="#000000" backcolor="#FFFFFF"                                   uuid="8eaf3bef-756f-4502-8258-36435bc2e783">                        <property name="local_mesure_unitx" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.x"                                  value="pixel"/>                        <property name="com.jaspersoft.studio.unit.width"                                  value="pixel"/>                    </reportElement>                    <box padding="0" topPadding="0" leftPadding="3"                         bottomPadding="0" rightPadding="3"/>                    <textElement textAlignment="Right" verticalAlignment="Middle"                                 rotation="None" markup="none">                        <paragraph lineSpacing="Single" lineSpacingSize="1.0"                                   firstLineIndent="0" leftIndent="0" rightIndent="0"                                   spacingBefore="0" spacingAfter="0" tabStopWidth="40"/>                    </textElement>                    <textFieldExpression>                        <![CDATA["%Days%"]]>                    </textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement key="" style="Font_Italic" mode="Transparent"                                   x="455" y="0" width="100" height="23"                                   forecolor="#000000" backcolor="#FFFFFF"                                   uuid="71e4886b-79d8-4cc8-9eba-8f3da3ba1d16">                        <property name="com.jaspersoft.studio.unit.width"                                  value="pixel"/>                        <property name="local_mesure_unitx" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.x"                                  value="pixel"/>                    </reportElement>                    <box padding="0" topPadding="0" leftPadding="3"                         bottomPadding="0" rightPadding="3"/>                    <textElement textAlignment="Right" verticalAlignment="Middle"                                 rotation="None" markup="none">                        <paragraph lineSpacing="Single" lineSpacingSize="1.0"                                   firstLineIndent="0" leftIndent="0" rightIndent="0"                                   spacingBefore="0" spacingAfter="0" tabStopWidth="40"/>                    </textElement>                    <textFieldExpression>                        <![CDATA["%RunningBalance%"]]>                    </textFieldExpression>                </textField>            </frame>        </band>    </columnHeader>    <detail>        <band height="15">            <textField isStretchWithOverflow="true">                <reportElement style="Font_Normal" x="0" y="0"                               width="130" height="15"                               uuid="897b6282-0fa5-4974-8901-db6273c00efa">                    <property name="com.jaspersoft.studio.unit.width"                              value="pixel"/>                </reportElement>                <textElement verticalAlignment="Middle"/>                <textFieldExpression>                    <![CDATA[$F{SALDO_WEEK}]]>                </textFieldExpression>            </textField>            <textField isStretchWithOverflow="true">                <reportElement style="Font_Normal" x="130" y="0"                               width="100" height="15"                               uuid="4774fec8-f59b-4e4f-88b5-94c662b841ae">                    <property name="local_mesure_unitwidth" value="pixel"/>                    <property name="local_mesure_unitx" value="pixel"/>                    <property name="com.jaspersoft.studio.unit.x"                              value="pixel"/>                    <property name="com.jaspersoft.studio.unit.width"                              value="pixel"/>                </reportElement>                <textElement textAlignment="Right"                             verticalAlignment="Middle"/>                <textFieldExpression>                    <![CDATA[$F{SALDO_DUUR_TIJD}]]>                </textFieldExpression>            </textField>            <textField isStretchWithOverflow="true">                <reportElement style="Font_Normal" x="230" y="0"                               width="75" height="15"                               uuid="ffb7e711-a8e9-4f37-866e-82983c91a5dd">                    <property name="local_mesure_unitwidth" value="pixel"/>                    <property name="local_mesure_unitx" value="pixel"/>                    <property name="com.jaspersoft.studio.unit.x"                              value="pixel"/>                    <property name="com.jaspersoft.studio.unit.width"                              value="pixel"/>                </reportElement>                <textElement textAlignment="Right"                             verticalAlignment="Middle"/>                <textFieldExpression>                    <![CDATA[$F{SALDO_REFERENTIE_TIJD}+ "test"]]>                </textFieldExpression>            </textField>            <textField isStretchWithOverflow="true">                <reportElement key="" style="Font_Balance" x="380" y="0"                               width="75" height="15"                               uuid="33e9cba8-8915-48ad-94b0-7043295997fd">                    <property name="local_mesure_unitwidth" value="pixel"/>                    <property name="local_mesure_unitx" value="pixel"/>                    <property name="com.jaspersoft.studio.unit.x"                              value="pixel"/>                    <property name="com.jaspersoft.studio.unit.width"                              value="pixel"/>                </reportElement>                <textElement textAlignment="Right"                             verticalAlignment="Middle"/>                <textFieldExpression>                    <![CDATA[$V{SALDO}]]>                </textFieldExpression>            </textField>            <textField isStretchWithOverflow="true">                <reportElement style="Font_Normal" x="305" y="0"                               width="75" height="15"                               uuid="35dce027-eba3-4c7c-ab50-c7ab9e2c740d">                    <property name="local_mesure_unitx" value="pixel"/>                    <property name="com.jaspersoft.studio.unit.x"                              value="pixel"/>                    <property name="com.jaspersoft.studio.unit.width"                              value="pixel"/>                </reportElement>                <textElement textAlignment="Right"                             verticalAlignment="Middle"/>                <textFieldExpression>                    <![CDATA[$F{SALDO_DAGEN}]]>                </textFieldExpression>            </textField>            <textField isStretchWithOverflow="true">                <reportElement style="Font_Running_Balance"                               x="455" y="0" width="100" height="15"                               uuid="adf538d2-f004-4625-82cd-5cb1e8fdbc6b">                    <property name="local_mesure_unitwidth" value="pixel"/>                    <property name="local_mesure_unitx" value="pixel"/>                    <property name="com.jaspersoft.studio.unit.x"                              value="pixel"/>                    <property name="com.jaspersoft.studio.unit.width"                              value="pixel"/>                </reportElement>                <box>                    <leftPen lineWidth="0.0" lineColor="#0D62B2"/>                </box>                <textElement textAlignment="Right"                    verticalAlignment="Middle"/>                <textFieldExpression>                    <![CDATA[$V{SALDO_TOTAL}]]>                </textFieldExpression>            </textField>        </band>    </detail>    <pageFooter>        <band height="19">            <property name="local_mesure_unitheight" value="pixel"/>            <property name="com.jaspersoft.studio.unit.height" value="px"/>            <frame>                <reportElement stretchType="RelativeToBandHeight"                               x="0" y="0" width="555" height="19"                               uuid="983630ca-72e3-4dca-810c-21e82873bd6d">                    <property name="local_mesure_unitheight" value="pixel"/>                    <property name="com.jaspersoft.studio.unit.height"                              value="px"/>                </reportElement>                <box padding="0">                    <topPen lineWidth="1.0" lineColor="#0D62B2"/>                </box>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Normal" x="455" y="3"                                   width="100" height="14"                                   uuid="d126a519-03ad-4aca-9e4f-289fa914660e">                        <property name="com.jaspersoft.studio.unit.width"                                  value="pixel"/>                    </reportElement>                    <textElement textAlignment="Right"/>                    <textFieldExpression>                        <![CDATA["%PAGE% " + $V{PAGE_NUMBER}]]>                    </textFieldExpression>                </textField>            </frame>        </band>    </pageFooter>    <summary>        <band height="15">            <frame>                <reportElement x="0" y="0" width="555" height="15"                               uuid="a1b47b44-6150-40c1-a150-99afed0ea94e"/>                <box padding="0">                    <topPen lineWidth="1.0" lineColor="#0D62B2"/>                    <bottomPen lineWidth="1.0" lineColor="#0D62B2"/>                </box>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold" mode="Transparent"                                   x="0" y="0" width="130" height="15"                                   forecolor="#000000" backcolor="#FFFFFF"                                   uuid="96b121be-39b4-4998-bc53-e5c16f17f0db"/>                    <box padding="0" topPadding="0" leftPadding="3"                         bottomPadding="0" rightPadding="3"/>                    <textElement textAlignment="Left" verticalAlignment="Middle"                                 rotation="None" markup="none">                        <paragraph lineSpacing="Single" lineSpacingSize="1.0"                                   firstLineIndent="0" leftIndent="0"                                   rightIndent="0" spacingBefore="0"                                   spacingAfter="0" tabStopWidth="40"/>                    </textElement>                    <textFieldExpression>                        <![CDATA["%EndTotal%"]]>                    </textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold" x="130" y="0"                                   width="100" height="15"                                   uuid="a79032d4-9f81-4ecb-b45d-a9adfbbe2df0">                        <property name="com.jaspersoft.studio.unit.x"                                  value="px"/>                    </reportElement>                    <textElement textAlignment="Right" verticalAlignment="Middle"/>                    <textFieldExpression>                        <![CDATA[$V{SALDO_DUUR_TIJD__SUM__SUMMARY}]]>                    </textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold" x="230" y="0"                                   width="75" height="15"                                   uuid="103a298b-0daf-42b5-863a-9b7a09f7b09d">                        <property name="local_mesure_unity" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.y" value="px"/>                    </reportElement>                    <textElement textAlignment="Right" verticalAlignment="Middle"/>                    <textFieldExpression>                        <![CDATA[$V{SALDO_REFERENTIE_TIJD__SUM__SUMMARY}]]>                    </textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold" x="305" y="1"                                   width="75" height="15"                                   uuid="f59b6861-a713-4297-be8c-3335c2934c39">                        <property name="local_mesure_unitx" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.x"                                  value="px"/>                        <property name="local_mesure_unitwidth"                                  value="pixel"/>                        <property name="com.jaspersoft.studio.unit.width"                                  value="px"/>                    </reportElement>                    <textElement textAlignment="Right"                                 verticalAlignment="Middle"/>                    <textFieldExpression>                        <![CDATA[$V{SALDO_DAGEN_SUM_SUMMARY}]]>                    </textFieldExpression>                </textField>                <textField isStretchWithOverflow="true">                    <reportElement style="Font_Bold" x="380" y="1"                                   width="75" height="15"                                   uuid="fa37d559-a0ce-482b-9c9e-52df73ad63ac">                        <property name="local_mesure_unity" value="pixel"/>                        <property name="local_mesure_unitx" value="pixel"/>                        <property name="com.jaspersoft.studio.unit.x"                                  value="px"/>                        <property name="com.jaspersoft.studio.unit.width"                                  value="px"/>                    </reportElement>                    <textElement textAlignment="Right" verticalAlignment="Middle"/>                    <textFieldExpression>                        <![CDATA[$V{SALDO_DUUR_TIJD__SUM__SUMMARY} - $V{SALDO_REFERENTIE_TIJD__SUM__SUMMARY}]]>                    </textFieldExpression>                </textField>            </frame>        </band>    </summary></jasperReport>[/code]

     

  10. try changing your query as below and see if it works

    select to_char(afip.periodo) periodo, count(afip.importe) cant , sum(afip.importe) totalfrom nominaos afip, maestroos mos JOIN provincia_zona pz ON mos.provincia_id = pz.provincia_idwhere afip.periodo >=to_char($P{DESDE}::date, 'yyyyMM'::varchar)::int     and afip.periodo <=to_char($P{HASTA}::date, 'yyyyMM'::varchar)::int and afip.zona = pz.zonagroup by to_char(afip.periodo)order by to_char(afip.periodo)

  11. Check the web services guide, it looks like it needs a timezone too. 

    https://docs.tibco.com/pub/js-jrs/6.1.2/doc/pdf/JasperReports-Server-Web-Services-Guide.pdf

    "Both date-only and timestamp fields are given in the ISO date-time format such as 1997-01- 01T04:05:06+02:00. For database columns that store a time and date that includes a time zone, such as “timestamp with time zone” in PostgreSQL, the result is not guaranteed to be in the same timezone as stored in the database. These dates and times are converted to the server’s time zone."

×
×
  • Create New...