DoingMore-BusinessObjectsXI

download DoingMore-BusinessObjectsXI

of 96

Transcript of DoingMore-BusinessObjectsXI

Doing More with BusinessObjectsBusinessObjects XI Course Outline

This course is designed to give learners skills and knowledge needed to support more complex user query, reporting and analysis requirements, using BusinessObjects InfoView and Web Intelligence.

BusinessObjects XI provides web-based reporting environment in which reports can be created, edited, made available for others to view, or distributed onwards. These course materials are aimed at an audience who are familiar with the basics of BusinessObjects reporting, and follows on from Getting Started with BusinessObjects guidance materials.InfoView Preferences

Logging onto InfoView

To use InfoView and Web Intelligence, you must first log on to MyEd portal and launch BOXI from the 'BusinessObjects Reporting' channel which is located on the Admin tab.

Note: To use the advanced features of BusinessObjects Enterprise and InfoView, it is recommended that you use Internet Explorer.

To log on to InfoView

1. Open your web browser. 2. Go to MyEd portal: https://www.myed.ed.ac.uk 3. From the Admin tab, click on the Launch BOXI button to open the application.

4. The BusinessObjects InfoView home page appears as illustrated:

Setting InfoView Preferences

InfoView presents a number of formats for viewing Web Intelligent documents. Before you begin you need to define the 'Interactive' format as the default option for your user account. This will allow you to filter, sort, add simple calculations, or drill on the values displayed in the reports.

To do this, simply follow the 3 steps below:

5. From the InfoView home page, select the preferences icon from the Navigational bar as illustrated here.

6. Select the Web Intelligence Document tab and check the radio button beside Interactive to set your view format.

7. Once you have done this, scroll down to the end of the page and select the OK button to save changes.

You preferences will be saved and you will be returned to the InfoView Home page once again.

InfoView Preferences for date formats

Note: InfoView picks up language-related formatting from the options set in your browser. The language preference in IE7 is set to English [en-gb] so there are usually no problems with date formatting in reports viewed with IE. However, in Firefox, the default setting is English/American[en-us], hence incorrect date formatting is displayed.

If you encounter this problem, simply change the InfoView Preference setting to English (United Kingdom), by following the steps below:

8. From the InfoView home page, select the preferences icon from the Navigational bar.

