Skip to content

things-factory/document-template-service

Repository files navigation

document-template-service

Prerequisites

  • OpenJDK 1.8
  • gradle

How to use

  1. Download the jar file
  2. open terminal and move to the downloaded jar
  3. type this command
    java -jar document-template-service.jar

Change server port

make the application.properties file. And open with editor.

server.port=PORT_NUMBER

Write report

  • design the template using Jasper Studio
  • create fields and datasource
  • mapping with field
  • get sub datasource from main datasource
    // e.g. get datasource named items from json data
    ((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("items")