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

Security Advisories

Downloads

Posts posted by reportdev

  1. Wow... This is a nice idea, if implemented successfully. 

    I have been reading about the hot deployment techniques on tomcat and it should be applicable for jboss too. 

    If your problem is bringing down the application server for deployments, then it can be resolved by using hot deployments.

    try Jrebel or Bamboo. 

     

  2. If you are using a subreport or table element, Click on the Element and Navigate to Properties pane -> Dataset Options

    In the dataset options, Parameters button should have these mapping options. 

    Check this sample jrxml that I have created

    <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.4.0.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="dataset" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="41ad4074-cb41-4a31-9d0a-7429b1f4304f">    <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="SubDataset" uuid="28c1570d-9e49-44f1-ba39-75a28824b5d2">        <property name="com.jaspersoft.studio.data.sql.tables" value=""/>        <property name="com.jaspersoft.studio.data.defaultdataadapter" value="PRODSUP"/>        <parameter name="start_date" class="java.sql.Date"/>        <parameter name="end_date" class="java.sql.Date"/>        <queryString language="SQL">            <![CDATA[select * from dual]]>        </queryString>        <field name="DUMMY" class="java.lang.String"/>    </subDataset>    <parameter name="start_date" class="java.sql.Date"/>    <parameter name="end_date" class="java.sql.Date"/>    <queryString>        <![CDATA[select * from dual]]>    </queryString>    <field name="DUMMY" class="java.lang.String"/>    <background>        <band splitType="Stretch"/>    </background>    <columnHeader>        <band height="20" splitType="Stretch">            <staticText>                <reportElement x="0" y="0" width="80" height="20" uuid="a73fc6e4-9651-435d-8b29-9f09ed26e177"/>                <text><![CDATA[start_date]]></text>            </staticText>            <staticText>                <reportElement x="80" y="0" width="100" height="20" uuid="5c6c670f-062d-40e9-a799-70b38822b9ba"/>                <text><![CDATA[end_date]]></text>            </staticText>        </band>    </columnHeader>    <detail>        <band height="19" splitType="Stretch">            <textField pattern="MM/dd/yyyy">                <reportElement x="0" y="0" width="80" height="19" uuid="d1173bd3-c4ac-4c64-828e-7f496cdcc33e">                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>                </reportElement>                <textFieldExpression><![CDATA[$P{start_date}]]></textFieldExpression>            </textField>            <textField pattern="MM/dd/yyyy">                <reportElement x="80" y="0" width="100" height="19" uuid="e413e867-b220-43d7-a124-039bffc39cc5"/>                <textFieldExpression><![CDATA[$P{end_date}]]></textFieldExpression>            </textField>        </band>    </detail>    <summary>        <band height="60" splitType="Stretch">            <componentElement>                <reportElement x="0" y="20" width="200" height="40" uuid="a7b41590-80d0-4153-8c4a-2ca50e253a9c">                    <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="SubDataset" uuid="d6ff833e-fc16-4ebe-b4eb-414167f26146">                        <datasetParameter name="start_date">                            <datasetParameterExpression><![CDATA[$P{start_date}]]></datasetParameterExpression>                        </datasetParameter>                        <datasetParameter name="end_date">                            <datasetParameterExpression><![CDATA[$P{end_date}]]></datasetParameterExpression>                        </datasetParameter>                        <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>                    </datasetRun>                    <jr:column width="100" uuid="83c0f516-06ae-49d3-9a94-6c186059493f">                        <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>                        <jr:columnHeader style="Table_CH" height="20" rowSpan="1">                            <property name="com.jaspersoft.studio.unit.height" value="px"/>                            <staticText>                                <reportElement x="0" y="0" width="100" height="20" uuid="89208895-8a53-411e-83a7-fbc538b59156"/>                                <text><![CDATA[start_date]]></text>                            </staticText>                        </jr:columnHeader>                        <jr:detailCell style="Table_TD" height="20">                            <property name="com.jaspersoft.studio.unit.height" value="px"/>                            <textField pattern="MM/dd/yyyy">                                <reportElement x="0" y="0" width="100" height="20" uuid="dc074a58-46d0-4869-8659-3cfbaa74f38a"/>                                <textFieldExpression><![CDATA[$P{start_date}]]></textFieldExpression>                            </textField>                        </jr:detailCell>                    </jr:column>                    <jr:column width="100" uuid="1fee413f-54e7-473e-9cfa-58f517c6fa0a">                        <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>                        <jr:columnHeader style="Table_CH" height="20" rowSpan="1">                            <staticText>                                <reportElement x="0" y="0" width="100" height="20" uuid="afc24d09-e545-4896-ae94-9647708029f4"/>                                <text><![CDATA[end_date]]></text>                            </staticText>                        </jr:columnHeader>                        <jr:detailCell style="Table_TD" height="20">                            <textField pattern="MM/dd/yyyy">                                <reportElement x="0" y="0" width="100" height="20" uuid="57448548-15d5-4b6c-872b-1d06347fcf9b"/>                                <textFieldExpression><![CDATA[$P{end_date}]]></textFieldExpression>                            </textField>                        </jr:detailCell>                    </jr:column>                </jr:table>            </componentElement>            <staticText>                <reportElement x="0" y="0" width="100" height="19" uuid="e41bfa2f-35af-4884-8218-3a78f95175ac"/>                <text><![CDATA[from SubDataset]]></text>            </staticText>        </band>    </summary></jasperReport>[/code]

     

  3. Oracle reports instance should have a tool called rwconverter.exe, through which you can get the SQL out of the Oracle reports.

    thats the only salvageable part from the oracle reports. There is no tool which can  directly convert rdf to jrxml's. 

    From the effort standpoint, you are looking at designing the reports from scratch. 

  4.     <style name="Style1">        <conditionalStyle>            <conditionExpression><![CDATA[DAYS($F{EXPIRY_DATE}, new Date() ) < 30 ? true : false]]></conditionExpression>            <style mode="Opaque" backcolor="#FF0400"/>        </conditionalStyle>[/code]

    Use $F{EXPIRY_DATE}, new Date() ) < 30 ? true : false as an expression. 

    Here is the entire jrxml

    <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.4.0.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="style" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="55132001-98e6-4a24-9027-0b028c086f0f">    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>    <style name="Style1">        <conditionalStyle>            <conditionExpression><![CDATA[DAYS($F{EXPIRY_DATE}, new Date() ) < 30 ? true : false]]></conditionExpression>            <style mode="Opaque" backcolor="#FF0400"/>        </conditionalStyle>    </style>    <queryString>        <![CDATA[select to_date('10/02/2017', 'MM/dd/yyyy') as expiry_date, 'PRODUCT1' as ID from dual union allselect to_date('09/15/2017', 'MM/dd/yyyy') as expiry_date, 'PRODUCT2' as ID from dual union allselect to_date('06/30/2017', 'MM/dd/yyyy') as expiry_date, 'PRODUCT3' as ID from dual]]>    </queryString>    <field name="EXPIRY_DATE" class="java.sql.Timestamp"/>    <field name="ID" class="java.lang.String"/>    <background>        <band splitType="Stretch"/>    </background>    <columnHeader>        <band height="30" splitType="Stretch">            <staticText>                <reportElement x="0" y="0" width="80" height="30" uuid="1347b6a7-b19a-49e5-8bd2-33c66e12417e"/>                <text><![CDATA[iD]]></text>            </staticText>            <staticText>                <reportElement x="80" y="0" width="100" height="30" uuid="8cd28213-afae-4ef0-b506-938f0d5a9996"/>                <text><![CDATA[EXPIRY_DATE]]></text>            </staticText>        </band>    </columnHeader>    <detail>        <band height="35" splitType="Stretch">            <textField>                <reportElement x="0" y="0" width="80" height="30" uuid="9aeaa559-cb74-4e54-9785-683c8326523f"/>                <textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>            </textField>            <textField>                <reportElement style="Style1" x="80" y="0" width="100" height="30" uuid="b5fec6d7-a50d-4348-8b1f-a253065858cc"/>                <textFieldExpression><![CDATA[$F{EXPIRY_DATE}]]></textFieldExpression>            </textField>            <textField>                <reportElement x="180" y="0" width="100" height="30" uuid="7ec6a95d-e06b-4b82-a279-20b7ba4df41c"/>                <textFieldExpression><![CDATA[DAYS($F{EXPIRY_DATE}, new Date() ) < 30 ? true : false]]></textFieldExpression>            </textField>        </band>    </detail></jasperReport>[/code]

     

×
×
  • Create New...