Personalizing Reports through Interactivity Activity

 

 

 

Step

Action

1. 

Note: Reports viewed in JasperReports Server allow you to:

 

 

- Move, hide, and adjust the width of columns.

- Update the font family, text size and color, and alignment for both column headers and data fields

- Use multi-column filtering and sorting to display the records you need in the order you want

2. 

Note: Personalize your report with on-the-fly data formatting, filtering, and sorting.

 

One report can be formatted and saved as different versions. The interactivity helps each user personalize a report according to their unique needs.

3. 

Note: Begin by searching for the report named Employee Information.

 

Enter "Employee Information" into the search field and click the Search button.

4. 

Click the Employee Information report title to run the report.

5. 

Note: The report, titled Current Employee Information, appears in the Interactive Viewer.

6. 

Click the Salary column to display the column menu.

7. 

Note: The column menu appears.

 

8. 

Point to the Format menu, at the top left of the column menu, and click the Formatting menu item.

9. 

Note: The Format column window appears.

10. 

Click the Apply to drop-down.

11. 

Note: Apply formatting to Headings (column titles) or Detail Rows (column values). 

 

Depending on the contents of your report, you can also apply formatting to group headings, subtotals, totals, etc.

12. 

Note: For Headings, you can change the heading text, select a font and size, specify style and alignment, and choose a background and text color.

13. 

Click the Apply to drop-down.

14. 

Click the Detail Rows menu item to see column values formatting.

15. 

Note: Because the Salary column displays numeric information, options listed just above the < Previous Column button at the lower left include the appropriate format patterns.

16. 

Note: Number format and currency symbols, displayed at the lower right, are also available.

17. 

Click the Currency menu at the window's lower right to view the symbols.

18. 

Click to select the USD dollar symbol.

19. 

Click the comma in the Number format section to serve as the thousands separator.

20. 

Note: The patterns at the lower left reflect your selected currency formatting.

21. 

Click the third pattern, the one with no minus sign, to select it.

22. 

In the Format pattern text field at the lower left, select and remove the space between the dollar sign and the first digit of the dollar figure (represented by the first pound sign).

23. 

Note: The space is removed.

 

24. 

Click the OK button to save formatting changes and close the window.

25. 

Note: Salary values are formatted as you specified.

26. 

Now, format the column header and date values of the Hired column.

 

Click the Hired column to display the column menu.

27. 

Point to the Format menu and click the Formatting menu item.

28. 

Click the Apply to drop-down.

29. 

Click the Headings menu item.

30. 

At the top left, under Heading text, delete the current heading text value.

31. 

Add the new column header text.

 

Enter Hire Date into the Heading text field.

32. 

Note: The new header label appears in the report after the OK button is clicked.

33. 

Click the Apply to drop-down.

34. 

Click the Detail Rows menu item.

35. 

In the Format pattern list, click today's date in the MM/dd/yyyy format.

36. 

Click the OK button to save formatting changes and close the window.

37. 

Note: The Hired column label is updated and dates are formatted to your specification.

38. 

Next, format the text of the first column's header and data fields.

 

Click the First column at the far left to display the column menu.

39. 

Point to the Format menu and click the Formatting menu item.

40. 

Note: Display the column header in Garamond with size 14, bold, dark green text.

41. 

In the Font field on the left, click the Ariel list item.

42. 

In the Size field, click the 14 list item.

43. 

In the Style section, click the B button to make the heading bold.

44. 

At the far right, click the capital A to display the text color chooser.

45. 

Select the Dark Green cell at the bottom of the fifth column of color tiles.

46. 

Note: Header formatting takes effect after the OK button is clicked.

47. 

Now, format the text of employees' first names that appear in the report.

 

Click the Apply to drop-down.

48. 

Click the Detail Rows menu item.

49. 

In the Font field on the left, click the Ariel list item.

50. 

In the Size field, click the 12 list item.

51. 

At the far right, click the capital A to display the text color chooser.

52. 

Select the Dark Green cell at the bottom of the fifth column of color tiles.

53. 

Click the OK button to save formatting changes and close the window.

54. 

Note: The column header and field values reflect the new formatting.

