Jump to content
  • the property of "stretch With OverFlow" is not work in FireFox browser


    yaozhichao
    Assigned User teodord
    CategoryBug report
    PriorityHigh
    ReproducibilityAlways
    ResolutionNo Change Required
    SeverityCritical
    StatusClosed

    There is a field the length of which is not fixed in jasper , i set it property "Stretch With OverFlow" , in IE8 browser it works but not in FireFox . The following is my htmlExporter code :

    JRHtmlExporter exporter = new JRHtmlExporter();

    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

    exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, response.getWriter());

    exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "servlets/image?radom="+Math.random()+"&image=");

    exporter.setParameter(JRHtmlExporterParameter.IS_WRAP_BREAK_WORD, Boolean.TRUE);

    exporter.setParameter(JRHtmlExporterParameter.PAGE_INDEX,pagesize);

    exporter.setParameter(JRHtmlExporterParameter.FLUSH_OUTPUT, Boolean.TRUE);

    exporter.exportReport();


    Attachments: report_resource.jrxml

    User Feedback

    Recommended Comments

    Hi,

     

    This has nothing to do with the isStretchWithOverflow flag, which is a "report fill time" parameter and not a "report export" parameter.

    By the time you export to HTML, the text field has already stretched, otherwise you would not see your all text, but it will be cut.

     

    What you experience is a difference between Firefox and IE when breaking up words. It is a word wrap policy difference between FF and IE.

    If you have read the Javadoc for the IS_WRAP_BREAK_WORD export parameter that you use, you would have seen that it says this setting is supported only by some browsers, which explains why it does not work in FF.

    http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/export/JRHtmlExporterParameter.html#IS_WRAP_BREAK_WORD

     

    The Javadoc also gives you a workaround solution, in which you are instructed to use the following custom property to preserve line breaks in text:

    http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/config.reference.html#net.sf.jasperreports.text.save.line.breaks

     

    I hope this helps.

    Teodor

     

     

    Link to comment
    Share on other sites

    Hi,

     

    The above mentioned "net.sf.jasperreports.text.save.line.breaks" property can be used globally, by adding a line to a jasperreports.properties file that you put in the root package of you Java application classpath, or can be set at report template level or at text field element level in the report.

     

    Report templates and individual elements in a report can have custom properties using the tag in JRXML. I suggest you look at some of the samples shipped with JR project distro under the /demo/samples/ folder.

     

    I hope this helps.

    Teodor

    Link to comment
    Share on other sites


×
×
  • Create New...