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

NOjeil

Members
  • Posts

    20
  • 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 NOjeil

  1. Dear All

    i was using jdt-compiler-3.1.1.jar with jasperreports-javaflow-6.1.1 under Weblogic and Websphere
    After i moved to jasperreports-javaflow-6.13.0 i am getting "NoSuchMethodError: org.eclipse.jdt.internal.compiler.Compiler" because the current jdt-compiler does not have the constructor "public Compiler(INameEnvironment environment, IErrorHandlingPolicy policy, CompilerOptions options , ICompilerRequestor requestor, IProblemFactory problemFactory)" which is lately used in the upgraded jasper jar
    Can you please advise which jar can replace the jdt-compiler-3.1.1.jar

  2. Dear All,

    We are facing an infinite loop issue upon trying to retrieve a report having a field of type date in the header band of the report where the size of this element is less than the size of its data content, in case we  will increase the size of this input the report will be generated propelry
    This issue is appearing under all jasperSoft releases ( release 6.4.0 and lower)
    Is it possible to fix it through the code of jasper instead of fixing it manually
    Below is the related jrxml , you can test it under any oracle DB , the prolematic field in the header is 'DATE_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="fms_cr_f_p" pageWidth="700" pageHeight="850" whenNoDataType="AllSectionsNoDetail" columnWidth="664" leftMargin="18" rightMargin="18" topMargin="18" bottomMargin="18" uuid="ff0fcf35-b5e0-4eef-87de-0eea1a89f061">
    <property name="ireport.zoom" value="1.331000000000003"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <property name="com.jaspersoft.studio.unit." value="pixel"/>
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="IMAL141_DEV_O11"/>
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
    <queryString>
    <![CDATA[sELECT  SYSDATE AS DATE_CREATED ,'J' AS CUSTOMER_NAME FROM DUAL]]>
    </queryString>
    <field name="DATE_CREATED" class="java.sql.Timestamp">
    <property name="lblname" value="fmsappl_date_created"/>
    <property name="lbltype" value="java.sql.Timestamp"/>
    </field>
    <field name="CUSTOMER_NAME" class="java.lang.String">
    <property name="lblname" value="cif_customer_name"/>
    <property name="lbltype" value="java.lang.String"/>
    </field>
    <pageHeader>
    <band height="80" splitType="Stretch">
    <textField isStretchWithOverflow="true" evaluationTime="Auto" isBlankWhenNull="true">
    <reportElement x="45" y="53" width="40" height="11" forecolor="#000000" uuid="3d18efb2-0aae-45d6-9267-00ea3676624a"/>
    <textElement textAlignment="Left">
    <font fontName="Arial" size="8" isPdfEmbedded="false"/>
    </textElement>
    <textFieldExpression><![CDATA[$F{DATE_CREATED}]]></textFieldExpression>
    </textField>
    </band>
    </pageHeader>
    <detail>
    <band height="734" splitType="Stretch">
    <textField isStretchWithOverflow="true" isBlankWhenNull="true">
    <reportElement x="109" y="23" width="174" height="11" forecolor="#000000" uuid="f553e122-d664-4df5-916c-3ff67d3f9d68"/>
    <textElement textAlignment="Left">
    <font fontName="Arial" size="8" isPdfEmbedded="false"/>
    </textElement>
    <textFieldExpression><![CDATA[$F{CUSTOMER_NAME}]]></textFieldExpression>
    </textField>
    </band>
    </detail>
    </jasperReport>
     

    Thank you

  3. Dear All ,

    Currently I am using the property 'setWorkbookTemplate' to append a generated report to an existing 'XLS' file using the JRXlsExporter

    Now I need to do the same with a 'XLSX' file ,is there any similar property to use  with the JRXlsxExporter since i am trying the below but it is not working

                    JRXlsxExporter exporter = new JRXlsxExporter();


                    exporter.setWorkbookTemplate(destinationFilePath);


                    exporter.setWorkbookTemplateKeepSheets(true);

    Regards,

  4. Dear All ,

    I have an excel file containing three sheets where the third sheet is a mapping between the first two sheets ( for example in the third sheet we wil put that the cell1 of the column1 will read its data as following


    (cell1,column1) of sheet 3 = (cell1,column1) of sheet1 + (cell1,column4) of sheet 2


    In my case i am using the following code to fill my report in a specific excel file


         exporter1.setWorkbookTemplate(destinationXlsFilePath);

         exporter1.setWorkbookTemplateKeepSheets(true);

    The problem is that the report will be loaded in the last sheet  automatically (in this example the report will be loaded in the fourth sheet)  but my target is to put it in the second sheet in order to have the calculation in the third sheet


    Is it possible when exporting a report using the JRXlsExporter to specify on which sheet we want to load the report ?
     

    Thank you in advance,

  5. Dear All ,

    I am calling the following 
         jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection);
    Is there a possibility to check if the resultSet of the main data set is returning data or no without using the property 'When no data' at the level of the report ?
    May we  find  a property returned by the 'parameters'  after the report execution to check this point ?

    Thank you in advance,

     

  6. Hello Kris ,

    Thank you for your reply but do you mean that the only soluton is to adjust the jrxml and this problem can not be fixed with the code
    I am just asking you this question because I have more than 100 jrxml and it will take time to re-align all the textfield

    Thank you

  7. Dear All ,

    When exporting a  report in csv fomat I am getting an extra commas between the values .I read that these extra commas appears if the text fields alignement is not the same ; if i adjust the alignment the report will work fine , but my problem is that i am generating the report from java using the jasperReport library as following


                JRAbstractExporter exporter = new JRCsvExporter();
                exporter.setParameter(JRCsvExporterParameter.JASPER_PRINT, jasperPrint);
                exporter.setParameter(JRCsvExporterParameter.OUTPUT_STREAM, byteArray);
                exporter.setParameter(JRCsvExporterParameter.FIELD_DELIMITER, ",");
                exporter.exportReport();
     

    Do you have any idea how to fix the above piece of code in order to not display the extra commas in cvs format and  without changing the alignement in the jrxml ?

    Thank you in advance,

  8. Dear All ,

    We need to have a calculation type named 'Cumulative sum' where
       * The first row  of the column should contain the Sum of all “Cash Holding”
       * The other rows should contain the calculated value of the following formula  :  Cumulative sum (current row) = Cumulative Sum (of row – 1 ) + Cash Holding (of current row) - Amount (of current row)

    converted-file.png.94fb6e3cc430d320c687d777c7543bb8.png


    Is it possible to have this calculation type or something equivalent that can fix our problem discribed above

    Thank you in advance ,

  9. Dear Team ,

    We are facing the following issues

    • We are not able to display pie chart percentage in decimal values
    • Also when we are using expression to evaluate the decimal percentage.The sum of the all VALUE fields is not computed before evaluating the whole expression in the chart. Where SUM_OF_ VALUE will change with each new field and then the percentage evaluate is wrong.

    Expression= (($F{VALUE}.multiply(new BigDecimal("100") )).divide( $V{SUM_OF_ VALUE},2, java.math.RoundingMode.HALF_UP))+ "%"

    Example:

    Field Number

    Value

    1

    35

    2

    47

    3

    65

     

     

    For 1st Field percentage is 100% (Value of 1st field)*100 / (Sum Of All Fields) =(35*100)/35 = 100 (Wrong percentage must be 23.80 because the total sum is not correct)
    For 2nd Field percentage is 57.31% (Value of 2nd field)*100 / (Sum Of All Fields) =(47*100)/82 = 57.31 (Wrong percentage must be 31.97 because the total sum is not correct)
    For 3rd Field percentage is 57.31% (Value of 3rd field)*100 / (Sum Of All Fields) =(65*100)/147 = 44.21 (Correct because the total sum is correct )

    Thank you

  10. Thank you abhimanyu.prasad ,but the attribute 'AllSectionsNoDetail' will not help me in my case since the detail band can contains data  ,images , table headers and all these elements will appears if the report query does not return data
    I fixed it by adding a property to the japserDesign fields and when getting the jasperPrint  I looped it to check if this property exists for a jasper Print element, if it exists it means that the query of the report returns data else the report query does not return data

     

  11. Dear All ,

    I am calling the following code in order to get the jasperPrint object from the jasperReport
             jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection);
    My question is how to check if the resultSet of the jasperReport returned data or no
    Note the report may contains header , footer and labels so i can not check the pages size of the jasperPrint object

    Thank you in advance,

  12. Hello All ,

    I have a jasperDesign object where i am looping the elements of the details band and i am filling the properties map of a specific  JRTextField as following

    JRTextField textField = (JRTextField) element;
     textField.getPropertiesMap().setProperty("PropName","PropVal");

    After compiling the jasperDesign  and getting the JasperPrint object , i looped the elements of the JasperPrint but when i retrieved the value of the previous texfield wich is now a JRTemplatePrintText object ,i found the properties map is null

    My question is how can i set a property for a specific element in jasperDesign and get this value from  the jasperPrint ?

    Thank you in advance

     

     

  13. When trying to execute a report containing a jr:table using JasperFillManager.fillReport(JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource)
    where the dataSource is : JRResultSetDataSource rsDs=new JRResultSetDataSource(rs); new JRResultSetDataSource(rs) ,i get the following error
                 net.sf.jasperreports.engine.query.JRJdbcQueryExecuter <init>
                 WARNING: The supplied java.sql.Connection object is null.

    Note that this error does not appear in case of a free form report, it is only appear if we have a jr:table
    below is my piece of code :
                String sql="select ... from... where...";
                ResultSet rs = stmt.executeQuery(sql);
                JRResultSetDataSource rsDs=new JRResultSetDataSource(rs);
                jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, rsDs);

    Please can anyone help ?

×
×
  • Create New...