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. This case has already been logged by us to TIBCO support.

    The only suggestion they provided us was to modify the logging formats. Filtering the access log.

    Remove %s from the following in server.xml under the tomcat directory

    <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" startStopThreads="-1"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t "%r" %s %b"></Valve> </Host>

    Once this is done, instead of logging the clear text password, it will log some id into the logs.

  2. First thing, you are supposed to get an ArithmeticException. Caused by: java.lang.ArithmeticException: / by zero

    I'm not sure which datatype you are using. 

    You could use a simple terinary expression to display zero when such calculation happens.

    $F{SECONDVAR}.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : $F{FIRSTVAR}.divide( $F{SECONDVAR})

     

  3. I think you have left the Transparent checkbox checked on the conditionalStyle. 

    <?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="color" pageWidth="595" pageHeight="842" columnWidth="555"              leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"              uuid="064063bc-a18b-49e3-a8c6-8679cddd63fb">    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>    <style name="Style1">        <conditionalStyle>            <conditionExpression><![CDATA[$F{ID}.contains("OT")]]></conditionExpression>            <style mode="Opaque" backcolor="#FF0400"/>        </conditionalStyle>    </style>    <queryString>        <![CDATA[select 'OT(12:02 PM - 4:05 PM)' as ID from dualunion allselect '12:00 PM - 4:00 PM' as ID from dual]]>    </queryString>    <field name="ID" class="java.lang.String"/>    <background>        <band splitType="Stretch"/>    </background>    <detail>        <band height="35" splitType="Stretch">            <textField>                <reportElement style="Style1" x="0" y="0" width="180" height="30"                               uuid="3cfb97fe-f626-4238-9c06-6fa831c1a04a"/>                <textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>            </textField>        </band>    </detail></jasperReport>[/code]
  4. There is a property in the Jasper Config Reference, but not sure how to use it. http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.jdbc.holdability

    I will be contacting the TIBCO support (create a ticket with them and see what they say). 

    Tried in both the following ways

    <property name="net.sf.jasperreports.jdbc.holdability.hold"/>

    <property name="net.sf.jasperreports.jdbc.holdability" value="hold"/>

    failed as below:

    net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Unable to get next record from result set.
        at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:548)
        at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:523)
        at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:404)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Caused by: net.sf.jasperreports.engine.JRException: Unable to get next record from result set.
        at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:145)
        at net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:1538)
        at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1387)
        at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1366)
        at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1147)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)
        at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:586)
        at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.sql.SQLException: ORA-08103: object no longer exists

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
        at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:1073)
        at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:359)
        at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:263)
        at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:141)
        ... 8 more
     

  5. These export options are available. 

    jasperreports-server-7.1.0apache-tomcatwebappsjasperserver-proWEB-INFflowsviewReportBeans.xml

    <entry key="pdf" value-ref="pdfExporterConfiguration"/>        <entry key="xls" value-ref="xlsExporterConfiguration"/>        <entry key="xlsNoPag" value-ref="xlsNoPaginationExporterConfiguration"/>        <entry key="csv" value-ref="csvExporterConfiguration"/>        <entry key="docx" value-ref="docxExporterConfiguration"/>        <entry key="rtf" value-ref="rtfExporterConfiguration"/>        <entry key="odt" value-ref="odtExporterConfiguration"/>        <entry key="ods" value-ref="odsExporterConfiguration"/>        <entry key="xlsx" value-ref="xlsxExporterConfiguration"/>        <entry key="xlsxNoPag" value-ref="xlsxNoPaginationExporterConfiguration"/>        <entry key="pptx" value-ref="pptxExporterConfiguration"/>[/code]
  6. Try this way: 

    Create a boolean parameter in the report and send in Order by clause using that boolean.

    If the boolean is set to true, then it will allow custom sort order. If set to false, then it will do sort from table element.

    <?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="customSort"              pageWidth="842" pageHeight="595" orientation="Landscape"              columnWidth="802"              leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"              uuid="0e689ce3-d367-4825-985c-78a782d64436">    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>    <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="#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_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="newData" uuid="a11458d4-7475-4b3a-9ba0-21a7bb4cd1b1">        <parameter name="customSort" class="java.lang.Boolean"/>        <parameter name="sortOrder" class="java.lang.String">            <defaultValueExpression>                <![CDATA[$P{customSort} ?  " Order by business_date desc" : " "]]>            </defaultValueExpression>        </parameter>        <queryString language="SQL">            <![CDATA[select * from (select  trunc(sysdate+1) + level -1 as business_date, ('ID'|| level ) as IDfrom    dualconnect by sysdate + level -1 < sysdate + 30 )$P!{sortOrder}]]>        </queryString>        <field name="BUSINESS_DATE" class="java.sql.Timestamp"/>        <field name="ID" class="java.lang.String"/>    </subDataset>    <parameter name="customSort" class="java.lang.Boolean"/>    <queryString>        <![CDATA[select * from dual]]>    </queryString>    <field name="DUMMY" class="java.lang.String"/>    <background>        <band splitType="Stretch"/>    </background>    <summary>        <band height="40" splitType="Stretch">            <componentElement>                <reportElement x="0" y="0" width="802" height="40"                               uuid="808644a4-e0b1-4e78-a553-4502e987c8f8">                    <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">                    <datasetRun subDataset="newData" uuid="5c268e98-d70c-4264-83a0-c645fa1a07f5">                        <datasetParameter name="customSort">                            <datasetParameterExpression>                                <![CDATA[$P{customSort}]]>                            </datasetParameterExpression>                        </datasetParameter>                        <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>                    </datasetRun>                    <jr:column width="180" uuid="96299c1f-63e8-4dc4-a191-7138dd8d9860">                        <property name="com.jaspersoft.studio.unit.width"  value="pixel"/>                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>                        <jr:columnHeader style="Table_CH" height="20">                            <property name="com.jaspersoft.studio.unit.width"  value="px"/>                            <property name="com.jaspersoft.studio.unit.height" value="px"/>                            <staticText>                                <reportElement x="0" y="0" width="180" height="20"                                               uuid="0be05bd5-da0d-41fe-b829-96eb3bf62100"/>                                <text><![CDATA[bUSINESS_DATE]]></text>                            </staticText>                        </jr:columnHeader>                        <jr:detailCell style="Table_TD" height="20">                            <property name="com.jaspersoft.studio.unit.height" value="px"/>                            <textField>                                <reportElement x="0" y="0" width="180" height="20"                                               uuid="edcf3142-7ea3-4d5b-9480-942ac1ddf374"/>                                <textFieldExpression>                                    <![CDATA[$F{BUSINESS_DATE}]]>                                </textFieldExpression>                            </textField>                        </jr:detailCell>                    </jr:column>                    <jr:column width="100" uuid="5c9e03a3-fbd7-4808-8c1c-d0705ddfb5ae">                        <jr:columnHeader style="Table_CH" height="20">                            <property name="com.jaspersoft.studio.unit.height" value="px"/>                            <staticText>                                <reportElement x="0" y="0" width="100" height="20"                                               uuid="80a6ca5c-c77c-4b00-a610-3925829ce71e"/>                                <text><![CDATA[iD]]></text>                            </staticText>                        </jr:columnHeader>                        <jr:detailCell style="Table_TD" height="20">                            <property name="com.jaspersoft.studio.unit.height" value="px"/>                            <textField>                                <reportElement x="0" y="0" width="100" height="20"                                               uuid="466c1b18-f818-4d02-ad23-5868a3a79a99"/>                                <textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>                            </textField>                        </jr:detailCell>                    </jr:column>                </jr:table>            </componentElement>        </band>    </summary></jasperReport>[/code]

     

  7. Any GTT with "ON COMMIT DELETE ROWS" is not getting the next row from the dataset. 

    I have tried changing the GTT with on commit preserve and it works. yes it is frustrating and thats how Jasper is working. 

    I believe its not Jasper committing, I think its Jasper making the session Inactive once it is done fetching the rows.

    I had to change some of the GTT's to perform this functionality... I can say one thing check for dependencies before changing the GTT. 

               select * from all_dependencies ad
               where ad.referenced_name = 'GTT_NAME' ;

  8. As you said Query would be the best option if you want to count the minutes and seconds diff as per your requirement

    Jasper has built in functions. I believe it would be useful to consider in this case. 

    NETWORKDAYS(new Date(),new SimpleDateFormat("mm/dd/yyyy").parse("07/01/2018")) 

  9. I'm currently working on a large report, which needs to generate 6000 pages. 

    The report works on plsql datasource based on a ORACLE_REF_CURSOR. 

    After executing the plsql, the ORACLE_REF_CURSOR holds the data in the form of a temp table and the report depends on this temp table. 

    The pslql executes in 5 minutes and generates the temp table, but the Jasper report on the Server takes enormous amount of time (does not complete filling even after 2 hours). 

    Tried tweaking heap memory. Current settings are -Xms1024m -Xmx8192m. 

    and also added the virtulizer options as below

        <property name="net.sf.jasperreports.virtualizer.files.delete.on.exit" value="TRUE"/>
        <property name="net.sf.jasperreports.virtual.page.element.size" value="-1"/> 

    Any suggestions in improving the performance of this report would be appreciated..

×
×
  • Create New...