55. 

If you wish, take a few minutes and format the remaining columns to match the first.

56. 

Next, hide a column.

 

Click one of your columns to view the column menu.

57. 

Point to the Format menu and click the Hide column menu item.

58. 

Note: The column is removed from the table layout.

 

 

Now, return the column to your report. Click another column to view its column menu, point to the Format menu and the Show columns menu choice, then select All.

59. 

Next, add space between the Education and Title columns.

 

Click the Education column to select it.

60. 

Note: The right side of a selected column is bordered by a dotted line. This allows you to widen or narrow the column.

61. 

Now, click and drag the dotted line to the right to widen the column.

62. 

Note: Greater separation appears between the two columns.

63. 

Next, move the Salary column to the left of the Hire Date column.

 

Click to select the Salary column.

64. 

Note: With the column selected, click anywhere in the column and drag it to the left. When the dotted line appears in the correct position, release the mouse button.

 

Drag and drop the Salary column to the left of Hire Date.

65. 

Note: Salary appears at the left of Hire Date.

66. 

The Undo and Redo buttons (left and right arrows near the right end of the tool bar) allow quick access to your edit history.

 

Click the Undo button.

67. 

Note: The most-recent action is undone, and the two columns return to their original positions.

68. 

Click the Redo button.

69. 

Note: The two columns return to their new positions.

70. 

Now, specify that salaries greater than or equal to $30,000 appear in dark red text.

 

Click the Salary column to view the column menu.

71. 

Point to the Format menu and Click the Formatting menu item.

72. 

Click the Conditional Formatting tab.

73. 

Click the Add button at the far left to configure a formatting rule.

74. 

In the Operator column, click the drop-down and select Greater than or equal to.

75. 

In the Condition text field, enter 30,000 with a comma and no dollar sign.

76. 

Salaries that satisfy the rule display in dark red.

 

Click the capital A to open the text color palette.

77. 

Select the dark red cell at the top left.

78. 

Note: The conditional rule specifies that salaries greater than or equal to $30,000 appear in dark red text.

79. 

Click the OK button to save changes and close the window.

80. 

Note: The salaries you identified appear in dark red.

 

Task 1: Personalize and format a report, is complete.

81. 

Note: The name of the report currently open, Employee Information, is displayed in the top-left corner, along with the date and time the window was last refreshed.

82. 

Next, save this version of the report formatted to your specification.

 

At the right of the Back button, point to the Save menu and select Save As.

83. 

Note: The Save As window appears.

84. 

Save the revised report under a new name.

 

At the end of the text in the Name field, add "-v1" so this version of the report is named Employee Information-v1.

85. 

Down below, expand the Organization folder.

86. 

Select the Report folder.

87. 

Click the Save button to save this version of the report and close the window.

88. 

Note: In the upper-left corner, the name of the new version of the report is displayed.

 

Task 2: Save the report, is complete.

89. 

Next, explore filtering and sorting to segment the report and view specific information. Create filters on the Education and Title columns to identify store managers who have earned a Bachelors Degree.

 

Click the Education column to display the column menu.

90. 

Create a filter that allows records of only employees with a Bachelors Degree to display in the report.

 

Click the funnel-shaped Column filters button.

91. 

Note: The Filter column window appears.

92. 

Note: To delete an existing filter and display all rows, select the first radio button.

 

To configure a new filter select the second radio button.

93. 

Click the Show only rows where option to configure a new filter.

94. 

Click the filter operators drop-down and select Contains.

95. 

Enter Bachelors into the text field.

96. 

Note: The filter you configured identifies values of the Education field that contain the word Bachelors.

97. 

Click the OK button to add the filter.

98. 

Note: The report displays records of employees who have a Bachelors Degree.

99. 

Note: The filter icon at the right of the column header indicates that a filter is configured on the column.

100. 

Configure a second filter to identify all store managers.

 

Click the Title column to display the column menu.

101. 

Click the Column filters button.

102. 

Click the Show only rows where option to create a new filter.

103. 

Note: The default filter operator is Equals.

104. 

Enter Store Manager into the text field.

105. 

Click the OK button to add the filter.

