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

szy.ly

Members
  • Posts

    4
  • 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 szy.ly

  1. Frederic,

    Maybe this is the best information for u:  https://jasperreports.sourceforge.net/sample.reference/pdfencrypt/index.html

    example

    JRPdfExporter exporter = new JRPdfExporter();exporter.setExporterInput(new SimpleExporterInput(jasperPrint));exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outFile));SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration();configuration.setEncrypted(true);configuration.set128BitKey(true);configuration.setUserPassword("jasper");configuration.setOwnerPassword("reports");configuration.setPermissions(PdfWriter.ALLOW_COPY | PdfWriter.ALLOW_PRINTING);exporter.setConfiguration(configuration);

    hope to help u ,
    whatClasss

  2. Deal all 

     Recently started learning Jasper Report, I have some doubts about data filling.

    Question 1

    Map<String, Object> parameter = new HashMap<>();parameter.put("my_title", "Hi, I am title");parameter.put("myBean", new MyBean());JasperPrint jasperPrint = JasperFillManager.fillReport(jasperDesign, parameter, new JREmptyDataSource());

    about this code ,

    I created parameters named "my_title" and  class = java.lang.String with Jaspersoft Studio  ps: <textFieldExpression><![CDATA[$P{my_title}]]></textFieldExpression>

    If I want to use javebean like jackson  such as <textFieldExpression><![CDATA[$P{myBean.name}]]></textFieldExpression>

    What should I do  ?

     

×
×
  • Create New...