9. Select the 'General' tab and scroll down to section titled "My interface locals is". From the drop-down box, select English (United Kingdom) and hit "Apply" and then "OK". (You can also set your preferred 'interface locals' under the Web Intelligence tab.

Logging off from InfoView

When you log off from InfoView, you can save any settings you may have changed.

10. From the navigation Bar, click the Log off icon.

11. The "Logout with EASE" page will now be displayed in your browser. Make sure you click the "Logout Now" button to ensure that you have logged off successfully.

Lesson 2: Restricting Data Returned by a Query

This lesson describes how to set up and group query filters. Query filters allow you to limit the data returned from the underlying database and displayed in your document.Step 1: Restricting data with query filters

Restricting queries allows you to limit the amount of data that is retrieved from the data source and returned to your Web Intelligence reports. This is know as setting up a query filter.

Query Filters Overview

Query filters retrieve a subset of the available data, based on the definition of the filter. For example, you can apply a query filter on the "Year" dimension, to view only sales revenue for a specific year. Restricting the query ensures that you retrieve only the data that interests you. This increases the usefulness of your reports. It minimises the quantity of data returned and reduces the time required to create and refresh the document over the network.

Using query filters has the following advantages:

You retrieve and are able to focus on only the data you need to answer a specific business question.

You hide data you do not want specific users to see when they access the document.

You minimise the quantity of data returned to the document to optimise performance.

Some universes have predefined filters built into them by the universe designer. Users without rights to edit the query cannot modify the query filters you define. This ensures that the data saved with the document is appropriate for those who view or analyse the date within that document.

Components of a query filter

Filters are created in the Query Filters pane of the Web Intelligence report panels.

Query filters are made up of three parts:

Object - the object on which you want to filter data

Operator - the relationship between the object and operand. Common operators are: Equal to, Different from, Greater than, Greater than or equal to, Less than, and Less than or equal to.

Operand - the object values to be used for filtering.

Every filter must include an object, an operator and an operand. These elements act together to specify what subset of the data you want to retrieve. The following page holds a list of operators you can choose from: OperatorRetrieves data Example

Equal to equal to a value specified [Country] Equal to UK retrieves data for the UK country value only

Different fromdifferent from a specified value [Quarter] Different from Q4 retrieves data for all quarters except Q4.

Greater thangreater than a specified value [Customer Age] Greater than 60 retrieves data for customers over age 60.

Greater than or equal to greater than or equal to a specified value [Revenue] Greater than or equal to 10000 retrieves data for revenue starting from 10,000 and up.

Less than lower than the specified value [Exam Grade] Less than 40 retrieves data for exam grades below 40.

Less than or equal to lower or equal to specified value [Custom Age] Less than or equal to 30 retrieves data for customers age 30 or less.

Betweenbetween two specified values; also includes values specified [Weeks] Between 25 and 36 retrieves data for weeks from week 25 to 36, inclusive.

Not Between outside the range of the values specified [Weeks] Not Between 25 and 36 retrieves data for all weeks of the year excluding week 25 through to 36. Week 25 and 36 are also excluded.

In List same as values specified [Country] In list 'US; Japan:UK' retrieves data for countries US, Japan and UK.

Not in List different from multiple values specified [Country] Not in List 'US; Japan:UK' retrieves data for all countries except US, Japan and UK.

Is null for which there is no value entered in the database [Children] is null retrieves for customers without children where null is entered as a value for the database under the children column.

Is not null for which a value was entered in the database [children] Is not null retrieves data for customers with children where any value is entered into the database under the children column.

Matches pattern including specific string [Phone] Matches Pattern, '773' retrieves data for all phone numbers that have '773' in them.

Different from pattern doesnt include a specific string [Phone] Different from Pattern, '773' retrieves all phone numbers that do not have '773' in them.

Bothcorresponds to two specified values [Account Type] Both "fixed" and "mobile" retrieves data for customers who have both a fixed and mobile telephone.

Exceptcorresponds to one specified value and does not correspond to another specified values. [Account Type] "fixed" Except "mobile" retrieves data for customers who have a fixed telephone but dont have a mobile phone.

There are four types of query filters that you can use in Web Intelligence:

Predefined query filters - these are built right into the universe

Single and multi-value filters

Prompted filters

complex filters

Proceed to the next step to learn more about the different types of filters.Step 2: Modifying a query with a predefined query filter

Using a predefined query filter

In this step you will learn to modify a query in the Edit Query view by adding a predefined filter to the query. Like custom query filters that you define yourself, a predefined query filter allows you to limit the data returned by the query to specific values.

Note: This lesson assumes you have previously created and saved a report, as detailed in "Getting started with BusinessObjects" training materials. See Lesson 4 Step 2 - Getting Started with BusinessObjects. We will use the Sales Revenue Report for the purpose of this exercise, but you can use your own report if you prefer.

To modify a query

12. In InfoView, open the Sales Revenue Report from your Favourites folder.

The document displays in the InfoView Workspace window.

13. Click the Hide Navigation Panel arrow to collapse the InfoView Navigation Panel and view the document in your full browser.

14. In the InfoView Workspace, click the drop-down arrow on the toolbar to view the Document menu.

15. Select Edit from the Document menu.The document opens in the Web Intelligence Java Report Panel. Note that the document appears in the Edit Report view.

16. Click the Edit Query button on the toolbar to open the Edit Query view.The document opens in Edit Query view.

17. First, edit the query by dragging Store Name to the Results Objects pane. Then drag the This Year predefined filter to the Query Filters Pane, as shown below:

18. Click Run Query on the Edit Query view toolbar.Web Intelligence sends your query to the BusinessObjects server, which processes it and sends it to the database to retrieve the information you requested in the query.When the data is returned by the BusinessObjects server, the Edit Report view opens and displays the data in a block, by default a table block. The query has retrieved the data and displayed it in a new report in your document. The information appears in a table in the report window. You can see the objects you selected in the Data tab, in the left hand side of the Edit Report window.

Also, now that you have retrieved additional data, Store Name from the database with your modified query, you need to project this new data into the block in your report.

Note: This process is called projecting data and is detailed in "Getting started with BusinessObjects" training materials. See Lesson 4 Step 4 - Getting Started with BusinessObjects should you wish to revise this topic.

Notice that the report now also contains the Store Name and displays data for 2003 only, as it is the current reporting year in our sample data. You can also see from the report tab at the bottom of the window that this new document contains a single report.

19. Select "Save as..." from the Save drop-down menu and save the document as a report query.

20. Click + to expand the Categories in the Save dialog box

21. Select the check box for My Sales Documents category under Personal Categories

22. Click OK

Step 3: Applying a single-value query filter

In a single-value query filter, you limit the data returned to one single value for that object. For example, you can find data for a certain store name by building a condition on "Store Name" dimension object, then selecting the name of the store you are interested in by selecting if from the dialog box that appears.

Creating a single-value query filter

In this scenario, you want to produce a report that shows total Jewellery sales revenue for each state.

To create a single-value query filter using the filter editor

23. In the Java Report panel, build a query using the eFashion universe and select the State, City, Category and Sales revenue objects.

24. Drag the Category object that you want to filter by into the Query Filters pane. The default filter definition appears in the Query Filters pane. You use this default definition to define the operator and the operand type.

25. Click the arrow next to the InList operator.

26. In the drop-down list that appears, select equal to.

27. Click the arrow next to the bulleted list button to the far right of the filter definition. This is known as Operand Type drop-down menu appears that allows you to select the operand type.

You could type the category value directly in the filter definition's text box, if you were sure that you knew the value and its precise spelling. Later in this lesson you will select the Prompt operand type, in order to select a specific value from the list of values returned by the Category object.

28. Click Value(s) from list. the list of values from the Category object is retrieved from the database and displayed in the List of Values dialog box.

29. From the Category list, double-click Jewellery. Jewellery appears in the Value(s) Selected text box. In the Search All Values test box, you can:

Perform wildcard searches using (*) to replace one or several characters of the value searched for. For example, clicking in the Search All Values text box, typing C*, then clicking the Binoculars button retrieves all categories starting with C (Cardigan and Casual Dresses).

Or, use (?) to replace one character for the value searched for. For example, clicking in the Search All Values text box, typing S?irts, then clicking the Binoculars button retrieves the value Skirts and Shirts.

30. Click OK. The query filter you just created appears in the query Filter panel showing the filter's object, operator and operand.

31. Click Run Query. The report now displays data concerning Sales Revenue for Jewellery, by State and City.

32. Save the report in your Favourites as Simple Query Filter.

Editing a single-value filter

To edit a query filter

33. Continue working with the Simple Filter report.

34. Click Edit Query.

35. In the Query Filter pane, click the Operand Type drop-down arrow and select Value(s) from list to open the List of Values dialog box.

36. From the category list, double-click Evening Wear.

37. Click OK. The query filter appears in the Query Filters panel showing the filter's object, operator and operand.

38. Click Run Query. The report now displays data concerning Sales revenue for Evening wear only, by State and City.

Deleting a query filter

To delete a query filter

39. Continue working with the Simple Query Filter report.

40. Click Edit Query to ensure you are in Query view.

41. From the Query filters panel, click the Category Equal to: Evening Wear filter that you want to delete.

42. Press the delete key on your keyboard.

Step 4: Using prompts to restrict data

Prompted filters

A prompt is a dialog box that appears whenever a document is refreshed. Prompts can be designed to allow users to manually enter data or select data from a list of values.

The prompt dialog box asks you, or any user who refreshes the document, to choose which data is to be retrieved and displayed in the report and focus on a specific part of the information available. This is known as a prompted filter.

Prompted filters allow multiple users viewing a single document to specify a different subset of the database information, and yet still display it in the same tables and charts in the report.

You can use a prompted filter to define a question that is displayed whenever the data in the document is refreshed. Users can answer the prompt either by typing or by selecting values. Prompts can be defined on any dimension, measure or detail object listed in the Data tab in Query view.

Note: you cannot use the operators NULL and Not NULL when creating prompted filters.

Creating a prompted query filter

In this scenario you want to produce the same report showing sales revenue per state, but this time you want the report to prompt the user to select a product category, each time the report is refreshed.

In this way, the report can display data not just about the Jewellery category, but about any product category that interests the user at that moment.

To create a prompt in a report

43. In the Java Report panel, click the New Document toolbar button to create a new document

44. Create a new query by moving the State, City, Category and Sales Revenue objects into the Results Objects panel.

45. Drag the Category object into the Query Filters pane. The Filter editor displays.

46. From the Operator drop-down menu, select the Equal To operator.

47. Under Operand type, select Prompt as operand type. The filter definition updates in the Query Filters pane.

48. Click the Prompt button next to the "Enter Category:" text box, in the query filter definition. The prompt dialog appears.

The options for creating a prompt are displayed. Several of the prompt options are selected by default.

Prompt text - you can type any text that you want to prompt the user to select a Category value. This text will appear each time the user refreshes this document.

Prompt with List of Values - useful when you want the user to view all the values for the object and then select from those values.

Select only from List - this option is useful in preventing users from typing a value that may not exist in the database.

Keep last value(s) selected - the value that was selected the last time the report was refreshed is selected by default in the prompt list box.

Set default value(s) - the values specified as default. If you selected this option, the Prompt dialog box expands and displays all the values returned by the Category object. This allows you to specify a value that you would like to display by default when this document is first run or refreshed.

49. Type Select a Category in the Prompt text box.

50. Leave the defaults options as they appear and click OK. The Edit Query view shows the filter you have defined in the Query Filters pane.

51. Click Run Query. The Prompts dialog box appears, showing the list of values for Category, the object you used to create the prompted filter.

52. Under Category, double-click Casual dresses from the list of values.

53. Click Run Query. The report now displays data concerning Sales revenue for casual dresses only, by state and city. Note: The prompt displays each time the report is refreshed manually. Refresh the report on your own, selecting different values each time.

54. Save the document to your Favourites as Prompts

Editing a prompted query filter

To edit a prompt

Continue working with the Prompts report.

55. Click Edit Query

56. In the Query Filters pane, click the Operator drop-down arrow to display the operators, and select In List.

57. Click the Prompt button next to the prompt text box

58. Edit the prompt text to read Select a Category from the list.

59. Check Set default value(s).The Prompt dialog box expands and displays all the values returned by the category object. this allows you to specify a value that you would like to be displayed by default when the query is first run.

60. Double-click Evening Wear to specify that this should be displayed when the query is first run

61. Double-click Day Wear to add another value to the Value(s) Selected box.

62. Click OK.

63. Click Run Query to display the new Prompts dialog box. Notice that this time the values you specified, Evening Wear and Day Wear, are presented by default in the Prompt Zone.

64. Click Run Query in the Prompts dialog box

65. Save the document

Now you can save this document to a public folder and the next time a user opens the document in InfoView, the report will display data concerning Evening wear. If the user then decides to refresh the data, the prompt dialog box will allow the user to select another value.

Step 5: Using Complex filters

Using logical operators for multiple conditions

To produce a report that focuses more precisely on certain data, you may need to apply more than one filter. When you specify more than one filter in a query, the relationship between the filters must use either the AND or OR operator. These are known as logical operators.

The AND operator is used when both conditions defined in the two filters must be met for a row to be returned from the database when you run a query.

The OR operator is used when either one or the other of the conditions defined in the filters must be met for a row to be returned from the database when you run a query.

Using the AND operator

By default, when you add a second filter to a query, Web Intelligence automatically places an AND operator between the two conditions. You saw this behaviour when you added the predefined filter to your query in the last practice activity.In this scenario, you want to produce a report showing sales revenue per state. You want the report to show revenue data concerning only the years 2001 and 2002, and for all states except DC.

To create a report using the AND operator

66. In the Java Report Panel, create a new document. Build a query by moving the Year, State and Sales revenue objects to the Result Objects panel.

67. Drag the Year object into the Query Filters panel.The default filter definition displays and shows that Year is the object you are applying a filter on.

68. Leave the default operator, In List, as the operator you use for this filter. You want to filter for two values, therefore you need to display the values in a list before you can select the ones you require.

69. Click the Operand Type drop-down arrow, and click Value(s) from list. The values available for the object are displayed in the List of Values box.

70. From the Year column, double-click 2001 and 2002. The values you selected now appear in the Values Selected zone.

71. Click OK.The Filter Editor dialog box closes and the Edit Query view opens again, with the filter you just defined displayed in the Query Filters pane.

72. Create a second filter using the State object.

73. From the Operator drop-down list, select Not Equal to.

74. Under Operand Type, click Value(s) from list.The values available for the object are displayed in the List of Values box.

75. Double-click DC.

76. Click OK.Once you create the second filter Web Intelligence automatically applies the AND as the default operator.

77. Click Run Query.The report displays Sales revenue for all the States except DC for the years 2001 and 2002.

78. Save the document to your Favourites as Multiple Filters in the Favourites folder.

Using the OR operator

In this scenario, you want to continue working with the report above, however we are going to add additional filters to focus on states meeting a certain criteria. The states (except DC) we are focused on are those with sales in either 2001, 2002 or those that have had sales of more than $2,000,000.

To create a report using the OR operator

Continue working with the Multiple Filters report.

79. Click Edit Query to ensure you are working in Query View.

80. From the Data tab, click and drag Sales revenue into the Query Filters pane.

81. From the Operator drop-down list, select Greater Than.

82. Click in the Type a constant text box and enter 2000000 as the value.Note: Be sure to exclude dollar signs and commas. The number must be a true numeric in order for the query to execute properly.The query filter updates.

Once again, the default condition of And is applied. However, in this example we want to retrieve data for the (all States except DC AND Years 2001, 2002) OR any state / year combination that had sales greater than $2,000,000. You need to apply the OR operator to get the result you desire.

83. Drag the Sales revenue filter in the Query Filters pane and drop it on top of the State filter.Web Intelligence automatically groups the two filters together.

The And operator displays as the default. However, the And condition will not retrieve the data we are interested in. We want to retrieve data where (Year InList: 2001; 2002) And (State DC) Or (Sales Revenue > 2,000,000). We need to continue adjusting the condition.

84. Drag the State filter in the Query Filters pane and drop it on top of the Year filter to group the State and Year filters together. The query filters are now grouped properly. However, the And / And combination is incorrect. As a final step, you will need to change one of the And operators to an Or operator

85. Double-click on the And between (State / Year) and Sales revenue.The Query Filter pane should now look like:

86. Click Run Query.The report displays All States except DC for the years 2001 and 2002 AND any states that have Sales revenue greater than $2,000,000 regardless of their state and year.

Notice the last three rows in the table: data appears for California, New York and Texas for 2003 even though we selected only the Years 2001 and 2002. This is because of the OR condition that specifies to ALSO bring back any rows that had sales greater than $2,000,000 regardless of year or state.

87. Save the document to your Favourites folder as Multiple Filters 2.

Prioritising operators

You are applying a complex filter when you combine several filters in a single query. In order to ensure that the filters retrieve exactly the data you want, you need to prioritize the operators.

To define the priority between complex filters

In this scenario, you want to create a new document that shows Sales revenue by Store name for stores in Florida for Bermuda Shorts, Or Sales revenue by Store name for Stores in Colorado for Hats, gloves, and scarves.

88. Using the eFashion universe, create a new query and filters as shown below.

This query will not work as it is presented as the system does not know which filter to run or which filter order to apply. To prioritize you will create a structure in the Query Filters pane.

89. In the Query Filters pane, drag and drop the filters in the order you want them to display in your report. When finished, your query panel should look like the one below. The filters are grouped together and connected with an Or operator and the query is complete with the priority of the conditions defined.

90. Click Run Query.The report displays Sales revenue by Store name for stores in Florida for Bermuda Shorts Or Sales revenue by Store name for Stores in Colorado for Hats, gloves, and scarves.

91. Save the document to your Favourites folder as Prioritizing Operators.

Lesson 3: Enhancing the Presentation of a Report

As you edit reports in a Web Intelligence document in the Java Report Panel, several tools are available to help you structure and enhance your reports so that they show exactly the information you need, in the clearest way possible. In this lesson you will learn to organise data in a table by applying breaks, calculations, sorts, report filters and alerters.

Step 1: Using breaks, calculations and sorts

About breaks

Breaks allow you to break up data in tables into groups according to the data and values you select. When you apply a break, Web Intelligence separates all the data for each unique value of the selected variable. It inserts a blank row or column after each value, which allows you to easily insert subtotals for the group of data.

As you can see in the image below, a long table that is tedious to read and understand is converted in to a block of data that is much clearer and simpler to read. Two breaks have been applied, one on State and one on Year. Each group in the table displays quarter sales revenue for a unique state and a single year.

Using breaks has two main advantages:

You can more efficiently organize how your data is represented.

You can display subtotals.

When you insert a break on a dimension, the values for the dimension are automatically sorted in ascending order. If the values are numeric, the lowest value appears in the first row of the table, the highest in the last row. If the values are alphabetical characters, then the values are sorted in alphabetical order from top to bottom.

To organize a report with breaks

92. In the Java Report Panel, create a new document using the eFashion universe, and build a query by selecting the State, Year, Quarter and Sales revenue objects.

93. Click Run Query.The top of the table should look similar to the one below:

94. Right-click the Report 1 tab and select Duplicate Report from the drop-down menu.

95. In Report 1 (1), click on a detail row in the Year column. The column is highlighted.

96. From the Report Toolbar, click the Insert/Remove Break button.

The table is reorganized into groups of data. Each value of the object is separated into a separate group of data.

You can insert multiple breaks by repeating the same process on another row or column.

97. Create an additional break on Quarter. The report should look similar to the one below.

98. Create an additional break on State.

99. Keep the document open.

To delete breaks

100. Click a cell in the column or row where you want to remove a break. Click on State.

101. From the Report toolbar, click the Insert/Remove Break button.

The break is removed from the report. The report should once again look similar to the one above.

About calculations

Web Intelligence provides standard calculation functions to help you make quick calculations on the data in your reports. These calculations are available from the drop-down list of calculations on the Edit Report view toolbar. You can calculate sums, averages and percentages. You can also calculate the total count, and the minimum and maximum values for a variable.

To organize a report with calculations

102. In the Report 1 (1) report of the Multiple Breaks document, click a detail row in the Sales revenue data column.

103. From the Report Toolbar, click the Insert Sum button. A total sum is inserted in the bottom row of each group in the table.Note: You can insert different calculations by clicking on the drop-down arrow beside the Insert Sum button.

To insert multiple calculations

Continue using the Report 1 (1) report.

104. Click on a detail row in the Sales revenue column.

105. From the Report Toolbar, click the arrow beside the Insert Sum button.

106. Select Count as the calculation that you want to apply to the data in the column.The report should look similar to the one below.

107. From the Report Toolbar, click the arrow beside the Insert Sum button.

108. Select Percentage as the calculation that you want to apply to the data in the column.The report should look similar to the one below:

109. Save the document to your Favourites as Multiple Calculations.

110. Keep the document open.

To delete a calculation

111. Right-click the table row that contains the Count calculation.

112. From the drop down menu, select Remove Row.Note: If you were working with a crosstab or percentages, you would select Remove Column.

113. Close the document without saving the changes.

About sorts

The Sort feature allows you to format data in ascending or descending order. In the example below, the table on the left has the default sorts applied (State, Year, Sales revenue). The table on the right has been resorted to show the data sorted by Year and then within Year, by Sales revenue from high to low. The two tables present the data in very different ways.

To create a report with sorts

In this scenario, you want to sort the data so that the state with the highest sales revenue in any given year is displayed in the group first. To do this, you apply a sort on the Sales revenue column of data.

114. In the Multiple Calculations document, insert a new report.

115. Click the Year object, then while holding down the Ctrl key, click the State and Sales revenue objects.

116. Using drag and drop, move the three objects to the Document zone to project the data in a vertical table.

117. Click on a detail row in the Sales revenue column.

118. Click the drop-down arrow beside the Apply/Remove Sort button.

119. Select Descending as the sort order.

The column is sorted in the order you specified. Your document should look similar to the one below:

Note: Clicking on the Apply/Remove Sort button applies a Default sort to the column or row selected. By default the results are sorted in Ascending order. To sort in Descending order, you need to click the arrow next to the sort icon.

120. Save the document to your Favourites as Sorted Data.

121. Keep the document open.

Step 2: Using report filters

About report filters

You have already used query filters in a previous lesson. Web Intelligence gives you two methods for restricting the data displayed in a document:

Query filters allow you to limit the amount of data that is retrieved from the data source and returned by the query to your Web Intelligence documents. You can only apply query filters when you are creating or editing the query in the Edit Query view.

Report filters, on the other hand, allow you to restrict the data shown in the report simply by hiding the data you are not interested in. The data is still contained in the document; it is just hidden from the report display.

You apply report filters when you are editing a document in the Edit Report view, using the Filter button on the Report toolbar. Tables or other blocks in your reports can sometimes be very large, and not very easy to read at a glance. To make the report easier to read, you apply a report filter on a specific object, so that it displays just the information that interests you.

You can apply report filters in two ways:

A global filter is applied to the whole report - thus affecting all data blocks in the report.

A block filter is applied to a section, table or chart within a report - thus affecting only the data in the block.

You can define filters on dimensions, measures, details and variables listed on the Data tab of the document.

To create a report filter

In this scenario you will filter an existing table to show only data for the Year 2003. Continue working with the Sorted Data document.

122. In the Report 3 tab, click the Year column to select it.Note: You create a block filter by clicking in the block; or, create a global filter by clicking on the document zone outside the block.

123. In the Edit Report view, click the Show/Hide Filter Pane button.

The Report Filters pane appears.

124. From the data tab, drag the Year object into the Report Filters pane. The Filter Editor dialog box appears.

125. From the Operator drop-down menu, verify that Equal to is selected.

126. Under Operand Type, click Values(s) from list.

127. Double-click 2003.

128. Click OK.The report displays showing only the data for 2003.

To delete a report filter

129. If the Filter Pane is not already showing, click the Show/Hide Filter Pane button.

130. Click the Year Equal to: 2003 report filter to highlight it.

131. Press the Delete key.

132. Click the Show/Hide Filter Pane button again to close the pane.

133. Continue working in the same document.

Step 3: Ranking data to see top or bottom values

Applying ranking to data

You may only want to show the extreme ranges of the data. Ranking allows you to determine the top or bottom three or more of a given dimension on the basis of a given measure. It acts in the same way as a combined filter/sort function to project only, for instance, the top five in descending order.Ranking can be applied at a:

Database level - by clicking the Add a database ranking button in the Edit Query panel (this feature is database specific)

Report level - by clicking the Add/Remove ranking button in the Edit Report panel

To apply ranking

134. Insert a new report in the Sorted Data document.

135. Drag and drop the Year, State and Sales revenue objects to project the data in a vertical table.The top of your report should look similar to the one below.

136. Click the detail row of the State column in the table.

137. Click the Apply/Remove Ranking drop-down arrow on the Reporting toolbar.

138. Click Ranking. The Rank dialog box displays.By default, the Top check box is selected, and the number 3 will appear in the Top field. This number can be changed as required.

139. In the Based On field select the measure on which you wish to base the ranking. In this instance, leave the default value as Sales revenue.

140. In the For Each field, leave the default values.

141. Click the Calculation mode drop-down arrow to see the type of calculation you can apply to calculate the top three values. The available calculation modes include:

Count

Percentage

Cumulative Sum

Cumulative Percentage

142. Leave Count as the default value, and click OK.

143. Click any detail row in the Year column.

144. Click Insert/Remove Break on the Reporting toolbar to break up the data in the table by year.The block should now appear as illustrated below.

Only the top three states earning the highest sales revenue appear in the report, and organized by year. You want to display this table so that the three states shown in each block are displayed in order or highest revenue.

To remove a ranking

145. Click in the State data column.

146. Click the Apply/Remove Ranking drop-down arrow on the Reporting toolbar.

147. Click Remove Ranking. The Ranking is removed.

148. Click the Apply/Remove Ranking button again.

149. In the Rank dialog box, clear the For Each operator check box and close the dialog box.The states are not shown in order of highest ranking revenue.

150. Save the document to your Favourites as Ranking.

151. Close the document.

Step 4: Using alerters to highlight information

About alerters

Alerters enable you to highlight results that meet or fail specific business targets. You can create a simple alerter to highlight particularly high or low results with a specific color or advanced alerters that display a text comment, such as "High Performer".For example, you can create an alerter to highlight margin results that exceed $1,100,000. The margin result that is greater than $1,100,000 is highlighted every time the report data is refreshed.

An alerter contains five elements:

a name

an object or cell contents

an operator

an operand value(s) or another object

the conditional formatting

The object or cell contents, the operator and the operand make up the condition that determines whether the formatting will be applied to each cell where the alerter is applied. When you apply the new alerter to a table column, row or cell on a report, Web Intelligence applies the condition to the cell values and displays any values that meet the condition in the alerter with the formatting specified. Additional rules to remember when creating alerters are:

You can apply alerters to tables, forms, section cells, and free-standing cells.

Alerters cannot be applied to charts.

You can include up to 30 alerters in a document. You can apply those alerters to a maximum of 20 table columns or rows, free-standing cells or section cells on the reports. A maximum of 10 alerters can be applied to a single-table column or row, free-standing cell or section cell.

Web Intelligence applies a default format to display the alerter. You can make changes to this default format. You can insert multiple conditions within an alerter. You can also create an advanced alerter by inserting a formula.

Creating and activating an alerter

To create a basic alerter

In this scenario you are going to build a report that shows States by year and sales revenue. The report is sorted in descending order by sales revenue. You want to also highlight any state/year combinations that had margin over $1,100,000.

152. Open the Sorted Data report and click the Report 3 tab.

153. Click Edit Query.

154. Add the Margin object to the query.

155. Click Run Query.Margin should be available in the Data tab of the Report Manager. However, it should not show in the report.

156. In Edit Report view, click any detail row in the State column.

157. From the Reporting toolbar, click Alerters.

The Alerters dialog box displays.

158. Click New.The Alerter Editor displays.

159. Under Alerter name, type Gross Margin over $1.1 Million.You can also include an optional description of the alert.

160. In the Sub-Alerter section, under Filtered object or cell, click the Browse button.

161. Select the Select an Object or Variable from the drop-down menu.

162. In the list of available objects and variables, click Margin.

163. Click OK.

164. Under Operator, select Greater than.

165. Under Operand, enter 1100000.Note: Do not include commas or decimals when specifying number values.

Web Intelligence applies the default format to the results specified in the alerter as displayed in Cell contents. You can retain the defaults or modify the format properties by clicking the Format button.

166. Click Format.Note: The Alerter Display dialog box appears:

167. In the Font style drop-down list, change the font definition to Bold Italic.

168. Click OK.

169. In the Alerter Editor, click OK.The new alerter is added to the list of alerters in the Alerters dialog box as shown below.

170. Verify that the check box beside the new alerter is selected.

171. Click OK.The alerter is applied to the report results. Notice that although Margin is not in the table itself, it can still be referenced when creating the alerters.

Creating complex alerters

You can apply multiple conditions in a single alerter.For example, you can highlight sales revenue when results reach over $300K and when those results occur in stores in any US state except California. To do this, you create an alerter with the following two conditions:

[Sales Revenue] = Greater than "$300,000"

AND[State] = Different from "California"

The formatting generated by the alerter is the same for each condition. To create different conditions that each implement different formatting, you need to define multiple sub-alerters in the alerter.Note: The maximum number of alerters that can be created in a document is 30.

To create a complex alerter

In this scenario, we are going to build an alerter that will highlight sales revenue less than $3,000,000, and we want the alerter to apply to all US states except Florida.

172. In the Java Report Panel, build a query using the eFashion universe, and select the State, Sales revenue and Quantity sold objects.

173. Click Run Query.

174. Click on a detail row in the Sales revenue column. The column is highlighted.

175. From the Reporting toolbar, click Alerters.The Alerters dialog box displays.

176. Click New.The Alerter Editor displays.

177. Under Alerter name, type Low revenue US states.You can also include an optional description of the alert.

178. Verify that Sales revenue appears in the Filtered object or zone field. This is the object that the alerter will use to filter data.

179. Under Operator, select Less than.You are interested in highlighting states that earned less than $3,000,000.

180. Under Operand, enter 3000000.Note: Do not include commas or decimals when specifying number values. Now you want to add a condition to exclude Florida from this alerter.

181. Click + to the far right of the Operands field.Note: The Alerter Editor expands, so that you can combine another condition in the alerter definition.

182. Click the Browse button next to the second Sales revenue condition. This will allow you to base the alerter on an object or cell other than Sales revenue.

183. Click Select an object or variable.The Objects and Variables dialog box appears.

184. Click State.

185. Click OK to close the Objects and Variables dialog box.

186. In the second condition's Operator field, select Not equal to.

187. In the Type a value field, type Florida.Alternatively, you can click the Browse button next to the Type a value field, click Select Values from the drop-down menu, and select Florida from the List of Values dialog box. You have defined the alerter with two conditions:

The first condition will highlight sales revenue figures that are less than $3,000,000.

The second condition will exclude the state of Florida from the alerter.

188. Change the formatting of the alerter to Bold Italic font style, as in the previous exercise.

189. Click OK.The new alerter is added to the list of alerters in the Alerters dialog box as shown below.

190. Verify that the check box beside the new alerter is selected.

191. Click OK.The report is updated so that sales revenue below $3,000,000 is highlighted in red. However, you can see that the sales revenue earned by Florida has not been highlighted by an alerter, even though the state earned less than $3,000,000.

192. Save the document to you Favourites as Alerters.

193. Keep the document open.

Step 5: Organising a report in sections

About sections

You can group data in a block using the break function or you can also use sectioning to group data. The difference is that the grouped value appears as a header outside the block instead of remaining within the block. However, there is a more important difference. A break only groups within a block, whereas sectioning groups the entire report. Notice the section lines in the illustration below run across the width of the report.

This has a number of advantages:

You can have multiple blocks projected from the same microcube within a single report, all sub-grouped to the sectioned level.

You can insert subtotal cells, repeated in each section, which are created by the simple process of drag and drop.

To create a section

In this scenario you will create a report that is sectioned by State. Within the section you will display a table, chart and aggregate totals.

194. In the Java Report Panel, build a query using the eFashion universe, and select the Year, Quarter, State and Sales revenue objects.

195. Click Run Query.

196. Right-click on a detail row in the State column. A drop-down menu displays.

197. From the drop-down menu, select Set as Section.The column you selected defines which object is used to split up the table into sections. Each value of this object is displayed as a section header, and the table below each section header displays the data concerning that value.

In this example, the object used to create a section is State, and we see here that the first value returned by the State object, California, is displayed as the first section header. Data concerning California is displayed in a table just below the new header:

198. Save the document to your Favourites folder as Sectioned Data.

199. Keep the document open.

To display an aggregate

Continue working with the Sectioned Data report.

200. Click a detail row in the Sales revenue column.

201. From the Report Toolbar, click Insert Sum.The data is calculated and inserted in a new row at the bottom of the table in each section.

Note: When you apply a sum in a sectioned report, the overall total is not calculated and displayed at the bottom of the report, like it is when use a break and then apply a sum.

202. Click any value in the Sales revenue column, press the Ctrl key, and drag the cell with your mouse until it is level with the section heading, as shown below.

203. While holding the Ctrl key, release the mouse button to insert a cell. The section sum total, that is the state's sales overall revenue, appears next to the section header.Note: Using the Report Manager's Properties tab, you can edit the formatting of these cells by removing the default borders, changing the default font size, colour and so on.

Note: Using the Report Manager's Properties tab, you can edit the formatting of these cells by removing the default borders, changing the default font size, colour and so on.

Navigating from section to section

To navigate from section to section

Continue using the report from the previous exercise.

204. In the Report Manager, click Map.The Map tab displays all the reports and sections contained in this document. In the example, there is only a single report.

205. Click on the + to expand the Report 1 structure.

206. Click on Colorado to navigate to this section.The Document zone scrolls down to display the section selected within the report.Note: You can use the Map tab in the Report Manager to jump from one report to another, as well as navigating from section to section. This feature is useful when you have a large document with multiple reports and many sections to navigate through.

To delete a section

It is recommended that you use the View Structure mode to display the report structure when deleting a section.

207. In Edit Report view, click View Structure. The section dividers show the beginning and end of the section.

208. Click the start or end divider line of the section you want to remove.

209. Press the Delete key.

210. Click the section cell and press the Delete key.

211. Click View Results to view the document with a single table.

212. Save the document and leave it open. Step 6: Copying data to other applications

Copying a block of data using Microsoft Clipboard

In Web Intelligence, you can easily copy data from a report into other applications, such as Microsoft Excel or Microsoft Power Point. This makes it easier to present and share your analysis in different formats.

To copy data to an Excel spreadsheet

213. Continue using the report from the previous exercise.

214. Select the table block.

215. Press the Ctrl + C keys to copy the table block to the Microsoft Clipboard.

216. Launch Microsoft Excel.

217. Click the Edit menu and select Paste.The table appears as an image file in the Excel spreadsheet.

To copy data to a Power Point slide

218. Continue using the report from the previous exercise.

219. Select the chart block.

220. Press the Ctrl + C keys to copy the table block to the Microsoft Clipboard.

221. Launch Microsoft Power Point and open a file that contains slides into which you want to paste data from Web Intelligence.

222. Click the Edit menu and select Paste.The table appears as an image file in the Power Point slide.

Lesson 4: Formatting Reports

This section describes how to display information in tables and charts. Here you will learn more about formatting your documents and charts.

Step 1: Document formatting

When you edit a report in the Java Report Panel, the Report Manager's Properties tab allows you to format all the elements in a document.

Displaying the Report Manager Properties tab

You can format your documents at various levels within the body of the report. Using the Report Manager, you can choose to modify the default property settings for all levels within the body of the document: the reports contained within the document, the charts and tables in the reports, and even the cells and chart elements in the tables and charts. You choose which level you want to format in a document by clicking on the appropriate part of a report, and then changing the default settings in the Properties tab of the Report Manager. The example below shows where you point your cursor and click in a Web Intelligence document, in order to select and format each different document element.

To view the Report Properties:

223. Open the Web Intelligence Samples folder within the Public Training folder.

224. Click the Modify link below the Web Intelligence Sample document from the list of objects.The document opens in the Java Report Panel.

225. From the Reporting toolbar, click the View Page Layout button.The document is displayed in Page Layout mode and you can now view the reports in the document as they will appear when printed.

226. Scroll down the page until you can see the white space below the table and chart displayed in this report.

227. Click in the white space well below both blocks, so that you select the report zone itself.A large frame appears, highlighting the margins of the report.

228. Click the Properties tab of the Report Manager.The Properties tab opens and displays the default properties set for the report you are currently viewing.

In the General section, the title of the report you are currently viewing appears in the Name zone. The Appearance section allows you to change the colour of the report background, as well as links that have been both visited and unvisited, if you have links to other web pages in this report.

229. Click the + plus sign next to the Page layout properties header to expand that section so that you can see the options available.

The Page Layout section allows you to modify default margin settings, page size and header and footer properties for the report you are viewing.To apply any changes in the Properties tab, you need to either press the Enter key or click in the Document zone.

Modify the default report properties

As we have seen, when you highlight a report in a Web Intelligence document, the Report Manager Properties tab provides options that you can use to change the default formatting of the report. In this exercise, you will practice using a few of the options available to you for formatting reports. Continue using the Web Intelligence Sample report from the previous exercise.

To modify the report background:

230. Verify that the Web Intelligence Sample document is still displayed in Page Layout view.Note: Make sure that you have selected the report as shown previously, so that the report margins are highlighted.

231. Click the Properties tab in the Report Manager.

232. In the Appearance section, click the Background colour zone, then select Yellow from the Colour drop-down list to change the colour of the report background.

233. Click + next to the Page layout properties section to expand the section.

234. In the Page layout section, and in the Margins zones, change the Top, Bottom, Left, and Right Margins to 52 px.

235. In the Page size zone, select Letter from the Size drop-down list.

236. In the Page orientation zone, select Landscape from the Orientation drop-down list.

237. In the Show page header and Show page footer zones, verify that the boxes are selected and set the header and footer height to 32 px.The Report Properties tab should appear like this:

The changes made to the report properties will be reflected in the document.

Modify the default table properties

When you highlight a table in a Web Intelligence report, the Report Manager Properties tab provides options that allow you to change the default formatting of the selected table. In this exercise, you will practice using a few of the options available to you for formatting tables. Continue using the Web Intelligence Sample report from the previous exercise.

To change table properties

238. Select the table in the report by positioning your cursor just outside the table until a gray border appears, and then clicking the border.

239. Select the Properties tab of the Report Manager.The Report Manager displays the Table Properties tab.

240. In the General properties section, and in the Name zone, change the name of the block to Order Table.

241. Click + next to Display to expand the Display section.

242. Change the Cell spacing to 10 px.

243. In the Appearance section, click the Background image zone and click the Browse button to the far right of this zone, to select an image.

The Background Image dialog box displays.

244. Click Skin.

245. From the Skin drop-down menu, select Curve.

246. Click OK to close the Background Image box.The background of the table appears with a marble effect:

To change the format of the header cells

247. Click + next to the Header cells zone, to expand the Header cells properties.

248. Click + next to the Text Format zone, to expand the Header cells text formatting properties.

249. In the Horizontal text alignment zone, select Center from the drop-down menu.

To change the position of the table on the page

Continue using the report from the previous exercise.

250. Scroll down the Table Properties tab and click + next to Page Layout to expand the Page Layout section.

251. Click + next to Position to open the Position properties section.

252. In the Position zone, change the Left Edge value to 32 px and the Top Edge value to 52 px.

253. The table is re-positioned on the page.

Step 2: Formatting charts

Like reports, tables and cells, charts are composed of a number of elements that can be formatted separately. Web Intelligence XI provides all the chart formatting features that you are familiar with when creating professional reports. In this section of the lesson, we will explore a few of the chart formatting features that are available.

Looking at chart properties

To look at the chart properties

254. In the Java Report Panel, build a query using the eFashion universe, and select the Year, State and Sales revenue objects.

255. Click Run Query.

256. Drag and drop the Vertical Grouped Bar chart template in the new report.

257. Select the View Structure button on tool bar. The document zone switches to View Structure mode. Using drag and drop, move the Sales revenue object to the measures place holder in the chart structure.

258. Move the State object to the dimension object placeholder and the Year object to the optional dimension object placeholder.

259. Click View Results.The new chart displays as shown below.

260. Click in the bar chart to select the chart.A grey border appears around the chart to indicate that it is highlighted.

261. Click the Properties tab of the Report Manager.The Properties tab opens and displays the default properties set for the chart you have selected.

The Chart Properties tab allows you to change the default formatting of the chart.

Formatting bar charts

To make this chart more attractive and easier to read, you can reduce the font size of the Sales revenue values so that they are more in line with the rest of the chart and also modify the size of the chart.

To change the font size of a chart element

Continue using the report from the previous exercise.

262. Click + next to Display in the Chart Properties tab.

263. Adjust the chart Height and Width so that it is visually more appealing. Set the width to 700 px and the Height to 300 px.

264. Click + in the X Axis zone to expand the X Axis properties.

265. Click + in the Values zone.

266. In the Text Format zone, click the Browse button to display the Text formatting dialog box.

267. Adjust the default font size to 6 points.

268. Click OK.The values selected are updated to reflect the changes.

To display the value for each bar

Continue working with the report from the previous exercise.

269. In the Appearance zone, click + next to Data, then click + next to Values to expand the Data Values properties.

270. In the Show data values, click the Yes option.The data values appear above each bar in the chart.

271. Keep the document open.

Formatting pie charts

In the next section, you will format a pie chart to make it more attractive and easier to read.

To display the axis legend

Continue using the report from the previous exercise.

272. Insert a new report into the document.

273. Drag the Pie chart template onto the report.

274. Add the State and Sales revenue objects to the template placeholders.

275. Click View Results.The pie chart displays in the report as shown below.

276. Click in the pie chart to select the chart.A grey border appears around the chart to indicate that it is highlighted.

277. Click the Properties tab of the Report Manager.The Properties tab opens and displays the default properties set for the chart you have selected.

278. In the Display zone, adjust the Height and Width of the pie chart. Set the height to 400 px and the width to 300 px.

279. In the Appearance zone, click Yes next to the Show floor option.

280. Change the show floor Wall colour to light yellow.

To display the data values

Continue using the report from the previous exercise.

281. Click + next to the Data zone to expand the Data values properties.

282. In the Values zone, click Yes next to the Show data option.The data values appear as labels as shown below:

283. In the Values zone, click Yes next to the Show as percentages option. The percentages appear as labels for the pie sections as shown below:

Experiment with the different features available in Web Intelligence for formatting charts.

284. Close the document without saving.

Lesson 5: Creating Formulas and Variables

This section describes how to use formulas to display information or calculate data that you cannot retrieve by using the existing objects in the universe. It also explains how to define a formula as a document variable so that the formula is available for use in other reports and blocks of data in the document.

Step 1: Formulas & VariablesYou can add custom calculations to reports by writing a formula that Web Intelligence evaluates when you run the report. A formula can consist of data objects, functions, operators, and calculation contexts. You can create formulas directly in a report cell, but it is often better to save a formula as a variable. By saving a formula as a variable you can reuse it throughout the reports in a document without needing to retype it.

Formulas

A formula is a complex calculation that you create to display data that is not retrieved by existing objects in the universe. You can add formulas in the Java Report Panel in two ways:

Type or drag and drop the formula components into the Formula toolbar.

Use the Formula Editor to build the formula.

The first way is more suitable for experienced users. If you are not familiar with formulas, you should use the Formula Editor to build them. The Formula Editor is an interface that allows you to select the different components of your formula (operators, objects) and add them to it.You can also use the Formula Editor when you are viewing a Web Intelligence document in InfoView, in Interactive mode.

Variables

A variable is a formula that you save with a name. It acts as an object in the document, and is displayed in the Data tab in the Report Manager just like any other data object. You can then use the variable as you would any object: to display the results of the calculation in multiple blocks and reports throughout the Web Intelligence document.The advantage to saving a formula as a variable is that you can reuse the formula without having to enter it each time. Variables are defined according to the formula you enter when you create them, but they behave like standard objects in the query and document. They are saved in the document and so can be used in any report within the document.

Variables are useful when:

You want to use a formula repeatedly.

You want to use the same formula in different blocks and on different report tabs within a document.

Step 2: Using Formulas and Variables in the Java Report Panel

Creating a variable as a response to a prompt

In the following exercises, you will build a report that shows quarterly sales revenue with a prompt that requires you to select the state each time the report is refreshed. You will also create a formula that will display the name of the state in the report title, regardless of which state is selected each time. This formula will mean that the title is modified automatically, depending on which state the user specifies.

To create a prompted filter in a report

285. In the Java Report Panel, build a query using the eFashion universe, and select the Year, Quarter and Sales revenue objects.

286. Add a condition that prompts the user for State.

287. Click Run Query.The Prompts box opens, displaying the list of values returned for the selected object.

288. Double-click on California.

289. Click Run Query.The report displays data concerning California, and automatically inserts a cell called Report Title.

To create a formula to capture the response to the prompt

You will now create a formula that will display in the report title the value of the object selected in the prompt. Continue using the report from the previous exercise.

290. Click the Report Title cell.A grey border appears around the cell to show that is selected.

291. On the Reporting toolbar, click Show/Hide Formula Toolbar. The formula toolbar appears above the document zone.

292. On the Formula toolbar, click Formula Editor.The Formula toolbar expands to display the Formula Editor.

In the Formula Editor, you define the characteristics of a formula by selecting data objects, functions and operators from the lists in the tabs. The formula appears in the Formula text zone as you type it.

293. Press the Backspace key to delete Report Title.

294. Type = (equal sign) to start the formula definition.

295. Type (including the quotes) "Quarterly Revenues for ".

296. Click the Operators tab, then double-click + (plus sign).

297. Click the Functions tab, then click - to collapse the All folder.

298. Click + to expand the Data Provider folder.

299. Double-click User Response. The mouse pointer is automatically positioned between the parentheses that appear after User Response function.

300. Within the parenthesis, type the prompt text (including the quotes and colon):"Enter State:". The text must match the prompt text exactly and is case-sensitive.

301. Click Validate to check the syntax of the formula.

302. Click OK.The Report Title cell in the document zone displays the title you created as a formula and also displays the value of the object you last selected in your prompt.

If the words "for" and "California" do not appear in the title with a space between them, position your cursor just after the word "for" in the Formula Toolbar, and type a space directly in the formula.Be sure to validate the formula by clicking the Validate button in the Formula Toolbar in order to save your edits.

303. Refresh the report selecting a different state. Notice that the title updates automatically.

304. Save the report to your Favourites as Formulas.

To define the formula as a variable in the document

You are now going to turn this formula into a variable, so that it appears in the Data tab of the Report Manager and is always available in the document. Continue working with the Formulas document.

305. Make sure the Report Title cell is still selected.

306. From the Formula toolbar, click Create Variable.The Create Variable box opens.

307. In the Name field, type State Title.

308. Under Qualification, click Dimension as the type of formula.

309. Verify that the formula shown in the Formula box is the one you created in the previous exercise.

310. Click OK.The formula is given a Variable name.

311. Click Refresh Data selecting New York as the state.The title changes to reflect the name of the new value selected.As we discussed earlier, after a variable has been created it is available for use within the document.

312. In the Report Manager, click the Data tab.The new variable, State Title, appears in the list of variables in the Data tab and can be used in the same manner as universe-based objects.

313. Save the document to your Favourites as Formulas & Variables.

Creating a variable to calculate sales tax

In this scenario, you want to display the tax calculated on sales revenue. This is not an object in the eFashion universe, so you cannot display the calculation in your report without creating a formula to perform the calculation yourself. You want to create the formula, but you also want to define it as a variable so that you can use it whenever you open the document to refresh the data, or insert new reports or blocks.

To insert a column for the new variable

Continue working with the Formulas & Variables document.

314. Click in the data portion of the Sales Revenue column.The column is highlighted in gray to indicate that you have selected the column.

315. Click the arrow next to Insert Row Above.A drop-down menu appears that allows you to insert columns before and after or rows above and below the cell you selected.

316. Select Insert column after.A column is inserted just to the right of the Sales revenue column.

1. Click in the data portion of the new column. The new column is highlighted.

To define the formula and project the calculated data in the new column

317. Verify that the new column is still highlighted in your table.

318. On the Formula toolbar, click Formula Editor to define the formula for the data you want to display in this new column.

319. In the Data tab, double-click Sales Revenue.The equal sign (=) is automatically inserted in the Formula text box to begin the formula, and the object you selected appears in brackets.

320. Click the Operators tab, then double-click * (asterisk).

321. Type 0.175 to define the tax rate.Your formula should look similar to the one below.

322. Click the Validate button to validate that the formula is correct.

323. In the Formula Editor, click OK.The Formula Editor closes and the report is displayed again in the document zone. The new column displays data that reflects the values calculated by the formula.

To define the formula as a variable

Continue working with the Formulas & Variables document.

324. Click the data portion of the new column.

325. On the Formula toolbar, click Create Variable. The Create Variable box displays.Note: Because you had highlighted the column that displays the calculated data, the formula you just created appears automatically in the Formula text box.

326. In the Name field, type Sales Tax as the name of the variable.

327. Under Qualification, select Measure.

328. Under Formula, verify that the formula is the one you just created.The Create Variable window should look similar to the one below.

329. Click OK.The Variable Editor closes and the updated table appears in the document zone.

330. Verify that the Data tab is selected in the Report Manager.The new measure object, Sales Tax, that you just created appears in the Formulas & Variables folder along with the other objects and variables.

To complete the exercise, you will now rename the header cell in the column of data that displays the sales tax values.

To rename the column header

331. Click the cell that corresponds to the header of the new column.

332. Click the Properties tab in the Report Manager.The Properties tab displays default properties for cells, because the column header you selected is a cell.

333. In the General section, next to the Text zone, type Sales Tax.

334. Click anywhere outside the Cell Format box to accept the new text.The new name displays in the new column header. This will also be the name of the new variable you are creating.

335. Save the document to your Favourites folder as Quarterly Revenue.

Modifying and Deleting a variable

To modify or delete a variable, start by selecting the variable in the Data tab in the Report Manager.

To modify a variable

Continue with the Quarterly Revenue document.

336. Verify that the Data tab in the Report Manager is displayed.

337. Right-click the variable Sales Tax.

338. Select Edit Variable.The Variable Editor opens and allows you to change any aspect of the variable you choose:

339. Change the sales tax from 0.175 to 0.06.

340. Click to Validate the formula.

341. Click OK.A window opens asking you to confirm the modification to this variable.

342. Click Yes.

The Variable Editor closes and the report appears in the document zone with the updated sales tax.

To delete a variable

343. Right-click the variable Sales Tax.

344. Select Delete Variable.A message box warns that this variable is used in reports in this document.

345. Click Yes to delete.Notice that the Sales Tax values are removed from the report.

Lesson 6: Synchronizing Data

This section describes how Web Intelligence allows you to include blocks of data from different data sources in a single document. It presents concepts of data synchronisation, the ability to merge multiple sources into a single block in a document.

Step 1: Synchronizing data from multiple data sources

You can include one or more queries in a single Web Intelligence document. When you include multiple queries, those queries can be based on a single universe or on multiple universes available to you in InfoView. For example, in your organization you may use one universe to access data on product line sales. You also use another universe to access customer data. Typically one universe is built for each functional area. Therefore, if you were working with both sales data and customer demographics, chances are good that the data would come from two separate universes.You want to present product line sales results and information on customer age groups in the same report. To do this, you create a single document that includes data retrieved by two queries; each query is built using a different universe. You can then include and format the results from both queries in the same report.

The system administrator assigns rights for access to specific universes.

A maximum of 15 queries can be included in a single document.

Working with multiple providers

When you run a query against a single data source, the results of the query are stored in the document's microcube, also known as the data provider. Each data provider only holds data from a single data source. This is very useful when you want to include data from several sources in a single document irrespective of the format of the original source. It also means you can present related information in a way that helps you compare or analyze data more meaningfully. Once the basic report is built with blocks of related data, you can compare and contrast the information in a single table, add calculations across data sources, create new variables and develop the analysis further.

The following graphic is an illustration of this concept:

Blocks 1 and 2 are different views of the data provider created by a single query using the eFashion universe.

Block 3 displays a view of the data provider created by a second query using the eFashion universe. Used in the same document as Blocks 1 and 2, this is an example of combining data from multiple queries using a single universe.

Block 4 displays a view of the data provider created by a query using the eStaff universe. Displayed with blocks 1, 2 and 3, views of data from the eFashion universe, this is an example of combining data from multiple queries on multiple universes.

What is data synchronization?

This lesson describes how to synchronize multiple data providers in a Web Intelligence report by merging them on common dimensions. After merging common dimensions you can place dimensions from different data providers in the same block. Merged dimensions and data synchronization enormously increase the power and flexibility of Web Intelligence by allowing you to synthesize data from different sources in the same report, rather than simply including the data. Synchronization is the term used to describe the merging of data from multiple data sources into a single block in a report. The graphic below illustrates how data from more than one source is combined in synchronized blocks in the same document.

Block 1 is created by combining data from two different data providerswhich contain the results of queries using the eFashion universe.

Block 2 is created by combining data from data providers which contain the results of queries using the eFashion and eStaff universes.

Step2: Creating multiple queries in a document

Projecting data from a single query in different blocks

In this example, you will create a document to analyze the Sales revenue figures for the last three years and display the Sales revenue per store:

Block 1 will show the sales revenue of the stores in the eFashion database for different years. Block 2 will show only a subset of this information from the same query.

To project data from a single query in multiple blocks

346. In the Java Report Panel, create a new document using the eFashion universe using the Store name, Year and Sales revenue objects.

347. Click Run Query.The Edit Report view appears and a new vertical table has been created, showing sales revenue calculated for each store and per year.

348. In the Report Manager Data tab, click the Store name object, hold down the Ctrl key and click Sales revenue.

349. Drag both objects together and drop them in the space next to the first block of data.The new report now displays two blocks of data:

Block 1: Shows sales revenue calculated for each store and per year.

Block 2: Shows the overall sales revenue calculated per store, all years combined.

Both blocks were built using data from a single query.

350. Save the document to Favourites as Multi Block 1.

Projecting data from multiple queries using a single universe

Now you are going to add a third block of data to the report. This time you will add a new query to retrieve new data from the eFashion universe.

Continue working with the same document.

To project data from two queries in multiple blocks

351. Click Edit Query to begin adding the second query.

352. While in Edit Query view, click the Add Query button on the toolbar.The Universe dialog box displays.

353. Select eFashion as the data source for the second query.

354. Click OK.A second Edit Query view appears. Note that at the bottom of the panel, there are two tabs now: Query 1 and Query 2. You can use these tabs to toggle back and forth between the two query definitions.

355. In the Query 2 tab, move the Store name and Margin objects into the Result Objects pane.

356. Click the Properties tabThe Query Properties panel for Query 2 displays.

357. In the Name field, type Margin Query and press the Return key to replace the default name of this query.

358. Click the Query 1 tab.The Edit Query view switches to the query definition for Query 1.

359. Right-click the Query 1 tab.

360. Select Rename Query from the drop-down menu.

361. In the Name field, type Revenue Query and press the Return key to replace the default name of the first query as well.Click the drop-down arrow next to the Run Queries button.The drop-down menu allows you to decide if you want to run only one of the queries in the document, or all of them at once.

362. Select Margin Query from the Run Queries drop-down menu.The New Query dialog box displays. The options to include the data from the new query in the report are listed.

363. In the New Query dialog box, select the Insert a table in the current report option and click OK. Web Intelligence executes both queries and projects the new data in a new table in the report.Note: The new table may be positioned anywhere in the report, even on top of the existing tables. Scroll in the report to find where the new table has been projected, then drag and drop it to the appropriate blank space in the report.The objects you selected in the Margin query appear in the Edit Report Data tab.

364. Click + next to the Store name object in the Data tab. The folder expands.

Expanded, the folder displays two Store name objects. This indicates that the same object has been used in two different queries, once in the Margin query and once in the Revenue query. The top-level Store name object is identified by a double-cubed, blue dimension icon, indicating that the two have been automatically merged to create a single-dimension object. Now you are ready to project the data from both queries into a single block in the report. Continue working with the same document.

To project data from a merged dimension into a single block

365. Insert a new report in the document.

366. In the Data tab, click the Store name merged object, hold down the Ctrl key and click the Sales Revenue and Margin objects.

367. Drag all objects and drop them into the new report.The aggregate data to calculate sales revenue per store and margin per store has been retrieved by two different queries, but you are still able to combine both in a single block of data.

368. Save the document to Favourites as Multi Block 2.

Projecting data from queries using multiple universes

Your first report now shows sales revenue and margin for each of the stores in two blocks of data. Your second report shows data from both queries in a single block, because you have been able to project the automatically merged dimension into a column in the table.

So far, you have used data only from the eFashion universe to produce the blocks in both reports. These blocks are views of data providers with data retrieved using the eFashion universe.

Now you are going to add a second block to Report 2 using data retrieved from a different universe. This block will show the number of employees that work at each store. This can help you analyze how a store's staffing level affects the sales revenue. In this next step, you add a query to the document using the eStaff universe.

Continue working with the document from the previous exercise.

To display data from two data sources in multiple blocks

369. Make sure the Multi Block 2 document is still open in the Java Report Panel.

370. Click Edit Query to begin adding the second query.

371. While in the Edit Query view, click the Add Query button on the toolbar.The Universe dialog box displays.

372. Select eStaff as the data source for the third query.

373. Click OK.A third Edit Query view appears. Note that at the bottom of the panel, there are three tabs now: Revenue query, Margin query and Query 3. You can use these tabs to toggle back and forth between the three query definitions.

374. In the Query 3 tab, move the Store and Number of Employees objects into the Result Objects pane.

375. Click the Properties tab.

376. In the Name field, type Employee query and press the Return key to replace the default name of the first query as well.

377. Click the drop-down arrow next to the Run Queries button.

378. Select Employee query.

379. In the New Query dialog box, this time select the Include the results objects without generating a table option and click OK. The Store and Number of Employees objects in the "Employee query", from the eStaff universe, now appear in the Data tab.

380. In Report 2, click the Store object, hold down the Ctrl key, click the Number of Employees object, then drag them from the Data tab until they are positioned next to the existing table in the document zone.A new table is inserted next to the existing table and the table from the Employee query is projected into the new table.

381. Save the document to Favourites as Multi Block 3.You have now displayed data from two different data sources in two tables side-by-side in the report. These tables allow you to compare each store's margin with the number of employees per store.However, it is clear that both data sources, eFashion and eStaff, contain data concerning the same stores. In the next exercise, you are going to learn how to show the same data but this time in a single block of data, or a single table. To do this, you will manually merge two dimension objects, so that you can project the store names in a single column in the table. This is known as synchronizing data.

Step 3: Synchronizing data with merged dimensions

Synchronizing queries by manually merging dimensions

You can define the relationship between objects from different universes by manually merging the dimensions in order to synchronize the data they retrieve. Merging dimensions manually allows you to identify the objects that retrieve common data in both queries. Once the merged dimension is in place, you can compare information between the queries more accurately.

Continue working with the same document.

To manually merge dimensions with different names

382. In the Java Report Panel Edit Report view, ensure that the Reporting toolbar is displayed.

383. In the Data tab, click the Store object.The Store object, which was an object you used in the Employee query, is highlighted:

Note that all the dimension objects listed in the Data tab are suddenly displayed in italics. These objects are highlighted in italics because they are all the same type of object as the Store object: that is, they are all dimension objects. Web Intelligence indicates that you could choose to merge the selected object with any of the other dimension objects in the document's queries.In this case, you want to merge the Store object with the Store name objects used in the queries you built using the eFashion universe. The names of these objects are slightly different, but they obviously retrieve the same type of data.

384. Click the Merge dimensions button on the Reporting toolbar. The Merge Dimensions dialog box displays. The dimensions that are available to be merged appear in the top zone of this dialog box, categorized by the query that they belong to. Below and to the left is a list of the merged dimensions that already exist in the document: in this example, we see Store name, which is a dimension that was automatically merged when we used Store name from eFashion in two different queries.

385. In the Employee query list, click the Store dimension.

386. Click Store name in the Merged dimension list.

387. Click the Values button to view all the values returned by these dimensions.The Merge dimensions dialog box expands to display all the values returned by these dimensions. In this example, the values are exactly the same. Depending on the dimension objects you are merging, the values may not be identical, but they should be of a similar type.

388. Click the Merge button.The Store dimension has been positioned as one of the objects included in the merged Store name object

389. Click OK to close the dialog box.Now, you see in the Data tab that the merged Store name dimension includes the Store object from the eStaff universe.

This is known as synchronizing data using merged dimensi