Changes

Jump to: navigation, search

Summarize iReport Template Data

10,282 bytes removed, 15:04, 13 November 2015
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__
</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>
</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, drag the static text field element [[Image:iRepText.png]] from the '''Palette''' pane. }}
===Displaying Totals===__NOEDITSECTION__
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:
# 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>
# Finalize Finalise the Crosstab display.
#: [[Image:IReport Crosstab5.png|center|500px|''Crosstab wizard'']]<div align="center">''Crosstab wizard''</div>
# The Crosstab displays.
[[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 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 '''Group''' and the group selected set to the field you wish to display create the chart from'' (e.g. ''status'').#Select the total for '''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 chartoptions. To add a group footer#:[[Image:iReport Charts1.png|center|500px|''Chart options'']]<div align="center">''Chart options''</lidiv>#Choose Main report dataset.#:[[Image:iReport Charts2.png|center|500px|''Chart options'']]<ol typediv align="acenter">''Chart options''<li/div>From # The next step is to provide the correct data for the chart to use. Pie Charts require a '''Viewunique identifier''' menu, select and a '''Bandsnumeric'''value where the unique identifier is the field to group the data by (i.e. the names of the wedges) and numeric value is the value to sum.</li>#:The <FileName> bands… window displays[[Image:iReport Charts3. png|center|500px|''Chart options'']]<lidiv align="center">Select <''GroupAttributeChart options''</div>Footer from # To select the left pane where ''GroupAttribute'unique value'' is ' choose the name of '''Expression editor''' button and '''choose the attribute on which ''field'' the results report is grouped by''' (e.g. ''status''). Note that charts in iReport will be groupedfail if the '''unique 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 the priority, the name of the band would be bolded text below.#: '''$F{status} == null ? "N/A" : $F{status}'priorityFooter''#:[[Image:iReport Charts5.png|center|500px|''Set Unique Value'']]<div align="center">''Set Unique Value''</lidiv><li>In #Next, select the right pane, enter a '''numeric value in ''' that contains the Band Height field. You may adjust desired numeric data for the height of the summarychart.</li><li>Click '''Note: This should always be the variable created in step 3 above'''(e.g. 'Apply'SUM_areaSize_byStatus'' button). #:[[Image:iReport Charts6.png|center|500px|''Select the desired numeric variable'']]</lidiv align="center">''Select the desired numeric variable''</oldiv><li>Add a summary section to the report#Choose '''Next'''.</li><li>Click the #:[[Image:iRepBarChartiReport Charts7.png|center|500px|''Chart Wizard Completed'']] icon.<div align="center">''Chart Wizard Completed''</lidiv><li>In the summary section of the report, hold down the mouse button # Choose '''Finish''' and drag the cursor to form the rectangle which will contain iReport template displays with the chartChart.</li>#:A window of the various chart options [[Image:iReport Charts8.png|center|500px|''iReport displays.with Chart'']]<lidiv align="center">Select one of the pie chart options.''iReport displays with Chart''</li></oldiv># The report can now be previewed to ensure it is functioning as expected.#:[[Image:iRep26iReport ChartsPreview.png|center|500px|''Figure 26. Pie chart optionsPreview with Chart'']]<div align="center">''Figure 26. Pie Preview with chart options''</div>====Modify a Pie Chart====__NOEDITSECTION__Once a chart has been created in iReport Designer, its properties can be edited by selecting the '''Chart Data''' option on the right click menu and adjusting the values and properties.
<ol start="7">To modify a chart:<li>Click # Right click on the chart in iReport Designer and select '''OKChart Data''' buttonfrom the menu.</li><li>Right-click anywhere on the chart# The Chart details window displays.</li><li>Select the '#: [[Image:IReport ChartData1.png|center|500px|''Chart Data Properties''' option.]]</lidiv align="center"><li>From the ''Chart Data Properties window, select the Chart Data tab.''</lidiv><li>From # To edit the main properties of the Chart Data tabchart, select the Details tab.</li><li>The Section Value tab should be selected by default. If it is not, select it.</li><li>The '''Key ExpressionDetails tab''' defines . Additionally, this screen can be used to edit the various slices reset type of the pie chart. This will typically be each unique value for an attribute. For example, which is relevant if the chart were to contain the total area size of land with is displayed on a particular priority, the Key Expression would return band other than the unique values for priority (esummary band.g# The '''Chart Details''' window displays., Low, Medium, or High). To enter the key expression value#:</li><ol type="a"><li>Click the [[Image:iRepEditorIReport ChartData2.png|center|500px|''Chart Data Properties'']] icon that is displayed beside the Key Expression field.<div align="center">''Chart Data Properties''</lidiv>:The Expression editor # In this window displays.<li>From the bottom pane, double-click the name basic properties of the attribute chart that contains the data that you would like to include were established in the chartChart Wizard can be edited.</li>These include: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''} ''Key Expression'!= null ? $F{''attribute''} : "Unknown"'''<li>Click the field used to group data for charting purposes. To change the field, simply select another field. '''ApplyNote:''' button.</li></ol><li>The '''Value Expression''' field contains must be used in the creation of the expression that returns variable used in the numeric value for expression or the key. For example, it may results will be the total land size of high priority landincorrect.</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 and expressions tab, select #* '''VariablesValue Expression''' 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 used to store the totaldata to be displayed in the chart.</li><li>Click If changes are made this value it is recommended to edit the '''Apply''' buttonvariable properties as well.</li></ol><li>The #* '''Label Expression''' field contains : the expression that is area used to determine define the label labels for the segment of the pie chart. Because this Any valid expression will most likely can 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''' fieldhere.</li><li>The following figure is an example of the Chart Properties window See [[Summarize iReport Template Data#Variable Expressions|Variable Expressions]] for a report that contains a pie chart which graphs the total area size of land based on their prioritymore details.</li>
</ol>
 
[[Image:iRep27.png|center|500px|''Figure 27. Chart Properties'']]
<div align="center">
''Figure 27. Chart Properties''
</div>
 
<ol start="17">
<li>Click the '''Close''' button</li>
:The Chart Properties window closes.
<li>Save the report by either clicking the icon, or by selecting the '''Save''' option from the '''File''' menu.</li>
</ol>
 
Below is an example of a report template that totals the area size of land by priority.
 
[[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.g.</li>''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 to display the total for the group that will subsequently be used in the pie chartbased on a numeric field (e.g. To add a group footer:</li><ol type="a"><li>From the ''areaSize'View') and should have the '' menu, select 'Reset type''Bands'set to ''.</li>:The <FileName> bands… window displays. <li>Select <'Group''GroupAttribute'''>Footer and the group selected set to the field you wish to create the chart from the left pane where ''GroupAttribute(e.g. ''status'' is ).#Select the name of '''Chart''' option from the attribute on which '''Palette''' pane and drag it to the '''Summary Band''' of the results will be grouped. For example, if you are creating a report on land and group template to start the results by the priority, the name of the band would be ''priorityFooter'Chart Wizard'''.</li><li>In #Select one of the right pane, enter a numeric value in the Band Height fieldbar chart options.#:[[Image:IReport BarChart. You may adjust the height of the summary</li><li>Click the png|center|500px|''Chart options'Apply']]<div align="center">''Chart options'' button.</lidiv></ol>#Choose Main report dataset.<li>Add a summary section to the report.</li><li>Click the #:[[Image:iRepBarChartIReport BarChart_Step1.png|center|500px|''Chart options'']] icon.<div align="center">''Chart options''</lidiv><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# Provide a '''Series Expression''' (''optional'').</li> #:A window of the various chart options displays[[Image:iReport Chart Bar1.png|center|500px|''Series Expression'']]<li>Select one of the bar chart options.</lidiv align="center"><li>Click the ''Series Expression'OK''' button.</lidiv><li>Right-click anywhere on the # The Series Expression allows you to define an added level of detail to your bar chart(if desired).</li><li>Select To select the '''Series''' choose the '''Chart PropertiesExpression editor'''button and ' 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 ''choose one of the 'Add'fields'' the report is grouped by''' button(e.</li>:The Chart Properties window displaysg. By default, the Data tab should be selected''status''). <li>The Note that charts in iReport will fail if the '''Series Expression allows you to define an added level of detail ''' value is null. In order to account for null values, you will need to your bar chart. To enter modify the series expression value:</li><ol type="a"><li>Click the [[Image:iRepEditor.png]] icon so that is displayed beside the Key Expression fieldnull values are grouped into their own group.</li>:The Expression editor window displaysexpression should be modified to include the bolded text below.<li>From You should replace the bottom pane, double-click field the name of the attribute that contains the data field that you would like to include in the chartselected above.<#: '''$F{status} == null ? "N/li>A" : $F{status}'''#:The expression to represent the attribute displays in the top pane[[Image:iReport Charts5.png|center|500px|''Set Series Value'']]<lidiv align="center">In order to account for null values, you will need to modify the ''Set Series Value''</div>#: The expression so that null values are grouped into their own group. The expression should be modified to include you enter in the bolded text below. You should replace attribute with Series Expression field will vary based on how you want the name of the attribute that horizontal axis to appear:#*If you selected in step b above.</li>$F{''would like the horizontal axis of the bar chart to reflect a single attribute''} '''!= null ? $F{attribute} such as the chart displayed below, the Series Expression will be the same as the Category expression.#:[[Image: "Unknown"iRep30.png|center|500px|'''Bar chart –Single attribute y-axis'']]<lidiv align="center">Click the ''Bar chart –Single attribute y-axis'Apply''' button.<</lidiv></ol>The expression that #*If you enter in would like the horizontal axis of the Series Expression field will vary based on how you want the horizontal axis bar chart to appear:*If you would like reflect the horizontal axis values of an additional attribute, the bar chart to reflect a single attribute such as the chart displayed below, the Series Series Expression will would be the same as expression for the Category expressionsecondary level of detail.</ol> [[Image:iRep30.png|center|500px|''Figure 30In the example shown below, the x-axis reflects the land priorities (e.g. Bar chart –Single attribute y-axis'']]<div align="center">''Figure 30, Low, Medium, or High). Bar chart –Single attribute y-axis''</div> <ol>*If you would like In addition to displaying the priority, the horizontal axis bars of the bar chart to use a different colour to reflect those land which block water access (red) vs. those that do not block the values of an additional attribute, the Series Expression would be the expression for the secondary level of detailwater (blue). In the example shown below, the x-axis reflects the land priorities (e#:[[Image:iRep31.g., Low, Medium, or High). In addition to displaying the priority, the bars of the png|center|500px|''Bar chart use a with different colour to reflect those land which block water access (red) vs. those that do not block the water (blue). series expression'']]</ol> [[Image:iRep31.png|div align="center|500px|">''Figure 31. Bar chart with different series expressionExpression'']]</div align="center">>#* '''Figure 31Finally, the Series value can be left blank if desired. Bar chart with different series expression'''</div> <ol>The Chart Properties window # The next step is to provide the correct data for this bar the chart is shown belowto use. Notice that the series expression and Bar charts require a '''category expression differ.</ol> [[Image:iRep32.png|center|500px|''Figure 32. Chart Properties – Different series ' and category expressionsa '']]<div align="center">'value expression'Figure 32. Chart Properties – Different series and category expressions''</div> <ol>*If you selected one where the value expression is a field to group the data by (i.e. the names of the stacked bar chart options, X axis) and value expression is the series expression will be used value to determine the segments of each barsum. In the following figure, the series expression creates red and blue segments in each bar to indicate whether or not water access is blocked.</ol> [[Image:iRep33#:[[Image:iReport Chart Bar2.png|center|500px|''Figure 33. Stacked bar chartCategory and Values'']]<div align="center">''Figure 33. Stacked bar chartCategory and Values''</div> <ol start="14"><li>The Category Expression is the major grouping of the horizontal axis. To enter # To select the '''category expression:</li><ol type="a"><li>Click ''' choose the [[Image:iRepEditor.png]] icon that is displayed beside the Category 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 '''category expression to represent the attribute displays in the top pane''' 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 field with the name of the attribute field that you selected in step b above.</li>#: '''$F{''attribute''status} '''!== null ? $F{attribute} : "UnknownN/A": $F{status}'''<li>Click the #:[[Image:iReport Charts5.png|center|500px|''Set Category Expression'Apply']]<div align="center">''Set Category Expression'' button.</lidiv></ol><li>The #Next, select the '''Value Expressionvalue expression''' field that contains the expression that returns the desired numeric value data for the keychart.</li><ol type="a"><li>Click '''Note: This should always be one of the [[Image:iRepEditorvariables created in step 3 above''' (e.g.png]] icon that is displayed beside the Value Expression field''SUM_status_byAreaSize'').</li>#:The Expression editor window displays[[Image:iReport Charts6.<li>From the Objects and expressions tab, select png|center|500px|''Select the desired value expression'Variables']]<div align="center">'' from Select the left pane.desired value expression''</lidiv><li>From # Choose '''Finish''' and the middle pane at iReport template displays with the bottom of the Expression editor window, double-click the name of the variable that was created to store the totalChart.#:[[Image:iReport Chart Bar3.</li><li>Click the png|center|500px|''iReport displays with Chart'Apply']]<div align="center">''iReport displays with Chart'' button.</lidiv></ol># The report can now be previewed to ensure it is functioning as expected.<li>Click the #:[[Image:iReport Chart BarPreview.png|center|500px|'''OK'Preview with Chart'' button.]]</lidiv align="center">:The Chart Properties window closes.<li>Click the ''Preview with chart'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 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 types.  [[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 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 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 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">''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; whereas, for a bar chart, the value for these expressions is the same.  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></oldiv>
{{note|For ====Modify a Bar Chart====__NOEDITSECTION__Once a grouped bar charthas been created in iReport Designer, you will need to specify at least two groupingsits properties can be edited by selecting the '''Chart Data''' option on the right click menu and adjusting the values and properties.}}
<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 the chart. To add a group footer:</li><ol type="modify 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 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 the summary.</li><li>Click the '''Apply''' 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:iRep36.png|center|500px|''Figure 36. Bar chart options'']]<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>in iReport Designer and select the '''Chart PropertiesData''' optionfrom the menu.</li><li>From the Chart Properties window, select the # The Chart Data tabproperties display.</li><li>From # To edit the main properties of the Chart Data tabchart, select the Details tab.</li><li>Click the '''AddDetails tab''' button.</li>:The Chart Properties window displays. By defaultAdditionally, the Data tab should this screen can be selected. <li>For a grouped bar chart, used to edit the series expression contains reset type of the field whose distinct values you would like to show via different colours on chart which is relevant if the bar chart.</li></ol> [[Image:iRep37.png|center|500px|''Figure 37. Bar chart series expression'']]<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 on a band other than the Key Expression fieldsummary band.</li>:# The Expression editor 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>:The expression to represent the field displays in the top pane.<li>Click the '''ApplyChart Details''' button.</li></ol><li>The Category Expression is the field by which the series expression is grouped together.</li></ol>window displays#: [[Image:iRep38IReport Chart Bar ChartData1.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 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>:The expression to represent the field displays in the top pane.<li>Click # For Bar Charts this presents the '''ApplyCategory Series''' buttonchooser.</li></ol><li>The '''Value Expression''' field contains the variable that returns the numeric value that Typically there will be represented on the chart.</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 and expressions tab, select '''Variables''' only one or two series to choose from the left panehere though more can be added at this point.</li><li>From Select the middle pane at the bottom of the Expression editor window, double-click the name of the variable that you would like series to represent on the chart.</li><li>Click the '''Apply''' button.</li></ol><li>Click the '''OK''modify and choose ' button.</li>:The Chart Properties window closes.<li>Click the ''Modify'Close''' button.</li>:# The Chart Properties Data properties window closes.will display<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 IReport Chart 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 to easily compare the categories to one another.  [[Image:iRep39ChartData2.png|center|500px|''Figure 39. Stacked bar chartChart Data Properties'']]<div align="center">''Figure 39. Stacked bar chartChart Data Properties''</div> To add a grouped bar chart to the report:<ol><li>Create a report which groups # In this window, the results by the fields that will be represented on the horizontal axis basic properties 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 were established in 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 Chart Wizard can be groupededited. This footer will be used to display the variable for the group that will subsequently be used in the chart. To add a group footerThese include:</li><ol type="a"><li>From the #*'''ViewSeries Expression''' menu, select '''Bands'''.</li>:The <FileName> bands… window displays. <li>Select <''GroupFieldName''>Footer from the left pane where ''GroupFieldName'' is the name of the field on which the results will be grouped. For example, if you are creating a report on land and used to first group the results by the priority, the name of the band would be ''priorityFooter''data for charting purposes.</li> <li>In To change the right panefield, enter a numeric value in the '''Band Height''' simply select another field. You may adjust the height of the summary</li><li>Click the '''ApplyNote:''' button.</li></ol><li>Add while this field is required it can be made blank or fixed by being set to 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 '''AddCategory Expression''' 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 change the series expression:</li><ol type="a"><li>Click the [[Image:iRepEditor.png]] icon that is displayed beside 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 must be used in 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 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 pane.<li>Click the Apply buttonresults will be incorrect.</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 field.</li>:The Expression editor window displaysvariable properties as well.<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''' menuAny valid expression can be used here.</li> <li>Click the See [[Image:iRepCompile.pngSummarize iReport Template Data#Variable Expressions|Variable Expressions]] button to compile the report.</li><li>Click the [[Image:iRepRun.png]] button to execute the reportfor more details.</li></ol>
{{NavBox HowTo use iReportStandardizing Data Analysis and Information Reporting}}[[Category:VIE]]
4,913
edits

Navigation menu