106. 

Note: Together, the two filters constrain the report to display records of store managers who have earned a Bachelors Degree.

 

Multiple filters are a powerful tool for segmenting your reports to find specific information.

107. 

Now, edit the Education filter to identify employees with a partial college education.

 

Click the Education column to display the column menu.

108. 

Click the Column filters button.

109. 

Click the filter operators drop-down and select Equals.

110. 

In the text field, replace Bachelors with the text Partial College.

111. 

Click the OK button to save changes and modify the filter.

112. 

Note: The report now displays the records of store managers with a partial college education.

113. 

Now, remove both filters and return the report to its default view.

 

Click the Education column to display the column menu.

114. 

Click the Column filters button.

115. 

Click the Show all rows option to remove the filter.

116. 

Click the OK button to save changes and delete the filter.

117. 

Note: The filter icon no longer appears adjacent to the Education column header, and the Education column is no longer filtered.

118. 

Repeat the previous steps to remove the filter on the Title column.

119. 

Note: Both filters are removed and the report displays all records.

120. 

Next, sort the report by salary to view information on the lowest- and highest-paid employees.

 

Click the Salary column to display the column menu.

121. 

Click the Sort ascending (up-arrow) button.

122. 

Note: Records are displayed in order of increasing salary, from least to greatest.

123. 

Now, reverse the sort to view the highest-paid employees.

 

Click to display the Salary column menu, then click the Sort descending button.

124. 

Note: The sort order is reversed and report records are displayed in order of decreasing salary.

125. 

Remove the sort.

 

Click to display the Salary column menu.

126. 

To remove a sort, click the button that represents the current sort direction.

 

Click the Sort descending button.

127. 

Note: The salary sort is removed and the report again displays its records in default order.

128. 

Next, configure concurrent sorts on last name and hire date to identify employees who share last names and were hired at the same time.

 

Click to display the Last column menu.

129. 

Click the Sort ascending button.

130. 

Note: Records are sorted by last name in ascending alphabetical order.

131. 

Configure sorting on the hire date.

 

Click to display the Hire Date column menu.

132. 

Click the Sort ascending button.

133. 

Note: The report displays records ordered by last name and then by hire date.

 

Examine the hire dates of the four employees with last name Allen.

134. 

Now, remove the hire date sort.

 

Click to display the Hire Date column menu.

135. 

Click the Sort ascending button to remove the sort.

136. 

Note: The report remains sorted by last name.

137. 

Next, combine filtering and sorting to identify employees with a partial college education who were hired before 2011.

 

Click to display the Education column menu.

138. 

Click the Column filters button.

139. 

Click the Show only rows where option to configure a new filter.

140. 

Click the drop-down and select Contains.

141. 

Enter College into the text field.

142. 

Click the OK button to add the filter.

143. 

Note: Records are displayed alphabetically by last name only for employees with a partial college education.

144. 

Configure a second filter on hire date.

 

Click to display the Hire Date column menu.

145. 

Click the Column filters button.

146. 

Click the Show only rows where option.

147. 

Click the drop-down and select Is before.

148. 

Click in the filter text field.

149. 

Note: Configuring a date filter opens the calendar tool.

 

 

You can click through the calendar to select a date, or enter the date manually into the text field.

150. 

In the calendar, select January 1, 2011.

151. 

Click the OK button to add the filter.

152. 

Note: The report displays records of employees with a partial college education who were hired before 2011. Records are sorted alphabetically by last name.

 

Task 3: Filter and sort to segment the data, is complete.

153. 

Next, save this version of the report.

 

Point to the Save menu and select Save As.

154. 

In the Name field, change v1 to v2.

155. 

Note: JasperReports Server remembers the folder in which you last saved the report.

156. 

Click the Save button to save version 2 of the report.

157. 

Note: The top-left corner of the window displays the name of the report's current version.

 

Task 4: Save the updated report, is complete.

158. 

Click the Back button to close the report and return to the reports list.

159. 

Congratulations!

 

You completed the following four tasks:

 

1. Personalize and format a report

2. Save the report

3. Filter and sort to view specific information

4. Save a second version of the report

End of Procedure.