source: trunk/web-app/reports/immediateCallouts.jrxml @ 544

Last change on this file since 544 was 544, checked in by gav, 14 years ago

Improvements to Immediate Callout Report.

File size: 14.1 KB
Line 
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="reportName" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="782" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true">
3        <property name="ireport.scriptlethandling" value="0"/>
4        <property name="ireport.encoding" value="UTF-8"/>
5        <property name="ireport.zoom" value="1.0"/>
6        <property name="ireport.x" value="0"/>
7        <property name="ireport.y" value="218"/>
8        <import value="net.sf.jasperreports.engine.*"/>
9        <import value="java.util.*"/>
10        <import value="net.sf.jasperreports.engine.data.*"/>
11        <style name="Crosstab Data Text" isDefault="false" hAlign="Center"/>
12        <style name="table" isDefault="false" fill="Solid" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
13                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
14                        <pen lineWidth="0.0" lineColor="#000000"/>
15                        <topPen lineWidth="0.0"/>
16                        <leftPen lineWidth="0.0"/>
17                        <bottomPen lineWidth="0.0"/>
18                        <rightPen lineWidth="0.0"/>
19                </box>
20        </style>
21        <style name="table_TH" isDefault="false" mode="Opaque" backcolor="#C7C7C7" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
22                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
23                        <pen lineWidth="1.0" lineColor="#000000"/>
24                        <topPen lineWidth="1.0"/>
25                        <leftPen lineWidth="0.0"/>
26                        <bottomPen lineWidth="1.0"/>
27                        <rightPen lineWidth="0.0"/>
28                </box>
29        </style>
30        <style name="table_CH" isDefault="false" mode="Opaque" backcolor="#FFFFFF" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
31                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
32                        <pen lineWidth="1.0" lineColor="#000000"/>
33                        <topPen lineWidth="0.0"/>
34                        <leftPen lineWidth="0.0"/>
35                        <bottomPen lineWidth="1.0"/>
36                        <rightPen lineWidth="0.0"/>
37                </box>
38        </style>
39        <style name="table_TD" isDefault="false" mode="Opaque" backcolor="#FFFFFF" fontSize="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false">
40                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
41                        <pen lineWidth="1.0" lineColor="#000000"/>
42                        <topPen lineWidth="1.0"/>
43                        <leftPen lineWidth="0.0"/>
44                        <bottomPen lineWidth="1.0"/>
45                        <rightPen lineWidth="0.0"/>
46                </box>
47                <conditionalStyle>
48                        <conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
49                        <style isDefault="false" style="table_TD" backcolor="#F7F7F7"/>
50                </conditionalStyle>
51        </style>
52        <style name="table_CF" isDefault="false" mode="Opaque" backcolor="#EDEDED" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
53                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
54                        <pen lineWidth="1.0"/>
55                        <topPen lineWidth="1.0"/>
56                        <leftPen lineWidth="0.0"/>
57                        <bottomPen lineWidth="1.0"/>
58                        <rightPen lineWidth="0.0"/>
59                </box>
60        </style>
61        <subDataset name="dataset1">
62                <field name="id" class="java.lang.Long"/>
63                <field name="name" class="java.lang.String"/>
64                <field name="immediateCalloutCount" class="java.lang.Integer"/>
65                <field name="downTime" class="java.lang.Integer"/>
66                <field name="tasks" class="java.lang.String"/>
67                <variable name="immediateCalloutSum" class="java.lang.Integer" calculation="Sum">
68                        <variableExpression><![CDATA[$F{immediateCalloutCount}]]></variableExpression>
69                </variable>
70                <variable name="downTimeSum" class="java.lang.Integer" calculation="Sum">
71                        <variableExpression><![CDATA[$F{downTime}]]></variableExpression>
72                </variable>
73                <group name="assetName">
74                        <groupExpression><![CDATA[$F{name}]]></groupExpression>
75                </group>
76        </subDataset>
77        <parameter name="reportTitle" class="java.lang.String"/>
78        <parameter name="currentUser" class="java.lang.String"/>
79        <parameter name="logoUrl" class="java.lang.String"/>
80        <parameter name="startDateString" class="java.lang.String"/>
81        <parameter name="endDateString" class="java.lang.String"/>
82        <queryString language="hql">
83                <![CDATA[]]>
84        </queryString>
85        <field name="taskList" class="java.util.List"/>
86        <field name="summaryOfCalculationMethod" class="java.lang.String"/>
87        <field name="totalAssetsOnTasksCount" class="java.lang.String"/>
88        <field name="assetList" class="java.util.List"/>
89        <field name="totalDownTime" class="java.util.LinkedHashMap"/>
90        <background>
91                <band splitType="Stretch"/>
92        </background>
93        <pageHeader>
94                <band height="121" splitType="Stretch">
95                        <textField>
96                                <reportElement key="staticText-1" x="0" y="57" width="340" height="30"/>
97                                <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
98                                        <font size="20"/>
99                                </textElement>
100                                <textFieldExpression class="java.lang.String"><![CDATA[$P{reportTitle}]]></textFieldExpression>
101                        </textField>
102                        <image>
103                                <reportElement x="0" y="0" width="340" height="57"/>
104                                <imageExpression class="java.net.URL"><![CDATA[new URL($P{logoUrl})]]></imageExpression>
105                        </image>
106                        <textField pattern="dd-MMM-yyyy" isBlankWhenNull="true">
107                                <reportElement x="0" y="87" width="340" height="20"/>
108                                <textElement textAlignment="Center" verticalAlignment="Middle" markup="none"/>
109                                <textFieldExpression class="java.lang.String"><![CDATA[$P{startDateString}+" to "+$P{endDateString}]]></textFieldExpression>
110                        </textField>
111                </band>
112        </pageHeader>
113        <columnHeader>
114                <band splitType="Stretch"/>
115        </columnHeader>
116        <detail>
117                <band height="394" splitType="Stretch">
118                        <bar3DChart>
119                                <chart>
120                                        <reportElement x="0" y="0" width="782" height="394"/>
121                                        <chartTitle position="Bottom">
122                                                <font isUnderline="false"/>
123                                                <titleExpression><![CDATA["Total: "+$F{totalAssetsOnTasksCount}]]></titleExpression>
124                                        </chartTitle>
125                                        <chartSubtitle/>
126                                        <chartLegend/>
127                                </chart>
128                                <categoryDataset>
129                                        <dataset>
130                                                <datasetRun subDataset="dataset1">
131                                                        <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{assetList})]]></dataSourceExpression>
132                                                </datasetRun>
133                                        </dataset>
134                                        <categorySeries>
135                                                <seriesExpression><![CDATA["Immediate Callouts"]]></seriesExpression>
136                                                <categoryExpression><![CDATA[$F{name}]]></categoryExpression>
137                                                <valueExpression><![CDATA[$F{immediateCalloutCount}]]></valueExpression>
138                                        </categorySeries>
139                                </categoryDataset>
140                                <bar3DPlot isShowLabels="true">
141                                        <plot labelRotation="-60.0"/>
142                                        <itemLabel color="#000000" backgroundColor="#FFFFFF"/>
143                                        <categoryAxisFormat labelRotation="-60.0">
144                                                <axisFormat>
145                                                        <labelFont/>
146                                                        <tickLabelFont/>
147                                                </axisFormat>
148                                        </categoryAxisFormat>
149                                        <valueAxisFormat>
150                                                <axisFormat>
151                                                        <labelFont/>
152                                                        <tickLabelFont/>
153                                                </axisFormat>
154                                        </valueAxisFormat>
155                                </bar3DPlot>
156                        </bar3DChart>
157                </band>
158                <band height="394">
159                        <bar3DChart>
160                                <chart>
161                                        <reportElement x="0" y="0" width="782" height="394"/>
162                                        <chartTitle position="Bottom">
163                                                <font isBold="false" isUnderline="false"/>
164                                                <titleExpression><![CDATA["Total: "+$F{totalDownTime}.total+"min"+" ("+$F{totalDownTime}.hours+"h:"+$F{totalDownTime}.minutes+"m)"]]></titleExpression>
165                                        </chartTitle>
166                                        <chartSubtitle/>
167                                        <chartLegend position="Bottom">
168                                                <font isUnderline="true"/>
169                                        </chartLegend>
170                                </chart>
171                                <categoryDataset>
172                                        <dataset>
173                                                <datasetRun subDataset="dataset1">
174                                                        <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{assetList})]]></dataSourceExpression>
175                                                </datasetRun>
176                                        </dataset>
177                                        <categorySeries>
178                                                <seriesExpression><![CDATA["Down Time (min)"]]></seriesExpression>
179                                                <categoryExpression><![CDATA[$F{name}]]></categoryExpression>
180                                                <valueExpression><![CDATA[$F{downTime}]]></valueExpression>
181                                        </categorySeries>
182                                </categoryDataset>
183                                <bar3DPlot isShowLabels="true">
184                                        <plot labelRotation="-60.0">
185                                                <seriesColor seriesOrder="0" color="#FF9900"/>
186                                        </plot>
187                                        <itemLabel color="#000000" backgroundColor="#FFFFFF"/>
188                                        <categoryAxisFormat labelRotation="-60.0">
189                                                <axisFormat>
190                                                        <labelFont/>
191                                                        <tickLabelFont/>
192                                                </axisFormat>
193                                        </categoryAxisFormat>
194                                        <valueAxisFormat>
195                                                <axisFormat>
196                                                        <labelFont/>
197                                                        <tickLabelFont/>
198                                                </axisFormat>
199                                        </valueAxisFormat>
200                                </bar3DPlot>
201                        </bar3DChart>
202                </band>
203                <band height="394">
204                        <componentElement>
205                                <reportElement key="table 1" style="table" x="0" y="0" width="782" height="394"/>
206                                <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
207                                        <datasetRun subDataset="dataset1">
208                                                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{assetList})]]></dataSourceExpression>
209                                        </datasetRun>
210                                        <jr:column width="774">
211                                                <jr:groupHeader groupName="assetName">
212                                                        <jr:cell height="30" rowSpan="1">
213                                                                <textField>
214                                                                        <reportElement x="0" y="0" width="774" height="30"/>
215                                                                        <textElement verticalAlignment="Middle">
216                                                                                <font size="12" isBold="true"/>
217                                                                        </textElement>
218                                                                        <textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression>
219                                                                </textField>
220                                                        </jr:cell>
221                                                </jr:groupHeader>
222                                                <jr:detailCell style="table_TD" height="40" rowSpan="1">
223                                                        <textField isStretchWithOverflow="true">
224                                                                <reportElement x="0" y="0" width="774" height="40"/>
225                                                                <textElement verticalAlignment="Middle"/>
226                                                                <textFieldExpression class="java.lang.String"><![CDATA[""+$F{tasks}]]></textFieldExpression>
227                                                        </textField>
228                                                </jr:detailCell>
229                                        </jr:column>
230                                </jr:table>
231                        </componentElement>
232                </band>
233        </detail>
234        <columnFooter>
235                <band splitType="Stretch"/>
236        </columnFooter>
237        <pageFooter>
238                <band height="40" splitType="Stretch">
239                        <textField pattern="dd-MMM-yyyy">
240                                <reportElement x="82" y="0" width="200" height="20"/>
241                                <textElement/>
242                                <textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
243                        </textField>
244                        <textField>
245                                <reportElement x="662" y="20" width="80" height="20"/>
246                                <textElement textAlignment="Right"/>
247                                <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
248                        </textField>
249                        <textField evaluationTime="Report">
250                                <reportElement x="742" y="20" width="40" height="20"/>
251                                <textElement/>
252                                <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
253                        </textField>
254                        <textField>
255                                <reportElement x="0" y="0" width="82" height="20"/>
256                                <textElement markup="none"/>
257                                <textFieldExpression class="java.lang.String"><![CDATA["Generated: "]]></textFieldExpression>
258                        </textField>
259                        <textField>
260                                <reportElement x="82" y="20" width="200" height="20"/>
261                                <textElement markup="none"/>
262                                <textFieldExpression class="java.lang.String"><![CDATA[$P{currentUser}]]></textFieldExpression>
263                        </textField>
264                        <textField>
265                                <reportElement x="0" y="20" width="82" height="20"/>
266                                <textElement markup="none"/>
267                                <textFieldExpression class="java.lang.String"><![CDATA["By: "]]></textFieldExpression>
268                        </textField>
269                </band>
270        </pageFooter>
271        <lastPageFooter>
272                <band height="40">
273                        <textField evaluationTime="Report">
274                                <reportElement x="742" y="20" width="40" height="20"/>
275                                <textElement/>
276                                <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
277                        </textField>
278                        <textField pattern="dd-MMM-yyyy">
279                                <reportElement x="82" y="0" width="200" height="20"/>
280                                <textElement/>
281                                <textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
282                        </textField>
283                        <textField>
284                                <reportElement x="0" y="0" width="82" height="20"/>
285                                <textElement markup="none"/>
286                                <textFieldExpression class="java.lang.String"><![CDATA["Generated: "]]></textFieldExpression>
287                        </textField>
288                        <textField>
289                                <reportElement x="0" y="20" width="82" height="20"/>
290                                <textElement markup="none"/>
291                                <textFieldExpression class="java.lang.String"><![CDATA["By: "]]></textFieldExpression>
292                        </textField>
293                        <textField>
294                                <reportElement x="82" y="20" width="200" height="20"/>
295                                <textElement markup="none"/>
296                                <textFieldExpression class="java.lang.String"><![CDATA[$P{currentUser}]]></textFieldExpression>
297                        </textField>
298                        <textField>
299                                <reportElement x="662" y="20" width="80" height="20"/>
300                                <textElement textAlignment="Right"/>
301                                <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
302                        </textField>
303                </band>
304        </lastPageFooter>
305        <summary>
306                <band height="369">
307                        <textField>
308                                <reportElement key="staticText-1" x="221" y="12" width="340" height="30"/>
309                                <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
310                                        <font size="20"/>
311                                </textElement>
312                                <textFieldExpression class="java.lang.String"><![CDATA["Summary of Calculation Method"]]></textFieldExpression>
313                        </textField>
314                        <textField>
315                                <reportElement x="0" y="50" width="782" height="311"/>
316                                <textElement/>
317                                <textFieldExpression class="java.lang.String"><![CDATA[$F{summaryOfCalculationMethod}]]></textFieldExpression>
318                        </textField>
319                </band>
320        </summary>
321        <noData>
322                <band height="85" splitType="Stretch">
323                        <textField>
324                                <reportElement x="0" y="35" width="782" height="50"/>
325                                <textElement textAlignment="Center" markup="none">
326                                        <font size="14" isBold="true"/>
327                                </textElement>
328                                <textFieldExpression class="java.lang.String"><![CDATA["No data to display. \n"+
329"Please run report again."]]></textFieldExpression>
330                        </textField>
331                        <textField>
332                                <reportElement key="staticText-1" x="0" y="0" width="782" height="35"/>
333                                <textElement textAlignment="Center" markup="none">
334                                        <font size="20"/>
335                                </textElement>
336                                <textFieldExpression class="java.lang.String"><![CDATA[$P{reportTitle}]]></textFieldExpression>
337                        </textField>
338                </band>
339        </noData>
340</jasperReport>
Note: See TracBrowser for help on using the repository browser.