-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathREADME
71 lines (43 loc) · 2.16 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
CFJASPERREPORT
A tag for running JasperReports http://jasperforge.org/projects/jasperreports
JasperReports does lovely barcodes, charts, crosstab reports... it's swell.
Run reports using datasource name, SQL, CFML Queries, or CFML structures.
Examples:
export as PDF:
<jr:jasperreport jrxml="#path#/report.jrxml"
exportfile="#outpath#/rockn.pdf" exporttype="pdf"/>
export as Excel file:
<jr:jasperreport jrxml="#path#/report.jrxml"
exportfile="#outpath#/rockn.xls" exporttype="xls"/>
export as PDF using query:
<jr:jasperreport jrxml="#datapath#/cfqueryFood.jrxml" query="#myQuery#"
exportfile="#workpath#/cfqueryFood.pdf" exporttype="pdf"/>
export as PDF using datasource name:
<jr:jasperreport jrxml="#datapath#/test.jrxml" dsn="jasperreport"
exportfile="#workpath#/rockn.pdf" exporttype="pdf"/>
INSTALLATION
Install from an extension provider, or download a version from here:
http://cfmlprojects.org/artifacts/cfml/cfjasperreport/cfjasperreport/
and unzip it to cfjasperreport in your web root (afterwards you should have {webroot}/cfjasperreport/tag) and then import the taglib::
<cfimport taglib="/cfjasperreport/tag/cfjasperreport" prefix="jr" />
Calling it like so:
<jr:jasperreport jrxml="#datapath#/avery5160.jrxml" exportfile="#workpath#/avery5160.pdf" exporttype="pdf"/>
See ./tests/cfjasperreport/tag/TestTag.cfc for more examples.
DEVELOPMENT
This project leverages cfdistro https://github.com/denuno/cfdistro in the
default location of: $HOME/cfdistro
Any mappings, datasources, etc., are configured via the files in ./build
The extension properties are stored in the build.extension.properties file.
This would be author, extension name, and paths to tag, lib, etc., directories.
To build the extension:
./cfjasperreport build.extension
Build artifact: ./dist/cfjasperreport-${version}-extension.zip
Build and start the development server (defaults to 127.0.0.1:8088):
./cfjasperreport build
./cfjasperreport server.start.fg
The tests are located in ./tests and are mapped to /tests
Tests for the tag:
tests/cfjasperreport/tag
Tests for extension building and installing:
tests/cfjasperreport/extension
There is an H2 datasource for tests called "jasperreports"