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="report_production_plant" language="groovy" columnCount="2" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="368" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isTitleNewPage="true" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloatColumnFooter="true">
3
<property name="ireport.zoom" value="1.1000000000000005"/>
4
<property name="ireport.x" value="0"/>
5
<property name="ireport.y" value="639"/>
6
<style name="Crosstab Data Text" hAlign="Center"/>
7
<style name="title" mode="Opaque" forecolor="#006699" backcolor="#E6E6E6" fontSize="10" isBold="true">
8
<pen lineStyle="Dotted"/>
9
<box topPadding="0" leftPadding="0">
10
<pen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
11
<topPen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
12
<leftPen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
13
<bottomPen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
14
<rightPen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
17
<style name="cuerpo" fontSize="8">
18
<pen lineStyle="Dotted"/>
20
<pen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
21
<topPen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
22
<leftPen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
23
<bottomPen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
24
<rightPen lineWidth="0.25" lineStyle="Dotted" lineColor="#5E93F2"/>
29
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
30
<style mode="Opaque" backcolor="#F0F8FF"/>
33
<subDataset name="graphs_mensual">
34
<parameter name="location_id" class="java.lang.Integer"/>
35
<parameter name="fiscalyear_id" class="java.lang.String"/>
37
<![CDATA[SELECT DISTINCT period_id, period_name, production_id, SUM(producto) AS producto FROM get_production_plant($P{location_id}, $P{fiscalyear_id}) AS
40
"default_code" character varying,
41
"fiscalyear_id" integer,
42
"fiscalyear_name" character varying,
45
"period_name" character varying,
46
"production_id" integer,
48
GROUP BY period_id, period_name, production_id;]]>
50
<field name="period_id" class="java.lang.Integer"/>
51
<field name="period_name" class="java.lang.String"/>
52
<field name="production_id" class="java.lang.Integer"/>
53
<field name="producto" class="java.math.BigDecimal"/>
55
<parameter name="company_name" class="java.lang.String"/>
56
<parameter name="report_name" class="java.lang.String"/>
57
<parameter name="user_name" class="java.lang.String"/>
58
<parameter name="fiscalyear_name" class="java.lang.String"/>
59
<parameter name="location_id" class="java.lang.Integer"/>
60
<parameter name="fiscalyear_id" class="java.lang.String"/>
61
<parameter name="report_subname" class="java.lang.String"/>
63
<![CDATA[SELECT * FROM get_production_plant($P{location_id}, $P{fiscalyear_id}) AS
66
"default_code" character varying,
67
"fiscalyear_id" integer,
68
"fiscalyear_name" character varying,
71
"period_name" character varying,
72
"production_id" integer,
73
"producto" bigint) ORDER BY sequence, fiscalyear_id, period_id;]]>
75
<field name="sequence" class="java.lang.Integer"/>
76
<field name="id" class="java.lang.Integer"/>
77
<field name="default_code" class="java.lang.String"/>
78
<field name="fiscalyear_id" class="java.lang.Integer"/>
79
<field name="fiscalyear_name" class="java.lang.String"/>
80
<field name="period" class="java.lang.Integer"/>
81
<field name="period_id" class="java.lang.Integer"/>
82
<field name="period_name" class="java.lang.String"/>
83
<field name="production_id" class="java.lang.Integer"/>
84
<field name="producto" class="java.lang.Long"/>
85
<group name="sequence" isStartNewColumn="true">
86
<groupExpression><![CDATA[$F{sequence}]]></groupExpression>
90
<reportElement style="title" x="62" y="0" width="223" height="12"/>
92
<reportElement x="0" y="0" width="223" height="12"/>
93
<textElement textAlignment="Center" verticalAlignment="Middle">
94
<font size="8" isBold="true"/>
96
<textFieldExpression class="java.lang.String"><![CDATA[$F{default_code}]]></textFieldExpression>
104
<chart theme="generic">
105
<reportElement x="0" y="17" width="368" height="221"/>
117
<dataset resetType="Group" resetGroup="sequence"/>
119
<seriesExpression><![CDATA[$F{period_name}]]></seriesExpression>
120
<categoryExpression><![CDATA[$F{period_id}]]></categoryExpression>
121
<valueExpression><![CDATA[$F{producto}]]></valueExpression>
126
<itemLabel color="#000000" backgroundColor="#FFFFFF">
136
</categoryAxisFormat>
153
<band splitType="Stretch"/>
158
<reportElement mode="Opaque" x="-1" y="0" width="225" height="80" backcolor="#3D8EC5"/>
161
<reportElement x="62" y="0" width="162" height="80" forecolor="#FFFFFF"/>
163
<leftPen lineWidth="0.25"/>
165
<textElement textAlignment="Center" verticalAlignment="Middle">
166
<font size="25" isBold="true"/>
168
<textFieldExpression class="java.lang.String"><![CDATA["[" + $P{fiscalyear_name} + "]"]]></textFieldExpression>
171
<reportElement x="62" y="80" width="162" height="26"/>
173
<leftPen lineWidth="0.25"/>
175
<textElement verticalAlignment="Middle"/>
176
<textFieldExpression class="java.lang.String"><![CDATA[$P{company_name}]]></textFieldExpression>
179
<reportElement x="62" y="106" width="162" height="29"/>
181
<leftPen lineWidth="0.25"/>
183
<textElement verticalAlignment="Middle"/>
184
<textFieldExpression class="java.lang.String"><![CDATA[$P{user_name}]]></textFieldExpression>
187
<reportElement x="1" y="437" width="751" height="78"/>
189
<reportElement x="0" y="0" width="751" height="52"/>
190
<textElement textAlignment="Center" verticalAlignment="Middle">
191
<font size="30" isBold="true"/>
193
<textFieldExpression class="java.lang.String"><![CDATA["[" + $P{report_name} + "]"]]></textFieldExpression>
196
<reportElement x="0" y="52" width="751" height="26"/>
197
<textElement textAlignment="Center" verticalAlignment="Middle">
198
<font isBold="true"/>
200
<textFieldExpression class="java.lang.String"><![CDATA[$P{report_subname}]]></textFieldExpression>
206
<band height="59" splitType="Stretch">
208
<reportElement mode="Opaque" x="-21" y="0" width="795" height="45" backcolor="#006699"/>
210
<reportElement x="549" y="10" width="100" height="10" forecolor="#FFFFFF"/>
214
<textFieldExpression class="java.lang.String"><![CDATA["Fecha de Impresión: "]]></textFieldExpression>
216
<textField pattern="dd/MM/yyyy">
217
<reportElement x="649" y="10" width="61" height="10" forecolor="#FFFFFF"/>
221
<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
223
<textField pattern="h.mm.ss a">
224
<reportElement x="710" y="10" width="62" height="10" forecolor="#FFFFFF"/>
228
<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
231
<reportElement x="549" y="20" width="223" height="10" forecolor="#FFFFFF"/>
235
<textFieldExpression class="java.lang.String"><![CDATA["Por : " + $P{user_name}]]></textFieldExpression>
237
<image scaleImage="FillFrame">
238
<reportElement stretchType="RelativeToTallestObject" x="20" y="0" width="38" height="45"/>
239
<imageExpression class="java.lang.String"><![CDATA["logo_mcm.gif"]]></imageExpression>
242
<reportElement x="200" y="0" width="349" height="45" forecolor="#FFFFFF"/>
243
<textElement textAlignment="Center" verticalAlignment="Middle">
244
<font size="9" isBold="true"/>
246
<textFieldExpression class="java.lang.String"><![CDATA[$P{report_name}]]></textFieldExpression>
249
<reportElement x="58" y="0" width="142" height="45" forecolor="#FFFFFF"/>
250
<textElement textAlignment="Center" verticalAlignment="Middle">
253
<textFieldExpression class="java.lang.String"><![CDATA[$P{company_name}]]></textFieldExpression>
257
<reportElement x="0" y="45" width="751" height="13"/>
258
<textElement textAlignment="Center" verticalAlignment="Middle">
259
<font size="8" isBold="true"/>
261
<textFieldExpression class="java.lang.String"><![CDATA["Reporte Correspondiente al : " +$P{fiscalyear_name}]]></textFieldExpression>
266
<band height="16" splitType="Stretch"/>
269
<band height="12" splitType="Stretch">
271
<reportElement style="Row" mode="Transparent" x="62" y="0" width="223" height="12" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" printWhenGroupChanges="sequence"/>
272
<textField pattern="#,##0.00">
273
<reportElement style="Row" x="118" y="0" width="105" height="12"/>
275
<pen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
276
<topPen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
277
<leftPen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
278
<bottomPen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
279
<rightPen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
281
<textElement textAlignment="Right" verticalAlignment="Middle">
284
<textFieldExpression class="java.lang.Long"><![CDATA[$F{producto}]]></textFieldExpression>
287
<reportElement style="Row" x="0" y="0" width="118" height="12"/>
289
<pen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
290
<topPen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
291
<leftPen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
292
<bottomPen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
293
<rightPen lineWidth="0.25" lineStyle="Dotted" lineColor="#C6B3B3"/>
295
<textElement verticalAlignment="Middle">
298
<textFieldExpression class="java.lang.String"><![CDATA[" " + $F{period_name}]]></textFieldExpression>
304
<band splitType="Stretch"/>
309
<reportElement mode="Opaque" x="0" y="0" width="712" height="17" backcolor="#E6E6E6"/>
310
<textElement textAlignment="Right" verticalAlignment="Middle">
313
<textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
315
<textField evaluationTime="Report">
316
<reportElement mode="Opaque" x="712" y="0" width="40" height="17" backcolor="#E6E6E6"/>
317
<textElement verticalAlignment="Middle">
320
<textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
322
<textField pattern="EEEEE dd MMMMM yyyy">
323
<reportElement x="0" y="0" width="332" height="17"/>
324
<textElement verticalAlignment="Middle">
327
<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
332
<band height="451" splitType="Stretch">
334
<reportElement x="-1" y="28" width="752" height="67"/>
335
<rowGroup name="default_code" width="70" totalPosition="End">
337
<bucketExpression class="java.lang.String"><![CDATA[$F{default_code}]]></bucketExpression>
340
<cellContents backcolor="#68C4CF" mode="Opaque">
342
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
345
<reportElement style="Crosstab Data Text" x="0" y="0" width="70" height="13"/>
346
<textElement textAlignment="Left" verticalAlignment="Middle">
349
<textFieldExpression class="java.lang.String"><![CDATA[$V{default_code}]]></textFieldExpression>
353
<crosstabTotalRowHeader>
354
<cellContents backcolor="#CFE3E6" mode="Opaque">
356
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
359
<reportElement x="0" y="0" width="70" height="11"/>
360
<textElement textAlignment="Center" verticalAlignment="Middle">
363
<text><![CDATA[Total]]></text>
366
</crosstabTotalRowHeader>
368
<columnGroup name="period_id" height="2" totalPosition="End">
370
<bucketExpression class="java.lang.Integer"><![CDATA[$F{period_id}]]></bucketExpression>
372
<crosstabColumnHeader>
373
<cellContents backcolor="#68C4CF" mode="Opaque">
375
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
378
<reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="50" height="2" forecolor="#59A4B6" backcolor="#59A4B6"/>
382
<textFieldExpression class="java.lang.Integer"><![CDATA[$V{period_id}]]></textFieldExpression>
385
</crosstabColumnHeader>
386
<crosstabTotalColumnHeader>
387
<cellContents backcolor="#407880" mode="Opaque">
389
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
392
<reportElement x="0" y="2" width="50" height="14" forecolor="#FFFFFF"/>
393
<textElement textAlignment="Center" verticalAlignment="Middle">
396
<text><![CDATA[Total period_id]]></text>
399
</crosstabTotalColumnHeader>
401
<columnGroup name="period_name" height="14" totalPosition="End">
403
<bucketExpression class="java.lang.String"><![CDATA[$F{period_name}]]></bucketExpression>
405
<crosstabColumnHeader>
406
<cellContents backcolor="#68C4CF" mode="Opaque">
408
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
411
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="14"/>
412
<textElement verticalAlignment="Middle">
415
<textFieldExpression class="java.lang.String"><![CDATA[$V{period_name}]]></textFieldExpression>
418
</crosstabColumnHeader>
419
<crosstabTotalColumnHeader>
420
<cellContents backcolor="#CFE3E6" mode="Opaque">
422
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
425
</crosstabTotalColumnHeader>
427
<measure name="productoMeasure" class="java.lang.Long" calculation="Sum">
428
<measureExpression><![CDATA[$F{producto}]]></measureExpression>
430
<crosstabCell width="50" height="13">
433
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
435
<textField pattern="#,##0.00">
436
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="13"/>
437
<textElement textAlignment="Right">
440
<textFieldExpression class="java.lang.Long"><![CDATA[$V{productoMeasure}]]></textFieldExpression>
444
<crosstabCell height="11" rowTotalGroup="default_code">
445
<cellContents backcolor="#CFE3E6" mode="Opaque">
447
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
449
<textField pattern="#,##0.00">
450
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="11"/>
451
<textElement textAlignment="Right">
454
<textFieldExpression class="java.lang.Long"><![CDATA[$V{productoMeasure}]]></textFieldExpression>
458
<crosstabCell width="50" height="13" columnTotalGroup="period_id">
459
<cellContents backcolor="#407880" mode="Opaque">
461
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
463
<textField pattern="#,##0.00">
464
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="13" forecolor="#FFFFFF"/>
465
<textElement textAlignment="Right">
468
<textFieldExpression class="java.lang.Long"><![CDATA[$V{productoMeasure}]]></textFieldExpression>
472
<crosstabCell height="11" rowTotalGroup="default_code" columnTotalGroup="period_id">
473
<cellContents backcolor="#407880" mode="Opaque">
475
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
477
<textField pattern="#,##0.00">
478
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="11" forecolor="#FFFFFF"/>
482
<textFieldExpression class="java.lang.Long"><![CDATA[$V{productoMeasure}]]></textFieldExpression>
486
<crosstabCell width="0" height="13" columnTotalGroup="period_name">
487
<cellContents backcolor="#CFE3E6" mode="Opaque">
489
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
493
<crosstabCell width="0" height="11" rowTotalGroup="default_code" columnTotalGroup="period_name">
494
<cellContents backcolor="#CFE3E6" mode="Opaque">
496
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
502
<reportElement x="-1" y="8" width="752" height="20"/>
504
<reportElement x="2" y="0" width="750" height="20"/>
505
<textElement textAlignment="Center" verticalAlignment="Middle"/>
506
<text><![CDATA[Producción Mensual. ]]></text>
511
<reportElement x="1" y="163" width="752" height="138"/>
524
<seriesExpression><![CDATA[$F{period_name}]]></seriesExpression>
525
<categoryExpression><![CDATA[$F{default_code}]]></categoryExpression>
526
<valueExpression><![CDATA[$F{producto}]]></valueExpression>
531
<itemLabel color="#000000" backgroundColor="#FFFFFF">
543
</categoryAxisFormat>
558
<reportElement x="2" y="307" width="751" height="144"/>
571
<datasetRun subDataset="graphs_mensual">
572
<datasetParameter name="location_id">
573
<datasetParameterExpression><![CDATA[$P{location_id}]]></datasetParameterExpression>
575
<datasetParameter name="fiscalyear_id">
576
<datasetParameterExpression><![CDATA[$P{fiscalyear_id}]]></datasetParameterExpression>
578
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
582
<seriesExpression><![CDATA[$F{period_name}]]></seriesExpression>
583
<categoryExpression><![CDATA[$F{period_id}]]></categoryExpression>
584
<valueExpression><![CDATA[$F{producto}]]></valueExpression>
589
<itemLabel color="#000000" backgroundColor="#FFFFFF">
601
</categoryAxisFormat>