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

kef4e_

Members
  • Posts

    12
  • 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 kef4e_

  1. You are not doing it wrong, but the feature does not work with Jasper Server 5+ at all! The bug has been there for more than a year!!! I think nobody from Jasper cares about this. There was an issue #3533 that was opened but they even deleted the issue without any explanataion.

    It is high time somebody fixed this issue because most excel reports rely on flexible column widths!

     

     

  2. Hi there,

    I am a newbie with Jasper Server and i have a question about properties in the jasper report. I am trying to insert dynamically JavaScript to the report when the Report is exported to PDF.

    I can control the property

     <property name="net.sf.jasperreports.export.pdf.javascript" value="this.print()"/>

    so the report will trigger the print dialog in the pdf file immediately after the pdf is opened. I want to be able to do this dynamically by passing a variable to the report which will be evaluated in the $P{REPORT_SCRIPTLET} and then the report scriptlet will set the print JavaScript.

    I tried

    @Override
    public void beforePageInit() throws JRScriptletException {
       JasperReport jr = (JasperReport) super.getParameterValue("JASPER_REPORT");
       jr.setProperty("net.sf.jasperreports.export.pdf.javascript", "this.print()");       
    }

    but with no success. The property is set, but the JavaScript does not trigger the print dialog whereas if defined

    <property name="net.sf.jasperreports.export.pdf.javascript" value="this.print()"/>

    in the report it works.

    Any suggestions?

    Any help is much appreciated!

    10x

     



    Post Edited by kef4e_ at 08/02/2012 14:08



    Post Edited by kef4e_ at 08/02/2012 14:08
×
×
  • Create New...