Jasper reports can be fully managed with the command line scripts/cmd using the : jasperreports command
$ scripts/cmd jasperreports
Usage
add [jasper_file report_name] - add a Jasper file as a report
update [report_name] - update an existing report
delete [report_name] - delete an existing report
list - list all reports
list_all - list all reports, including subreports
xml [description_file] - add or update reports
xml ... [directory] - add or update reports, specifying the location of jasper files
Generated documents can be managed with the command line scripts/cmd using the documents command
$ scripts/cmd documents
Usage
list - list documents that can be generated
list_expected_parameters [report_class_name] - list parameters name for a document
list_archived - list the archived documents
export [report_name] [archive=<false|true>] - generate a report and export it on the file system
export [report_name] [archive=<false|true>] [param=value] ... - generate a report and export it on the file system
email [user@example.com<,user2@example.org>] [report_class_name] [archive=<false|true>] - generate a report and send an email with it
email [user@example.com<,user2@example.org>] [report_class_name] [archive=<false|true>] [param=value]... - generate a report and send an email with it
get [document_id] [file_path] - retrieve a copy of the archived document
send [document_id] [user@example.com<,user2@example.org>] - email a copy of the archived document
report_dir - display the current report directory
delete [document_id] - delete a document from the archive
$ bin/cmd jasperreports list
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
ESIS
1.1-DEV-201303180822-4288-rplb-code_main
Using database of the default company
Documents exports available
net.sourceforge.esisframework.export.jasper.admin.AdminBusinessZonesFiller
net.sourceforge.esisframework.export.jasper.admin.AdminExpertisesFiller
net.sourceforge.esisframework.export.jasper.admin.AdminGlobalPrefsFiller
net.sourceforge.esisframework.export.jasper.admin.AdminGroupsFiller
net.sourceforge.esisframework.export.jasper.admin.AdminIncidentFiller
net.sourceforge.esisframework.export.jasper.admin.AdminIncidentsFiller
net.sourceforge.esisframework.export.jasper.admin.AdminLocationsFiller
net.sourceforge.esisframework.export.jasper.admin.AdminModulePrefsFiller
net.sourceforge.esisframework.export.jasper.admin.AdminModulesFiller
net.sourceforge.esisframework.export.jasper.admin.AdminProbeHistoryFiller
net.sourceforge.esisframework.export.jasper.admin.AdminProbeStatusFiller
net.sourceforge.esisframework.export.jasper.admin.AdminProbesFiller
net.sourceforge.esisframework.export.jasper.admin.AdminProbesMonitoringFiller
net.sourceforge.esisframework.export.jasper.admin.AdminRaciHistoryFiller
net.sourceforge.esisframework.export.jasper.admin.AdminRacisFiller
net.sourceforge.esisframework.export.jasper.admin.AdminStandardsFiller
net.sourceforge.esisframework.export.jasper.admin.AdminUserHistoryFiller
net.sourceforge.esisframework.export.jasper.admin.AdminUserLoginHistoryFiller
net.sourceforge.esisframework.export.jasper.admin.AdminUsersFiller
net.sourceforge.esisframework.export.poi.SqlQueryExporter
$ scripts/cmd documents list_expected_parameters net.sourceforge.esisframework.export.poi.SqlQueryExporter
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
ESIS
1.1-DEV-201303180822-4288-rplb-code_main
Using database of the default company
Parameters needed for document [net.sourceforge.esisframework.export.poi.SqlQueryExporter]
query
$ bin/cmd documents list_archived
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
ESIS
1.1-DEV-201302071637-3896-esis-esis_main
Using database of the default company
Id Date Title Size
------+------------------------------+------------------------------------------+-------------
1 | Tue Mar 19 10:53:52 CET 2013 | Rapport sur la Sécurité de l'Information | 316,4 Kbytes
------+------------------------------+------------------------------------------+-------------
in 0:0:0:401
$ scripts/cmd documents send 1 support@consulare.ch
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
ESIS
1.1-DEV-201302071637-3896-esis-esis_main
Using database of the default company
The document (1) was succesfully put in the email queue
in 0:0:0:751
$ scripts/cmd documents get 1 /tmp
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
ESIS
1.1-DEV-201302071637-3896-esis-esis_main
Using database of the default company
The document (1) was saved as (/tmp/1_Rapport_sur_la_Securite_de_l_Information.pdf)
in 0:0:0:408
$ scripts/cmd documents delete 1
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
ESIS
1.1-DEV-201302071637-3896-esis-esis_main
Using database of the default company
***** WARNING ******
YOU ARE ABOUT TO DELETE A DOCUMENT
PLEASE CONFIRM THAT YOU WANT TO PROCEED : y/n >y
The document (1) was succesfully deleted
in 0:0:2:271
$ bin/cmd cmd documents export net.sourceforge.esisframework.export.jasper.portal.customer.example.SecuriteSI false paramValue=-30,day timescale=day peopleId=10
$ bin/cmd cmd documents email support@example.com net.sourceforge.esisframework.export.jasper.portal.customer.example.SecuriteSI false
paramValue=-30,day timescale=day peopleId=10
ESIS can keep a copy of the generated in the company database, to do this just use true for the archive flag.
$ bin/cmd cmd documents export net.sourceforge.esisframework.export.jasper.portal.customer.example.SecuriteSI true paramValue=-30,day timescale=day peopleId=10
| Parameter | Description | Value | Example |
|---|---|---|---|
| paramValue | sets the time period for the report | <-nn>,<timescale></timescale> | paramValue=-7, day paramValue=current,month paramValue=previous,month |
| timescale | sets the data points scale | day, week, month, year | timescale=day |
| peopleId | the user to use as the report runner | user id | 10 |
| firstDate | the report start date (do not use with paramValue or paramId) | YYYYMMDD | 20120101 |
| lastDate | the report end date (use with first date) | YYYYMMDD | 20121231 |
| singleDate | a single date report (do not use with paramValue or paramId) | YYYYMMDD | 20121231 |
| paramId | refer to an Id of e_module_report_parameter | N | 5 |
| dateFormat | date format to apply to the X axis | DD-MM | DD |
| type | pdf or hmtl (for JasperReports) | pdf, html | |
| title | title | example | |
| description | description, might be overridden in date limit computation, will be appended to the title |
null | |
| image | image file path, is parameter imageDirectory in Jasper | null |