Changes

Jump to: navigation, search

Summarize iReport Template Data

3,731 bytes added, 16:54, 20 September 2013
Charts
====Add a Bar Chart====
To add a bar chart to the report:
<ol><li>#Create a report which groups the results by the attribute on which you would like to base your chart(e.</li>g. ''status'')<li>After creating #Ensure that the Summary Band is available on the report, you should add iReport template canvas.#[[Modify_an_iReport_Template#Adding a Variable to an iReport Template|Create a footer for Variable]] to contain the attribute on which values to be displayed in the results will be groupedchart (e.g. ''SUM_areaSize_byStatus''). This footer will variable should be used based on a numeric field (e.g. ''areaSize'') and should have the '''Reset type''' set to display '''Group''' and the total for group selected set to the field you wish to create the chart from'' (e.g. ''status'').#Select the '''Chart''' option from the '''Palette''' pane and drag it to the '''Summary Band''' of the report template to start the group that will subsequently be used in '''Chart Wizard'''.#Select one of the pie bar chartoptions. To add a group footer#:[[Image:iReport Charts1.png|center|500px|''Chart options'']]</li><ol typediv align="acenter">''Chart options''<li/div>From the #Choose Main report dataset.# Provide a '''Series Expression'''('View'optional'' menu, select ). #:[[Image:iReport Charts2.png|center|500px|''Series Expression'Bands']]<div align="center">''Series Expression''.</lidiv>:# The <FileName> bands… window displaysSeries Expression allows you to define an added level of detail to your bar chart (if desired). <li>Select <To select the '''GroupAttributeSeries'''>Footer from choose the left pane where ''GroupAttribute'Expression editor''' button and ''' is the name choose one of the attribute on which ''fields'' the results report is grouped by''' (e.g. ''status''). Note that charts in iReport will be groupedfail if the '''Series''' value is null. For exampleIn order to account for null values, if you will need to modify the expression so that null values are creating a report on land and grouped into their own group . The expression should be modified to include the results by bolded text below. You should replace the priority, field the name of the band would be field that you selected above.#: '''priorityFooter$F{status} == null ? "N/A" : $F{status}'''#:[[Image:iReport Charts5.png|center|500px|''Set Series Value'']]<div align="center">''Set Series Value''</lidiv><li>In the right pane, #: The expression that you enter a numeric value in the Band Height Series Expression field. You may adjust will vary based on how you want the horizontal axis to appear:#*If you would like the height horizontal axis of the summarybar chart to reflect a single attribute such as the chart displayed below, the Series Expression will be the same as the Category expression.#:[[Image:iRep30.png|center|500px|''Figure 30. Bar chart –Single attribute y-axis'']]<div align="center">''Figure 30. Bar chart –Single attribute y-axis''</lidiv><li>Click #*If you would like the horizontal axis of the bar chart to reflect the values of an additional attribute, the Series Expression would be the expression for the secondary level of detail. In the example shown below, the x-axis reflects the land priorities (e.g., Low, Medium, or High). In addition to displaying the priority, the bars of the chart use a different colour to reflect those land which block water access (red) vs. those that do not block the water (blue). #:[[Image:iRep31.png|center|500px|''Figure 31. Bar chart with different series expression'Apply']]<div align="center">'' buttonFigure 31.Bar chart with different series Expression''</lidiv>  #:[[Image:iReport Charts2.png|center|500px|''Chart options'']]<div align="center">''Chart options''</oldiv><li>Add # The next step is to provide the correct data for the chart to use. Bar charts require a '''unique identifier''' and a summary section '''numeric''' value where the unique identifier is the field to group the reportdata by (i.e. the names of the wedges) and numeric value is the value to sum.</li><li>Click the #:[[Image:iRepBarChartiReport Charts3.png|center|500px|''Chart options'']] icon.<div align="center">''Chart options''</lidiv><li>In # To select the '''unique value''' choose the '''Expression editor''' button and '''choose the summary section of ''field'' the reportis grouped by''' (e.g. ''status''). Note that charts in iReport will fail if the '''unique value''' is null. In order to account for null values, hold down you will need to modify the mouse button and drag expression so that null values are grouped into their own group. The expression should be modified to include the cursor to form bolded text below. You should replace attribute with the rectangle which will contain name of the chartattribute that you selected in step b above.#: '''$F{status} == null ? "N/A" : $F{status}'''#:[[Image:iReport Charts5.png|center|500px|''Set Unique Value'']]<div align="center">''Set Unique Value''</lidiv>#Next, select the '''numeric value''' that contains the desired numeric data for the chart. '''Note:A window of This should always be the various chart options displaysvariable created in step 3 above''' (e.g. ''SUM_status_byAreaSize'').#:[[Image:iReport Charts6.png|center|500px|''Select the desired numeric variable'']]<lidiv align="center">''Select one of the bar chart options.desired numeric variable''</lidiv>#Choose '''Next'''.#:[[Image:iReport Charts7.png|center|500px|''Chart Wizard Completed'']]<lidiv align="center">Click ''Chart Wizard Completed''</div># Choose '''Finish''' and the iReport template displays with the Chart.#:[[Image:iReport Charts8.png|center|500px|''iReport displays with Chart'']]<div align="center">'OK'iReport displays with Chart'' button</div># The report can now be previewed to ensure it is functioning as expected.#:[[Image:iReport ChartsPreview.png|center|500px|''Preview with Chart'']]<div align="center">''Preview with chart''</lidiv>  
<li>Right-click anywhere on the chart.</li>
<li>Select the '''Chart Properties''' option.</li>
319
edits

Navigation menu