Changes

Jump to: navigation, search

Summarize iReport Template Data

8,251 bytes removed, 21:24, 20 February 2020
no edit summary
__FORCETOC__
{{TOC right}}
{{HowTo's
|[[Start and Configure i-Report|Start and Configure i-Report]]
|[[Create a Basic i-Report Template|Create a Basic i-Report Template]]
|[[Modify an iReport Template|Modify an iReport Template]]
|[[Format an iReport Template|Format an iReport Template]]
|[[Create i-Report Templates with Subreports|Create i-Report Templates with Subreports]]
|[[Summarize i-Report Template Data|Summarize i-Report Template Data]]
}}
==Summarizing Summarising Report Data==__NOEDITSECTION__In addition to displaying report details in an iReport template, the iReport Designer allows you create creating summaries or calculations of data returned in the report. These can take the form of totals, sums, and counts (stored in Variablesvariables), or more complicated data summaries such as Crosstabs crosstabs or Chartscharts. Because summarizing data necessarily depends on multiple records, data summaries must exist in bands ''after'' the Detail band such as the Summary band, Footer badband, or Group Footer bands.
===Adding a Footer or Summary Section to the Report===__NOEDITSECTION__
Totals, averages, and other summary data are typically found at the end of a grouping or at the end of a report. If a desired band is not visible on the iReport Designer canvas:
# Select the desired band in the '''Report Inspector'''
# In the '''Properties''' pane, change the '''Band Height''' property to something more than 0 (e.g. 50).
===Displaying Counts===__NOEDITSECTION__
iReport has a built-in variable for calculating the number of records in a report and the number of records in each group if the report contains groups. The number of records in the report is stored in the REPORT_COUNT variable. The number of records in each group is stored in the <''GroupField''>_COUNT where GroupField is the name of the field on which the group is created.
</ol>
[[Image:iRep22.png|center|500px|''Figure 22. REPORT_COUNT element in summary section'']]
<div align="center">
''Figure 22. REPORT_COUNT element in summary section''
</div>
{{note|If the REPORT_COUNT element is dragged to a section of the report other than the summary, the value returned by the REPORT_COUNT variable will be determined by where it is placed. For example, if the REPORT_COUNT is placed in the pageFooter section, the value returned will be the number of records displayed so far.}}
<olstart="4">
<li>To display the number of records in each group, drag the <GroupName>_COUNT variable to the <''GroupName''>Footer section.</li>
</ol>
{{note|It may be helpful to add a text label beside any counts that you add to the report to identify the value. To add a text label, click drag the static text element [[Image:iRepText.png]] iconfrom the '''Palette''' pane. }}
===Displaying Totals===__NOEDITSECTION__
iReport allows you to display the total of a particular attribute in the report. This is done by creating a variable to store the total value (see [[Modify an iReport Template#Adding a Variable to an iReport Template| Adding a Variable to an iReport]]).
To create a custom variable:
# Follow the steps to [[Modify an iReport Template#Adding a Variable to an iReport Template| add a variable to an iReport]].
# From the '''Calculation Type''' list in the '''Properties''' pane, select the calculation that you would like to perform.
|-
| System || No calculation is made. Instead the last value is stored.
|-
| First || No calculation is made. Instead the first value is stored.
|}
</center>
{| class="wikitable" width="600"
|-
| align="center" colspan="2" | '''Table 5. Reset Types'''
|-
| width="150pt" | '''Reset Type'''
|}
==Crosstabs==__NOEDITSECTION__In addition to summary variables, iReport provides the capability to build crosstab tables that display data in a grid for easy analysis and summary. Crosstabs allow you to choose data rows, columns, and the variable to be measured and then automatically produce a grid of results for display in a chart. As with other summary variables Crosstabs are generally used in the '''Summary Band''' in a report.  To create a Crosstab:# In the '''Palette''' pane, drag a '''Crosstab''' item to the Summary Band of the report.# The Crosstab wizard displays#: [[Image:IReport Crosstab1.png|center|500px|''Crosstab wizard'']]<div align="center">''Crosstab wizard''</div># Select the '''Field''' to use in the '''Row''' of the Crosstab grid.#: [[Image:IReport Crosstab2.png|center|500px|''Crosstab wizard'']]<div align="center">''Crosstab wizard''</div># Select the '''Field''' to use in the '''Column''' of the Crosstab grid.#: [[Image:IReport Crosstab3.png|center|500px|''Crosstab wizard'']]<div align="center">''Crosstab wizard''</div># Select the '''Field''' or '''Variable''' to use to represent the data in the grid. Typically this is a numeric field (e.g. areaSize) or if a count of the records is desired, the ''REPORT_COUNT'' variable.#: [[Image:IReport Crosstab4.png|center|500px|''Crosstab wizard'']]<div align="center">''Crosstab wizard''</div># Finalise the Crosstab display.#: [[Image:IReport Crosstab5.png|center|500px|''Crosstab wizard'']]<div align="center">''Crosstab wizard''</div># The Crosstab displays.#: [[Image:IReport Crosstab6.png|center|500px|''Crosstab wizard'']]<div align="center">''Crosstab wizard''</div> The report can now be run or additional adjustments to the report can be made including resizing columns and rows, number formatting, or display adjustments.[[Image:IReport Crosstab7.png|center|500px|''Crosstab Preview'']]<div align="center">''Example Crosstab Preview''</div>???==Charts==__NOEDITSECTION__
Charts provide a visual representation of the report data. Before you add a chart to your report, you should ensure that your report contains the following:
*#At least one grouping. The report groupings are used by iReport to determine what fields may be plotted. See [[Modify an iReport Template|Modify an iReport Template]] for more information on [[Modify an iReport Template#Grouping|grouping]].*#At least one variable that contains a calculation. This calculation may be a count, total, or other custom calculation. These calculated variables define the size of the chart segment. The '''Reset type''' of this calculation should be set to '''Group''' and use the report grouping defined in #1. See [[Modify_an_iReport_Template|Modify an iReport Template]] for more information on [[Modify_an_iReport_Template#To_add_a_variable_manually|adding variables]].
===Pie Chart===__NOEDITSECTION__
====Add a Pie Chart====__NOEDITSECTION__
To add a pie 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.g. ''status'').</li><li>After creating #Ensure that the report, you should add a footer for the attribute Summary Band is available on which the results will be groupediReport template canvas. This footer will be used #[[Modify_an_iReport_Template#Adding a Variable to an iReport Template|Create a Variable]] to display contain the total for the group that will subsequently values to be used displayed in the pie chart(e.g. To add a group footer:</li><ol type="a"><li>From the ''SUM_areaSize_byStatus'View'). This variable should be based on a numeric field (e.g. '' menu, select areaSize'') and should have the 'Bands''Reset type'.</li>:The <FileName> bands… window displays. <li>Select <''GroupAttributeset to ''>Footer from the left pane where 'Group'GroupAttribute'' is and the name of group selected set to the attribute on which field you wish to create the results will be groupedchart from'' (e.g. For example, if you are creating a report on land and group the results by the priority, the name of the band would be ''priorityFooterstatus'').</li><li>In #Select the right pane, enter a numeric value in the Band Height field. You may adjust the height of the summary.</li><li>Click '''Chart''' option from the '''ApplyPalette''' button.</li></ol><li>Add a summary section pane and drag it to the report.</li><li>Click the [[Image:iRepBarChart.png]] icon.</li><li>In the summary section '''Summary Band''' of the report, hold down the mouse button and drag the cursor template to form start the rectangle which will contain the chart.</li>:A window of the various chart options displays'''Chart Wizard'''.<li>#Select one of the pie chart options.</li></ol> #:[[Image:iRep26iReport Charts1.png|center|500px|''Figure 26. Pie chart Chart options'']]<div align="center">''Figure 26. Pie chart Chart options''</div>#Choose Main report dataset.#:[[Image:iReport Charts2.png|center|500px|''Chart options'']]<ol startdiv align="7center"><li>Click the '''OK'Chart options'' button.</lidiv><li>Right-click anywhere on # The next step is to provide the correct data for the chartto use.</li><li>Select the Pie Charts require a '''Chart Propertiesunique identifier''' option.</li><li>From the Chart Properties window, select the Chart Data tab.</li><li>From the Chart Data tab, select the Details tab.</li><li>The Section Value tab should be selected by default. If it is not, select it.</li><li>The and a '''Key Expressionnumeric''' defines value where the various slices of the pie chart. This will typically be each unique value for an attribute. For example, if identifier is the chart were field to contain group the total area size of land with a particular priority, the Key Expression would return the unique values for priority data by (i.e.g., Low, Medium, or Highthe names of the wedges). To enter and numeric value is the key expression valueto sum. #:</li><ol type="a"><li>Click the [[Image:iRepEditoriReport Charts3.png|center|500px|''Chart options'']] icon that is displayed beside the Key Expression field.<div align="center">''Chart options''</lidiv>:The # To select the '''unique value''' choose the '''Expression editor window displays.<li>From ''' button and '''choose the bottom pane, double-click ''field'' the name of the attribute that contains the data report is grouped by''' (e.g. ''status''). Note that you would like to include charts in iReport will fail if the chart.</li>:The expression to represent the attribute displays in the top pane'''unique value''' is null.<li>In order to account for null values, you will need to modify the expression so that null values are grouped into their own group. The expression should be modified to include the bolded text below. You should replace attribute with the name of the attribute that you selected in step b above.</li> #:'''$F{''attribute''status} '''!== null ? "N/A" : $F{status}''attribute''} #:[[Image: "Unknown"iReport Charts5.png|center|500px|''Set Unique Value'']]<lidiv align="center">Click the '''Apply'Set Unique Value'' button.</lidiv></ol><li>The #Next, select the '''Value Expressionnumeric value''' field that contains the expression that returns the desired numeric value data for the keychart. For example, it may '''Note: This should always be the total land size of high priority landvariable created in step 3 above''' (e.g. ''SUM_areaSize_byStatus'').</li><ol type="a"><li>Click the #:[[Image:iRepEditoriReport Charts6.png|center|500px|''Select the desired numeric variable'']] icon that is displayed beside <div align="center">''Select the Value Expression field.desired numeric variable''</lidiv>:The Expression editor window displays.<li>From the Objects and expressions tab, select #Choose '''VariablesNext''' from the left pane.</li><li>From the middle pane at the bottom of the Expression editor window, double-click the name of the variable that was created to store the total#:[[Image:iReport Charts7.png|center|500px|''Chart Wizard Completed'']]</li><lidiv align="center">Click the ''Chart Wizard Completed'Apply''' button.</lidiv></ol><li>The # Choose '''Label ExpressionFinish''' field contains the expression that is used to determine the label for the segment of the pie chart. Because this expression will most likely be the same as the one used in the '''Key Expression''', you can copy the expression from the Key Expression field and paste it into the '''Label Expression''' field.</li><li>The following figure is an example of iReport template displays with the Chart Properties window for a report that contains a pie chart which graphs the total area size of land based on their priority.</li> </ol> #:[[Image:iRep27iReport Charts8.png|center|500px|''Figure 27. iReport displays with Chart Properties'']]<div align="center">''Figure 27. iReport displays with Chart Properties''</div># The report can now be previewed to ensure it is functioning as expected.#:[[Image:iReport ChartsPreview.png|center|500px|''Preview with Chart'']]<ol startdiv align="17center"><li>Click the '''Close'Preview with chart'' button</lidiv>:The ====Modify a Pie Chart Properties window closes.====__NOEDITSECTION__<li>Save the report by either clicking the iconOnce a chart has been created in iReport Designer, or its properties can be edited by selecting the '''SaveChart Data''' option from on the '''File''' right click menuand adjusting the values and properties.</li></ol>
Below To modify a chart:# Right click on the chart in iReport Designer and select '''Chart Data''' from the menu.# The Chart details window displays.#: [[Image:IReport ChartData1.png|center|500px|''Chart Data Properties'']]<div align="center">''Chart Data Properties''</div># To edit the main properties of the chart, select the '''Details tab'''. Additionally, this screen can be used to edit the reset type of the chart which is relevant if the chart is an example displayed on a band other than the summary band.# The '''Chart Details''' window displays.#: [[Image:IReport ChartData2.png|center|500px|''Chart Data Properties'']]<div align="center">''Chart Data Properties''</div># In this window, the basic properties of a report template the chart that totals were established in the Chart Wizard can be edited. These include:#* '''Key Expression''': the field used to group data for charting purposes. To change the field, simply select another field. '''Note:''' The field must be used in the creation of the variable used in the value expression or the results will be incorrect.#* '''Value Expression''': the variable used to store the data to be displayed in the chart. If changes are made this value it is recommended to edit the variable properties as well.#* '''Label Expression''': the area size of land by priorityused to define the labels for the chart. Any valid expression can be used here. See [[Summarize iReport Template Data#Variable Expressions|Variable Expressions]] for more details.
[[Image:iRep28.png|center|500px|''Figure 28. Sample report template with pie chart'']]
<div align="center">
''Figure 28. Sample report template with pie chart''
</div>
 
The resulting report pages are shown below.
[[Image:iRep29.png|center|500px|''Figure 29. Sample report with pie chart'']]
<div align="center">
''Figure 29. Sample report with pie chart''
</div>
===Bar Charts===__NOEDITSECTION__
Bar charts, unlike Pie Charts, have a third variable option that can be included in the report. In addition to the category and value expressions, bar charts add the option of a '''''series'''''. The series choice adds an additional possibility of grouping data though is not required.
{{note|The sample report ''====Add a Bar Chart Sample.jrxm l''in the <iReport Installation Directory>\iReports_IMSMA\IMSMA reports directory provides an example of a report that includes a bar chart.}}====__NOEDITSECTION__
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 report, you should add a footer for the attribute Summary Band is available on which the results will be groupediReport template canvas. This footer will be used #[[Modify_an_iReport_Template#Adding a Variable to an iReport Template|Create a Variable]] to display contain the total for the group that will subsequently values to be used displayed in the pie chart(e.g. ''SUM_areaSize_byStatus''). To add This variable should be based on a group footer:</li><ol type="a"><li>From numeric field (e.g. ''areaSize'') and should have the '''ViewReset type''' menu, select set to '''Group''Bands'and the group selected set to the field you wish to create the chart from''(e.g.</li>:The <FileName> bands… window displays''status''). <li>#Select <the '''GroupAttributeChart'''>Footer option from the left pane where ''GroupAttribute'Palette''' is the name of the attribute on which the results will be grouped. For example, if you are creating a report on land pane and group drag it to the results by the priority, the name of the band would be ''priorityFooter'Summary Band'''.</li><li>In the right pane, enter a numeric value in the Band Height field. You may adjust the height of the summary</li><li>Click report template to start the '''ApplyChart Wizard''' button.</li></ol><li>Add a summary section to #Select one of the reportbar chart options.</li><li>Click the #:[[Image:iRepBarChartIReport BarChart.png|center|500px|''Chart options'']] icon.<div align="center">''Chart options''</lidiv><li>In the summary section of the #Choose Main report, hold down the mouse button and drag the cursor to form the rectangle which will contain the chartdataset.</li>#:A window of the various chart [[Image:IReport BarChart_Step1.png|center|500px|''Chart options displays.'']]<lidiv align="center">Select one of the bar chart ''Chart options.''</lidiv><li>Click the # Provide a '''OKSeries Expression''' button.</li><li>Right-click anywhere on the chart.</li><li>Select the '(''Chart Propertiesoptional''' option).</li> <li>From the Chart Properties window, select the #:[[Image:iReport Chart Data tabBar1.png|center|500px|''Series Expression'']]</li><li>From the Chart Data tab, select the Details tab.</li><lidiv align="center">Click the ''Series Expression'Add''' button.</lidiv>:The Chart Properties window displays. By default, the Data tab should be selected. <li># The Series Expression allows you to define an added level of detail to your bar chart(if desired). To enter select the series expression value:</li><ol type="a"><li>Click '''Series''' choose the [[Image:iRepEditor.png]] icon that is displayed beside the Key Expression field.</li>:The '''Expression editor window displays.<li>From the bottom pane, double-click the name ''' button and '''choose one of the attribute that contains ''fields'' the data report is grouped by''' (e.g. ''status''). Note that you would like to include charts in iReport will fail if the chart.</li>:The expression to represent the attribute displays in the top pane'''Series''' value is null.<li>In order to account for null values, you will need to modify the expression so that null values are grouped into their own group. The expression should be modified to include the bolded text below. You should replace attribute with the field the name of the attribute field that you selected in step b above.</li>#: '''$F{''attribute''status} '''!== null ? "N/A" : $F{attributestatus} '''#: "Unknown"[[Image:iReport Charts5.png|center|500px|''Set Series Value'']]<lidiv align="center">Click the ''Set Series Value'Apply''' button.</li></oldiv>#: The expression that you enter in the Series Expression field will vary based on how you want the horizontal axis to appear:#*If you would like the horizontal axis of the bar chart to reflect a single attribute such as the chart displayed below, the Series Expression will be the same as the Category expression.</ol> #:[[Image:iRep30.png|center|500px|''Figure 30. Bar chart –Single attribute y-axis'']]<div align="center">''Figure 30. Bar chart –Single attribute y-axis''</div> <ol>#*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). </ol> #:[[Image:iRep31.png|center|500px|''Figure 31. Bar chart with different series expression'']]<div align="center">''Figure 31. Bar chart with different series expressionExpression''</div>#* '''Finally, the Series value can be left blank if desired.'''<ol># The Chart Properties window next step is to provide the correct data for this bar the chart to use. Bar charts require a '''category expression''' and a '''value expression''' where the value expression is shown belowa field to group the data by (i.e. Notice that the series expression names of the X axis) and category value expression differis the value to sum.</ol> #:[[Image:iRep32iReport Chart Bar2.png|center|500px|''Figure 32. Chart Properties – Different series Category and category expressionsValues'']]<div align="center">''Figure 32. Chart Properties – Different series Category and category expressionsValues''</div> <ol>*If you selected # To select the '''category expression''' choose the '''Expression editor''' button and '''choose one of the stacked bar chart options''fields'' the report is grouped by''' (e.g. ''status''). Note that charts in iReport will fail if the '''category expression''' is null. In order to account for null values, you will need to modify the series expression will so that null values are grouped into their own group. The expression should be used modified to determine include the segments bolded text below. You should replace field with the field that you selected above.#: '''$F{status} == null ? "N/A" : $F{status}'''#:[[Image:iReport Charts5.png|center|500px|''Set Category Expression'']]<div align="center">''Set Category Expression''</div>#Next, select the '''value expression''' that contains the desired numeric data for the chart. '''Note: This should always be one of each barthe variables created in step 3 above''' (e.g. ''SUM_status_byAreaSize''). #:[[Image:iReport Charts6. In png|center|500px|''Select the following figure, desired value expression'']]<div align="center">''Select the series desired value expression creates red ''</div># Choose '''Finish''' and blue segments in each bar the iReport template displays with the Chart.#:[[Image:iReport Chart Bar3.png|center|500px|''iReport displays with Chart'']]<div align="center">''iReport displays with Chart''</div># The report can now be previewed to indicate whether or not water access ensure it is blockedfunctioning as expected.#:[[Image:iReport Chart BarPreview.png|center|500px|''Preview with Chart'']]<div align="center">''Preview with chart''</oldiv>
[[Image:iRep33.png|center|500px|''Figure 33. Stacked ====Modify a Bar Chart====__NOEDITSECTION__Once a bar charthas been created in iReport Designer, its properties can be edited by selecting the '']]<div align="center">'Chart Data'Figure 33. Stacked bar chart''</div>option on the right click menu and adjusting the values and properties.
<ol start="14"><li>The Category Expression is the major grouping of the horizontal axis. To enter the category expression:</li><ol type="modify a"><li>Click the [[Imagebar chart:iRepEditor.png]] icon that is displayed beside the Category expression field.</li>:The Expression editor window displays.<li>From the bottom pane, double-# Right click the name of the attribute that contains the data that you would like to include in on the chart.</li>:The expression to represent the attribute displays in the top pane.<li>In order to account for null values, you will need to modify the expression so that null values are grouped into their own group. The expression should be modified to include the bolded text below. You should replace attribute with the name of the attribute that you selected in step b above.</li>$F{''attribute''} '''!= null ? $F{attribute} : "Unknown"'''<li>Click the '''Apply''' button.</li></ol><li>The '''Value Expression''' field contains the expression that returns the numeric value for the key.</li><ol type="a"><li>Click the [[Image:iRepEditor.png]] icon that is displayed beside the Value Expression field.</li>:The Expression editor window displays.<li>From the Objects iReport Designer and expressions tab, select '''Variables''' from the left pane.</li><li>From the middle pane at the bottom of the Expression editor window, double-click the name of the variable that was created to store the total.</li><li>Click the '''Apply''' button.</li></ol><li>Click the '''OK''' button.</li>:The Chart Properties window closes.<li>Click the Data'''Close''' button.</li>:The Chart Properties window closes.<li>Save the report by either clicking the [[Image:iRepSave.png]] icon, or by selecting the '''Save''' option from the '''File''' menu.</li></ol> ===Grouped Bar # The Chart===__NOEDITSECTION__The horizontal axis of the bar charts discussed in the previous section compared the values of a single variable. For example, the bar chart below compares the number of different activity typesData properties display.  [[Image:iRep34.png|center|500px|''Figure 34. Bar chart comparing values of a single variable'']]<div align="center">''Figure 34. Bar chart comparing values of a single variable''</div> In this section, you will learn how to create a grouped bar chart. A grouped bar chart compares # To edit the values of a single variable in one group to the same variables in another group. In the example below, the grouped bar chart still compares the number main properties of activity types. However, the chart also compares the number of activity types between the districts. The number of activity types (clearance, impact survey, technical survey, and road clearance) are represented by the different bar colours as indicated in the legend. The coloured bars are clustered together based on their district. The first cluster of bars shows the number of activity in the Bolikon district. The second cluster of bars shows select the number of activities in the Waltern district. [[Image:iRep35.png|center|500px|''Figure 35. Grouped bar chart comparing values of a single variable'']]<div align="center">Details tab''Figure 35. Grouped bar chart comparing values of a single variable''</div> The two main differences between adding a bar chart and a grouped bar chart are:*The grouped bar chart requires that you specify at least two groupings for the report. *The key expression and the category expression will differ; whereasAdditionally, for a bar chart, the value for these expressions is the same.  To add a grouped bar chart this screen can be used to edit the report:<ol><li>Create a report which groups the results by the fields that will be represented on the horizontal axis reset type of the chart.</li></ol> {{note|For a grouped bar chart, you will need to specify at least two groupings.}} <ol start="2"><li>Add any variables that you may need to calculate the value that you would like to show on the chart.</li><li>If you would like to display the calculated variable for each group, you should add the footer for the field on which the results will be grouped. This footer will be used to display the variable for the group that will subsequently be used in is relevant if the chart. To add a group footer:</li><ol type="a"><li>From the '''View''' menu, select '''Bands'''.</li>:The <FileName> bands… window displays. <li>Select <''GroupFieldName''>Footer from the left pane where ''GroupFieldNameis'' the name of the field is displayed on which the results will be grouped. For example, if you are creating a report on land and group the results by the priority, the name of the band would be ''priorityFooter''.</li><li>In the right pane, enter a numeric value in the Band Height field. You may adjust the height of other than the summaryband.</li><li>Click the # The '''ApplyChart Details''' button.</li><li>Add a summary section to the report.</li></ol><li>Click the [[Image:iRepBarChart.png]] icon.</li><li>In the summary section of the report, hold down the mouse button and drag the cursor to form the rectangle which will contain the chart.</li>:A window of the various chart options displays.<li>Select one of the bar chart options.</li></ol> #: [[Image:iRep36IReport Chart Bar ChartData1.png|center|500px|''Figure 36. Bar chart optionsChart Data Properties'']]<div align="center">''Figure 36. Bar chart options''</div> <ol start="8"><li>Click the '''OK''' button.</li><li>Right-click anywhere on the chart.</li><li>select the '''Chart Data Properties''' option.</lidiv><li>From the Chart Properties window, select the Chart Data tab.</li><li>From the Chart Data tab, select the Details tab.</li><li>Click # For Bar Charts this presents the '''AddCategory Series''' buttonchooser.</li>:The Chart Properties window displays. By default, the Data tab should Typically there will be only one or two series to choose from here though more can be selectedadded at this point. <li>For a grouped bar chart, Select the series expression contains the field whose distinct values you would like to show via different colours on the bar chart.</li></ol> [[Image:iRep37.png|center|500px|modify and choose ''Figure 37. Bar chart series expression'Modify']]<div align="center">''Figure 37. Bar chart series expression''</div> To enter the series expression:<ol start="15"><ol type="a"><li>Click the [[Image:iRepEditor.png]] icon that is displayed beside the Key Expression field.</li>:# The Expression editor Chart Data properties window displays.<li>From the bottom pane, double-click the name of the field that contains the data that you would like to include in the chart.</li>will display#:The expression to represent the field displays in the top pane.<li>Click the '''Apply''' button.</li></ol><li>The Category Expression is the field by which the series expression is grouped together.</li></ol> [[Image:iRep38IReport Chart Bar ChartData2.png|center|500px|''Figure 38. Bar chart category expressionChart Data Properties'']]<div align="center">''Figure 38. Bar chart category expressionChart Data Properties''</div> To enter the category expression:<ol start="16"><ol type="a"><li>Click the [[Image:iRepEditor.png]] icon that is displayed beside the Category expression field.</li>:The Expression editor # In this window displays.<li>From the bottom pane, double-click the name basic properties of the field that contains the data bar chart that you would like to include were established in the chart.</li>:The expression to represent the field displays in the top pane.<li>Click the '''Apply''' button.</li></ol><li>The '''Value Expression''' field contains the variable that returns the numeric value that will Chart Wizard can be represented on the chartedited.</li> <ol type="a"><li>Click the [[Image:iRepEditor.png]] icon that is displayed beside the Value Expression field.</li>These include:The Expression editor window displays.<li>From the Objects and expressions tab, select #*'''Variables''' from the left pane.</li><li>From the middle pane at the bottom of the Series Expression editor window, double-click the name of the variable that you would like to represent on the chart.</li><li>Click the '''Apply''' button.</li></ol><li>Click the '''OK''' button.</li>:The Chart Properties window closes.<li>Click the '''Close''' button.</li>:The Chart Properties window closes.<li>Save the report by either clicking the [[Image:iRepSave.png]] icon, or by selecting the Save option from the '''File''' menu.</li></ol> {{note|iReport requires you to save the report after adding or changing a chart.}} <ol start="20"><li>Click the [[Image:iRepCompile.png]] button to compile the report.</li><li>Click the [[Image:iRepRun.png]] button to execute the report.</li></ol> ===Stacked Bar Chart===__NOEDITSECTION__A stacked bar chart is similar to a grouped bar in that it allows you to represent two different fields on the chart. The key difference is that the stacked bar chart layers the values of the series expression (the field represented in the legend) allowing you used to easily compare the categories to one another.  [[Image:iRep39.png|center|500px|''Figure 39. Stacked bar chart'']]<div align="center">''Figure 39. Stacked bar chart''</div> To add a grouped bar chart to the report:<ol><li>Create a report which groups the results by the fields that will be represented on the horizontal axis of the chart.</li></ol> {{note|For a stacked bar chart, you will need to specify at least two groupings.}} <ol start="2"><li>Add any variables that you may need to calculate the value that you would like to show on the chart.</li><li>If you would like to display the calculated variable for each first group, you should add the footer data for the field on which the results will be grouped. This footer will be used to display the variable for the group that will subsequently be used in the chartcharting purposes. To add a group footer:</li><ol type="a"><li>From change the '''View''' menufield, simply select another field. '''Bands'''.</li>Note:The <FileName> bands… window displays. <li>Select <''GroupFieldName''>Footer from the left pane where ''GroupFieldName'' while this field is the name of the field on which the results will required it can be grouped. For example, if you are creating a report on land and group the results made blank or fixed by the priority, the name of the band would be ''priorityFooter''.</li> <li>In the right pane, enter being set to a numeric value in the '''Band Height''' field. You may adjust the height of the summary</li><li>Click the '''Apply''' button.</li></ol><li>Add a summary section to the report.</li><li>Click the [[Image:iRepBarChart.png]] icon.</li><li>In the summary section of the report, hold down the mouse button and drag the cursor to form the rectangle which will contain the chart.</li>:A window of the various chart options displays.<li>Select one of the stacked bar chart options.</li></ol> [[Imageconstant such as:iRep40.png|center|500px|''Figure 40. Stacked bar chart options'']]<div align="center">''Figure 40. Stacked bar chart options''</div> <ol start=or "8Blank"><li>Click the '''OK''' button.</li><li>Right-click anywhere on the chart.</li><li>Select the #*'''Chart Properties''' option.</li><li>From the Chart Properties window, select the Chart Data tab.</li><li>From the Chart Data tab, select the Details tab.</li.<li>Click the 'Category Expression''Add''' button.</li>:The Chart Properties window displays. By default, the Data tab should be selected. <li>For a stacked bar chart, the series expression contains the fields whose distinct value.</li> <li>For a grouped bar chart, the series expression contains the field whose distinct values you would like used to show via different colours on the bar chartgroup data for charting purposes. To enter the series expression:</li><ol type="a"><li>Click the [[Image:iRepEditor.png]] icon that is displayed beside change the Key Expression field.:The Expression editor window displays.</li><li>From the bottom pane, double-click the name of the field that contains the data that you would like to include in the chart.</li>:The expression to represent the simply select another field displays in the top pane.<li>Click the '''ApplyNote:''' button.</li></ol><li>The Category Expression is the field by which the series expression is grouped together. To enter the category expression:</li><ol type="a"><li>Click the [[Image:iRepEditor.png]] icon that is displayed beside the Category expression field.</vli>:The Expression editor window displays.<li>From must be used in the bottom pane, double-click the name creation of the field that contains the data that you would like to include variable used in the chart.</li>The value expression to represent or the field displays in the top paneresults will be incorrect.<li>Click the Apply button.</li></ol><li>The #* '''Value Expression''' field contains : the variable that returns used to store the numeric value that will data to be represented on displayed in the chart.</li><ol type="a"><li>Click the [[Image:iRepEditor.png]] icon that If changes are made this value it is displayed beside recommended to edit the Value Expression fieldvariable properties as well.</li>:The Expression editor window displays.<li>From the Objects and expressions tab, select '''Variables#* ''' from the left pane.</li><li>From the middle pane at the bottom of the Label Expression editor window, double-click the name of the variable that you would like to represent on the chart.</li><li>Click the '''Apply''' button.</li></ol><li>Click the '''OK''' button.</li>:The Chart Properties window closes.<li>Click the '''Close''' button.</li>:The Chart Properties window closes.<li>Save area used to define the report by either clicking labels for the [[Image:iRepSavechart.png]] icon, or by selecting the '''Save''' option from the '''File''' menu.</li> <li>Click the [[Image:iRepCompileAny valid expression can be used here.png]] button to compile the report.</li><li>Click the See [[Image:iRepRun.pngSummarize iReport Template Data#Variable Expressions|Variable Expressions]] button to execute the reportfor more details.</li></ol>
{{NavBox HowTo use iReportStandardizing Data Analysis and Information Reporting}}[[Category:NAA]]
6,632
edits

Navigation menu