Jump to content

elainetmy

Members
  • Posts

    10
  • Joined

  • Last visited

 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 elainetmy

  1. Hi Idcl289,

    I at first also facing the problem that you are facing.

    I solved mine by changing the struts.xml. 

    It is configuration problem in my case. 

    I added this line 

    <constant name="struts.action.excludePattern" value="/servlets/images*"/>

    Hope it helps.

    Elaine

     

  2. Hi, 

    I've a problem in showing images in Page Header Band.

    This is my code.

    band = new JRDesignBand();
    band.setHeight(100);
     
    image = new JRDesignImage(jasperDesign);
    image.setX(450);
    image.setY(10);
    image.setHeight(30);
    image.setWidth(30);
    expression = new JRDesignExpression();
    expression.setValueClass(java.lang.String.class);
    expression.setText("$P{ImageUrl}");
    image.setExpression(expression);
    band.addElement(image);
     
    jasperDesign.setPageHeader(band);
     
    When I debugged the code, I noticed that after compilation of the report, it convert from JRDesignImage to JRBaseImage.
     
    May I know what's problem with my code?
     
    Thank you.
     
    Elaine.
  3. Hi Lucian,

     

    I'm currently using JasperDesign to create a dynamic report. I'm facing problem when want to create an image in header band.

     

    I'm using JRDesignImage to create the image. But when i compile the report, I debugged, I noticed the image converted into JRBaseImage.

     

    May I know what's wrong with my logic?

     

    Thanks.

     

    Elaine

  4. Hi all, 

    I'm having problems when using JRLoader.

    Stack trace here:

    net.sf.jasperreports.engine.JRException: Error loading object from file : C:testtest.jrxml
    at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:127)
    at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:99)
    at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromFile(JRLoader.java:90)
    at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:81)
    at com.ebx.jasperReport.util.Test.generatePDFReport(Test.java:125)
    at com.ebx.jasperReport.util.Test.main(Test.java:84)
    Caused by: java.io.StreamCorruptedException: invalid stream header: 3C3F786D
     
    at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    at java.io.ObjectInputStream.<init>(Unknown Source)
    at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:58)
    at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:122)
    ... 5 more
     
    My code is here:
     
    String rFile="C:testtest.jrxml";[/code]
    JasperReport jasperReport = (JasperReport) JRLoader.loadObject(rFile);[/code]
    JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, map, new JREmptyDataSource());[/code]
     
    Any idea where went wrong?
     
    Thanks for your generous help.http://community.jaspersoft.com/sites/all/libraries/ckeditor/plugins/smiley/images/regular_smile.gif
     
    Elaine.
×
×
  • Create New...