casperreports 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/casper_reports.rb +4 -3
- data/readme.md +20 -11
- data/spec/casper_reports_spec.rb +2 -2
- metadata +4 -6
- data/include/patients.xml +0 -1157
- data/include/test.rb +0 -8
- data/include/testreport.jrxml +0 -61
data/include/test.rb
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
require 'java'
|
2
|
-
|
3
|
-
puts "Compiling Report"
|
4
|
-
#open('test.pdf', 'wb').write(String.from_java_bytes(Java::XmlDataReportProducer.compile(open("testreport.jrxml").read, open("patients.xml").read), 'pdf'))
|
5
|
-
|
6
|
-
|
7
|
-
require '../lib/casper_reports'
|
8
|
-
CasperReports.new.compile(open("testreport.jrxml").read, open("patients.xml").read, '/root', 'pdf')
|
data/include/testreport.jrxml
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="testreport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
|
3
|
-
<property name="ireport.zoom" value="1.0"/>
|
4
|
-
<property name="ireport.x" value="0"/>
|
5
|
-
<property name="ireport.y" value="0"/>
|
6
|
-
<queryString language="xPath">
|
7
|
-
<![CDATA[//patient]]>
|
8
|
-
</queryString>
|
9
|
-
<field name="first-name" class="java.lang.String">
|
10
|
-
<fieldDescription><![CDATA[first-name]]></fieldDescription>
|
11
|
-
</field>
|
12
|
-
<field name="last-name" class="java.lang.String">
|
13
|
-
<fieldDescription><![CDATA[last-name]]></fieldDescription>
|
14
|
-
</field>
|
15
|
-
<background>
|
16
|
-
<band splitType="Stretch"/>
|
17
|
-
</background>
|
18
|
-
<title>
|
19
|
-
<band height="79" splitType="Stretch"/>
|
20
|
-
</title>
|
21
|
-
<pageHeader>
|
22
|
-
<band height="35" splitType="Stretch"/>
|
23
|
-
</pageHeader>
|
24
|
-
<columnHeader>
|
25
|
-
<band height="61" splitType="Stretch">
|
26
|
-
<staticText>
|
27
|
-
<reportElement x="37" y="0" width="100" height="20"/>
|
28
|
-
<textElement/>
|
29
|
-
<text><![CDATA[first-name]]></text>
|
30
|
-
</staticText>
|
31
|
-
<staticText>
|
32
|
-
<reportElement x="177" y="0" width="100" height="20"/>
|
33
|
-
<textElement/>
|
34
|
-
<text><![CDATA[last-name]]></text>
|
35
|
-
</staticText>
|
36
|
-
</band>
|
37
|
-
</columnHeader>
|
38
|
-
<detail>
|
39
|
-
<band height="125" splitType="Stretch">
|
40
|
-
<textField>
|
41
|
-
<reportElement x="37" y="3" width="100" height="20"/>
|
42
|
-
<textElement/>
|
43
|
-
<textFieldExpression class="java.lang.String"><![CDATA[$F{first-name}]]></textFieldExpression>
|
44
|
-
</textField>
|
45
|
-
<textField>
|
46
|
-
<reportElement x="177" y="13" width="100" height="20"/>
|
47
|
-
<textElement/>
|
48
|
-
<textFieldExpression class="java.lang.String"><![CDATA[$F{last-name}]]></textFieldExpression>
|
49
|
-
</textField>
|
50
|
-
</band>
|
51
|
-
</detail>
|
52
|
-
<columnFooter>
|
53
|
-
<band height="45" splitType="Stretch"/>
|
54
|
-
</columnFooter>
|
55
|
-
<pageFooter>
|
56
|
-
<band height="54" splitType="Stretch"/>
|
57
|
-
</pageFooter>
|
58
|
-
<summary>
|
59
|
-
<band height="42" splitType="Stretch"/>
|
60
|
-
</summary>
|
61
|
-
</jasperReport>
|