Bonjour,
je génère un rapport principal qui contiend 2 sous-rapports
malheureusement, j'obtiends une page blanche (mis à part le header et footer qui sont bien présents). Le panneau central est vide.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184 <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="crf" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/> <style name="table"> <box> <pen lineWidth="1.0" lineColor="#000000"/> </box> </style> <style name="table_TH" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table_CH" mode="Opaque" backcolor="#FFBFBF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="border" isBlankWhenNull="false" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> </style> <parameter name="SIMPLE_DATA" class="java.util.HashMap"> </parameter> <parameter name="subReport_6071684_JasperReport" class="net.sf.jasperreports.engine.JasperReport"/> <parameter name="subReport_14892984_JasperReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="softwareVersion" class="java.lang.String"/> <field name="subNbr" class="java.lang.Integer"/> <field name="activityName" class="java.lang.String"/> <field name="sstStatus" class="java.lang.String"/> <field name="scheduleName" class="java.lang.String"/> <field name="subReport_6071684" class="java.lang.String"/> <field name="subReport_14892984" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="4" splitType="Stretch"/> </title> <pageHeader> <band height="45" splitType="Stretch"> <frame> <reportElement style="border" mode="Opaque" x="1" y="0" width="555" height="45" forecolor="#000000" backcolor="#FFFFFF"/> <staticText> <reportElement x="3" y="32" width="53" height="13"/> <textElement> <font fontName="Arial" size="10" isBold="true"/> </textElement> <text><![CDATA[Schedule:]]></text> </staticText> <textField > <reportElement x="56" y="32" width="139" height="13"/> <textElement> <font fontName="Arial" size="10" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$F{scheduleName}]]></textFieldExpression> </textField> <staticText> <reportElement x="2" y="8" width="42" height="15"/> <textElement> <font fontName="Arial" size="10" isBold="true"/> </textElement> <text><![CDATA[Subject:]]></text> </staticText> <textField> <reportElement x="44" y="8" width="63" height="15"/> <textElement> <font fontName="Arial" size="10" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$F{subNbr}]]></textFieldExpression> </textField> <textField bookmarkLevel="3"> <reportElement x="192" y="5" width="177" height="18"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$F{activityName}]]></textFieldExpression> <anchorNameExpression><![CDATA[ $F{activityName}]]></anchorNameExpression> </textField> <textField> <reportElement x="201" y="27" width="151" height="18"/> <textElement> <font fontName="Arial" size="10" isBold="false"/> </textElement> <textFieldExpression><![CDATA[($F{sstStatus}.equals("131")? "Completed":$F{sstStatus}.equals("132")? "Completed with Information not available":$F{sstStatus}.equals("133")? "Completed with Forced Validation ":$F{sstStatus}.equals("141")? "Completed after unmarking ":$F{sstStatus}.equals("142")? " Information Not Available after unmarking ":$F{sstStatus}.equals("143")? "Forced Validation after marking":$F{sstStatus}.equals("151")? "Completed after unmarking ":$F{sstStatus}.equals("152")? " Information Not Available after unmarking ":$F{sstStatus}.equals("153")? "Forced Validation after marking":$F{sstStatus}.equals("999")? "Never entered":$F{sstStatus}.equals("111")? "Marked":$F{sstStatus}.equals("121")? "Marked":$F{sstStatus}.equals("134")? "Data pending":$F{sstStatus}.equals("141")? "Completed after unmarking":$F{sstStatus}.equals("151")? "Completed after unmarking":$F{sstStatus}.equals("142")? "Information Not Available after unmarking":$F{sstStatus}.equals("152")? "Information Not Available after unmarking":$F{sstStatus}.equals("143")? "Forced Validation after marking":$F{sstStatus}.equals("153")? "Forced Validation after marking": ($F{sstStatus}.equals("144") || $F{sstStatus}.equals("154"))? "Data pending after marking":$F{sstStatus}.equals("112")? "Marked with Information not available":$F{sstStatus}.equals("122")? "Marked with Information not available":$F{sstStatus}.equals("113")? "Marked with Forced Validation ":$F{sstStatus}.equals("123")? "Marked with Forced Validation ": $F{sstStatus}.equals("135")? "Medical doctor": $F{sstStatus}.equals("241")? "Unmarked and completed on cleaned data": $F{sstStatus})]]></textFieldExpression> </textField> <image> <reportElement x="408" y="0" width="146" height="45"/> <imageExpression><![CDATA["/Users/xflamant/Documents/enable/src/main/webapp/img/logo-gsk.gif"]]></imageExpression> </image> </frame> </band> </pageHeader> <columnHeader> <band height="4" splitType="Stretch"/> </columnHeader> <detail> <band height="594" splitType="Stretch"> <subreport> <reportElement positionType="FixRelativeToTop" x="0" y="0" width="554" height="297"/> <subreportParameter name="subReport_6071684"> <subreportParameterExpression><![CDATA[$P{SIMPLE_DATA}.get($F{subReport_6071684})]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression><![CDATA[$P{SIMPLE_DATA}.get($F{subReport_6071684})]]></dataSourceExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{subReport_6071684_JasperReport}]]></subreportExpression> </subreport> <subreport> <reportElement positionType="FixRelativeToTop" x="0" y="297" width="554" height="297"/> <subreportParameter name="subReport_14892984"> <subreportParameterExpression><![CDATA[$P{SIMPLE_DATA}.get($F{subReport_14892984})]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression><![CDATA[$P{SIMPLE_DATA}.get($F{subReport_14892984})]]></dataSourceExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{subReport_14892984_JasperReport}]]></subreportExpression> </subreport> </band> </detail> <columnFooter> <band height="8" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="30" splitType="Stretch"> <frame> <reportElement mode="Opaque" x="1" y="0" width="554" height="30" forecolor="#D0B48E" backcolor="#FFFFFF"/> <textField pattern="ddMMMyyyy HH:mm:ss"> <reportElement style="Column header" x="432" y="4" width="119" height="13" forecolor="#000000"/> <textElement verticalAlignment="Middle"> <font size="10" isBold="false"/> </textElement> <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> </textField> <textField> <reportElement x="224" y="3" width="39" height="20"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA[$V{PAGE_NUMBER}+"/"]]></textFieldExpression> </textField> <textField evaluationTime="Report"> <reportElement x="264" y="3" width="40" height="20"/> <textElement/> <textFieldExpression><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> <staticText> <reportElement x="432" y="18" width="30" height="11"/> <textElement> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[eN@ble]]></text> </staticText> <textField evaluationTime="Report"> <reportElement x="464" y="19" width="86" height="10"/> <textElement> <font size="8"/> </textElement> <textFieldExpression><![CDATA[$F{softwareVersion}]]></textFieldExpression> </textField> <textField> <reportElement x="1" y="0" width="116" height="14"/> <textElement> <font fontName="Arial" size="10" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{activityName}]]></textFieldExpression> </textField> <textField> <reportElement x="1" y="14" width="116" height="15"/> <textElement> <font fontName="Arial" size="10" isBold="false"/> </textElement> <textFieldExpression><![CDATA[($F{sstStatus}.equals("131")? "Completed":$F{sstStatus}.equals("132")? "Completed with Information not available":$F{sstStatus}.equals("133")? "Completed with Forced Validation ":$F{sstStatus}.equals("141")? "Completed after unmarking ":$F{sstStatus}.equals("142")? " Information Not Available after unmarking ":$F{sstStatus}.equals("143")? "Forced Validation after marking":$F{sstStatus}.equals("151")? "Completed after unmarking ":$F{sstStatus}.equals("152")? " Information Not Available after unmarking ":$F{sstStatus}.equals("153")? "Forced Validation after marking":$F{sstStatus}.equals("999")? "Never entered":$F{sstStatus}.equals("111")? "Marked":$F{sstStatus}.equals("121")? "Marked":$F{sstStatus}.equals("134")? "Data pending":$F{sstStatus}.equals("141")? "Completed after unmarking":$F{sstStatus}.equals("151")? "Completed after unmarking":$F{sstStatus}.equals("142")? "Information Not Available after unmarking":$F{sstStatus}.equals("152")? "Information Not Available after unmarking":$F{sstStatus}.equals("143")? "Forced Validation after marking":$F{sstStatus}.equals("153")? "Forced Validation after marking": ($F{sstStatus}.equals("144") || $F{sstStatus}.equals("154"))? "Data pending after marking":$F{sstStatus}.equals("112")? "Marked with Information not available":$F{sstStatus}.equals("122")? "Marked with Information not available":$F{sstStatus}.equals("113")? "Marked with Forced Validation ":$F{sstStatus}.equals("123")? "Marked with Forced Validation ": $F{sstStatus}.equals("135")? "Medical doctor": $F{sstStatus}.equals("241")? "Unmarked and completed on cleaned data": $F{sstStatus})]]></textFieldExpression> </textField> </frame> </band> </pageFooter> <summary> <band height="9" splitType="Stretch"/> </summary> </jasperReport>
Les 2 sous rapport sont normalement des pages avec des champs qui contiennent des valeur et qui ont un label.
Je ne vois pas comment débuguer cela et je me pose les questions suivantes: si j'ai 3 sous rapports, est-ce que la pagination va être incrémentée correctement sur 3 pages et est-ce que les header et footer des sous rapports seront ceux du sous rapport correspondant ou ceux du rapport parent (le rapport principal)
Je me demande si je ne vois rien si ce n'est pas une histoire de pagination
Merci si vous pouviez me donner une piste
Partager