Jump to content

sulaiman2043

Members
  • Posts

    8
  • Joined

  • Last visited

  • Days Won

    1

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by sulaiman2043

  1. I have also tried with this

    $F{RATE} == null ? new BigDecimal(0.0000) : $F{RATE}

    and this $F{RATE} == null ? java.math.BigDecimal.valueOf(0.0000) : $F{RATE} but still no change...I also think there should be not an issue with this but still i am stuck into this.

  2. I am having two issues in jasper report.

     

    1- i am using an if condition to set a value of a text field if null found for e.g. $F{RATE}.equals(null) ? new BigDecimal(0.0000) : $F{RATE}. and when i run the report it show blank rather showing 0.0000. Is it like this to set the value or is there anyother way around to set the value.

     

    2- when i set the textfieldExpression to set the data type it doesn't set it. when i manually define in xml then it is working fine. but after that if i move any text field or any change any element in reoprt that dataype just been removed automatically. Is it a bug in ireport or what?

     

    I am just stuck into these problems.



    Post Edited by sulaiman2043 at 10/19/2011 09:58
  3. i have created a master report and a sub report. I have written the code in jsp to call the master report but it gives an error.Error

    Error Loading object from file: "path where the sub report resides".

    plz help me out if i am doing something wrong.

     jasperdesign = JasperManager.loadXmlDesign(getServletConfig().getServletContext().getRealPath("/reports/VoucherReport.jrxml"));
      jasperReport = JasperCompileManager.compileReport(jasperdesign);
         
          HashMap map = new HashMap();
          map.put("myParam",voucherId);       
           jasperPrint = JasperFillManager.fillReport(jasperReport, map, con); 
          JasperManager.printReportToPdfFile(jasperPrint,getServletConfig().getServletContext().getRealPath("/reports/myReport.pdf"));

     

    it is throwing an exception on jasper print . plz help me out. need a sloution for this

  4. hi,

    i have made a report in ireport 3.7.2 it works fine when i run from a jdeveloper as a page calls the report. but when i deploy on a Tomcat 5.5.1.7 it throws me an exception....

    org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 46 in the jsp file: /FAS/VoucherReport.jspGenerated servlet error:VoucherReport cannot be resolved to a typeAn error occurred at line: 46 in the jsp file: /FAS/VoucherReport.jspGenerated servlet error:VoucherReport cannot be resolved to a type	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

     

    root cause

    org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 46 in the jsp file: /FAS/VoucherReport.jspGenerated servlet error:VoucherReport cannot be resolved to a typeAn error occurred at line: 46 in the jsp file: /FAS/VoucherReport.jspGenerated servlet error:VoucherReport cannot be resolved to a type	org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)	org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)	org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)	org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)	org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)	org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

     

    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.

     

    I have tried a lot to remove this exception but in vain, i need a solution for this urgently. Thanks

  5. As i have just  created a sample report with no data to be displayed just a static text.....i was just filling the report like this....

    jasperPrint = JasperFillManager.fillReport(jasperReport, null);

    but as there is an empty datasource, i have supplied another parameter in it with empty datasource....

    jasperPrint = JasperFillManager.fillReport(jasperReport, null, new JREmptyDataSource());

    now it is working fine for me..

    • Like 1
  6. I have created a jasper report, when i run it from my java code it shows the blank page, no content is displayed tottaly blank. Below is my java code and jrxml file written in ireport. plz help

    //java code.

    JasperReport jasperReport;
      JasperPrint  jasperPrint;
      JasperDesign jasperdesign;
     
      jasperdesign = JasperManager.loadXmlDesign("D:/DunyaFASWeb/Project/public_html/reports/report1.jrxml");
      jasperReport = JasperCompileManager.compileReport(jasperdesign);
          //jasperReport = JasperCompileManager.compileReport("D:/DunyaFASWeb/Project/public_html/reports/CostCenter.jrxml");               
      jasperPrint = JasperFillManager.fillReport(jasperReport, null);
        //JasperExportManager.exportReportToHtmlFile(jasperPrint,getServletConfig().getServletContext().getRealPath("/reports/report1.jrxml"));
      JasperExportManager.exportReportToHtmlFile(jasperPrint,"D:/DunyaFASWeb/Project/public_html/reports/myReport.html");

    //jrxml

    <?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="report3" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
        <property name="ireport.zoom" value="1.0"/>
        <property name="ireport.x" value="0"/>
        <property name="ireport.y" value="0"/>
        <background>
            <band splitType="Stretch"/>
        </background>
        <title>
            <band height="79" splitType="Stretch">
                <staticText>
                    <reportElement x="151" y="24" width="257" height="55"/>
                    <textElement>
                        <font size="36" isBold="true"/>
                    </textElement>
                    <text><![CDATA[My Report]]></text>
                </staticText>
            </band>
        </title>
        <pageHeader>
            <band height="35" splitType="Stretch"/>
        </pageHeader>
        <columnHeader>
            <band height="61" splitType="Stretch"/>
        </columnHeader>
        <detail>
            <band height="125" splitType="Stretch">
                <staticText>
                    <reportElement x="104" y="0" width="285" height="91"/>
                    <textElement>
                        <font size="36" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Muhammad Sulaiman Malik]]></text>
                </staticText>
            </band>
        </detail>
        <columnFooter>
            <band height="45" splitType="Stretch"/>
        </columnFooter>
        <pageFooter>
            <band height="54" splitType="Stretch"/>
        </pageFooter>
        <summary>
            <band height="42" splitType="Stretch"/>
        </summary>
    </jasperReport>
     

  7. I am having the problem with jasper report 3.7.2 and using in Oracle JDeveloper 11g. I made the report in IReport 3.7.2 and calling it from by writing the java code in Oracle JDeveloper 11g. and i am getting an exception when i run it from Oracle JDeveloper 11g. I need an urgent help on this exception may be i am missing some Jar Files or not using the rite jar files. The exception is given below.

     net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'html'. Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'html'.

    and Sometimes: net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException:Content is not allowed in prolog.Caused by: org.xml.sax.SAXParseException:Content is not allowed in prolog.Plz help me out, May be i am missing jar files something like this..Thnx




    Post Edited by sulaiman2043 at 06/09/2010 09:40



    Post Edited by sulaiman2043 at 06/09/2010 10:30
  8. I am having the problem with jasper report 3.7.2 and using in Oracle JDeveloper 11g. I made the report in IReport 3.7.2 and calling it from by writing the java code in Oracle JDeveloper 11g. and i am getting an exception when i run it from Oracle JDeveloper 11g. I need an urgent help on this exception may be i am missing some Jar Files or not using the rite jar files. The exception is given below.

     net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'html'. Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'html'.

    and Sometimes: net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException:Content is not allowed in prolog.Caused by: org.xml.sax.SAXParseException:Content is not allowed in prolog.Plz help me out, May be i am missing jar files something like this..Thnx




    Post Edited by sulaiman2043 at 06/09/2010 09:40



    Post Edited by sulaiman2043 at 06/09/2010 10:30
×
×
  • Create New...