iReport Ultimate Guide - Nimsoft Library
iReport Ultimate Guide - Nimsoft Library iReport Ultimate Guide - Nimsoft Library
iReport Ultimate GuideFigure 11-23 The master report with the two subreports for addresses and hobbiesIn the Detail band, position the id, lastname, and firstname fields. Underneath these fields, add the two Subreportelements, the first for the e-mail addresses, the second for the hobbies.The e-mail and hobby subreports are identical except for the name of the field in each one (see Figure 11-22). The two reportsshould be as large as the Subreport elements in the master report, so remove the margins and set the report width accordingly.Figure 11-24 The subreport layoutPreview both the subreports just to compile them and generate the relative .jasper files. You will get an error during the fillprocess, but it’s okay. We have not set an Xpath query, so UR is not able to get any data. You can resolve theproblem by setting a simple Xpath query (it will not be used in the final report), or you can preview the subreport using anempty data source (you will have to select it from the combo box in the tool bar).When the subreports are done, execute the master report. If everything is okay, you will see the print shown in Figure 11-25.It displays people grouped by home and work categories and the subreports associated with every person.194
Data Sources and Query ExecutersFigure 11-25 The first page of the final resultAs this example demonstrates, the real power of the XML data source is the versatility of XPath, which allows navigating thenode selection in a refined manner.11.6.6 Using CSV Data SourcesInitially, the data source for CSV documents was a very simple data source proof-of-concept that showed how to implement acustom data source. The CSV data source interface was improved when UR added a native implementation to fill areport using a CSV file.To create a connection based on a CSV file, click the New button in the Connections/Datasources dialog box and select FileCSV data source from the data source types list to bring up the dialog box shown in Figure 11-26.195
- Page 143 and 144: TemplatesIf a static text element i
- Page 145 and 146: TemplatesFigure 9-8Your custom temp
- Page 147 and 148: TemplatesFigure 9-10New template in
- Page 149 and 150: TemplatesFigure 9-12Preview of repo
- Page 151 and 152: SubreportsCHAPTER 10 SUBREPORTSSubr
- Page 153 and 154: SubreportsFigure 10-3Subreport elem
- Page 155 and 156: SubreportsFigure 10-4Subreport Para
- Page 157 and 158: SubreportsFigure 10-7Just a list of
- Page 159 and 160: SubreportsFigure 10-11 Subreport Wi
- Page 161 and 162: SubreportsFigure 10-14 The final re
- Page 163 and 164: Subreports3. Click the Add button t
- Page 165 and 166: Subreports10.4 Using the Subreport
- Page 167 and 168: SubreportsFigure 10-21 Subreport co
- Page 169 and 170: SubreportsFigure 10-23 Setting Subr
- Page 171 and 172: Data Sources and Query ExecutersCHA
- Page 173 and 174: Data Sources and Query Executers•
- Page 175 and 176: Data Sources and Query ExecutersFig
- Page 177 and 178: Data Sources and Query ExecutersFig
- Page 179 and 180: Data Sources and Query ExecutersFig
- Page 181 and 182: Data Sources and Query ExecutersFig
- Page 183 and 184: Data Sources and Query ExecutersFig
- Page 185 and 186: Data Sources and Query ExecutersFig
- Page 187 and 188: Data Sources and Query Executers•
- Page 189 and 190: Data Sources and Query ExecutersAft
- Page 191 and 192: Data Sources and Query ExecutersIns
- Page 193: Data Sources and Query Executerspub
- Page 197 and 198: Data Sources and Query ExecutersFig
- Page 199 and 200: Data Sources and Query Executersbe
- Page 201 and 202: Data Sources and Query ExecutersFig
- Page 203 and 204: Data Sources and Query ExecutersWhe
- Page 205 and 206: Data Sources and Query ExecutersCod
- Page 207 and 208: Data Sources and Query ExecutersPre
- Page 209 and 210: Data Sources and Query ExecutersFig
- Page 211 and 212: Data Sources and Query Executersspe
- Page 213 and 214: Data Sources and Query Executers•
- Page 215 and 216: Data Sources and Query Executersof
- Page 217 and 218: Data Sources and Query ExecutersThi
- Page 219 and 220: Data Sources and Query ExecutersCod
- Page 221 and 222: Data Sources and Query ExecutersIf
- Page 223 and 224: ChartsCHAPTER 12 CHARTSUR provides
- Page 225 and 226: ChartsFigure 12-3Chart selection wi
- Page 227 and 228: ChartsFigure 12-6Dataset configurat
- Page 229 and 230: settings). These four fields have t
- Page 231 and 232: ChartsFigure 12-10 Chart Theme Desi
- Page 233 and 234: ChartsFigure 12-12 Example chart th
- Page 235 and 236: Run your report. iReport should dis
- Page 237 and 238: Charts1. First create a report.Figu
- Page 239 and 240: Charts4. Right-click on the chart a
- Page 241 and 242: Flash ChartsCHAPTER 13 FLASH CHARTS
- Page 243 and 244: Flash ChartsThe layout properties f
Data Sources and Query ExecutersFigure 11-25 The first page of the final resultAs this example demonstrates, the real power of the XML data source is the versatility of XPath, which allows navigating thenode selection in a refined manner.11.6.6 Using CSV Data SourcesInitially, the data source for CSV documents was a very simple data source proof-of-concept that showed how to implement acustom data source. The CSV data source interface was improved when UR added a native implementation to fill areport using a CSV file.To create a connection based on a CSV file, click the New button in the Connections/Datasources dialog box and select FileCSV data source from the data source types list to bring up the dialog box shown in Figure 11-26.195