Customizing InterPSS Report
InterPSS simulation information at runtime is stored in the SimuContext object. When user issues a command to generate a simulation result report, InterPSS performing the following steps:
- Use a report mapper object to transform the simulation information to create a set of report objects.
- The report objects are passed to the JasperReport rendering engine. It "pastes" the info onto a report template to generate an InterPSS report.
Both report mapper and report templates are plugins. One can customize InterPSS report in the following two ways:
- Modify report templatea to change report layout.
- Plugin different report mappers and report templates to create new types of report.
- Install iReport : InterPSS currently uses iReport to design report templates. Please go to Here to download iReport. Currently version 1.27 is used.
- Install InterPSS Development Version : Please go to Here to download InterPSS development version and follow instructions in the readme.txt file to install.
- Configure iReport : You need to link InterPSS library. Go to Options->Classpath and add ipss_plugin.jar.
iReport is a visual JasperReports template design tool. It allows users to visually edit complex reports with charts, images, sub-reports. It supports all the features of JasperReports and all the JasperReports data sources. iReport design files are saved with an extension jrxml. You can use iReport to compile a *.jrxml to a JasperReports report template file *.jasper, which is used by InterPSS to render InterPSS reports.
A Simple Example
Set Working Directory
InterPSS dev release has a sample report template directory <install>/samples/rptTemplate with InterPSS report template design files *.jrxml. You need set your iReport working directory to the sample directroy, by selecting Options -> Settings ...
Editor Report Design File
- Copy the AclfSummaryMaster.jrxml to MyAclfSummaryMaster.jrxml
- Launch iReport and open MyAclfSummaryMaster.jrxml
- Select the report title element and click edit->Element Properties to make the following change
- Click Build->Compile. You should see MyAclfSummaryMaster.jasper file generated.
- Create a new <install>/reportTemplate/test directory and copy the generated MyAclfSummaryMaster.jasper.
- Modify InterPSS Config File - Locate the reportContext.xml in <install>/properties/springConfig directory and make the following change.
- Run InterPSS - Run a loadflow case and you should see below: