SAP Business objects Enterprise XI 3.1 Building reports using the Java Report Panel

Building reports using the Java Report Panel
BusinessObjects Enterprise XI 3.0
Copyright
© 2008 Business Objects, an SAP company. All rights reserved. Business Objects owns the following U.S. patents, which may cover products that are offered and licensed by Business Objects: 5,295,243; 5,339,390; 5,555,403; 5,590,250; 5,619,632; 5,632,009; 5,857,205; 5,880,742; 5,883,635; 6,085,202; 6,108,698; 6,247,008; 6,289,352; 6,300,957; 6,377,259; 6,490,593; 6,578,027; 6,581,068; 6,628,312; 6,654,761; 6,768,986; 6,772,409; 6,831,668; 6,882,998; 6,892,189; 6,901,555; 7,089,238; 7,107,266; 7,139,766; 7,178,099; 7,181,435; 7,181,440; 7,194,465; 7,222,130; 7,299,419; 7,320,122 and 7,356,779. Business Objects and its logos, BusinessObjects, Business Objects Crystal Vision, Business Process On Demand, BusinessQuery, Cartesis, Crystal Analysis, Crystal Applications, Crystal Decisions, Crystal Enterprise, Crystal Insider, Crystal Reports, Crystal Vision, Desktop Intelligence, Inxight and its logos , LinguistX, Star Tree, Table Lens, ThingFinder, Timewall, Let There Be Light, Metify, NSite, Rapid Marts, RapidMarts, the Spectrum Design, Web Intelligence, Workmail and Xcelsius are trademarks or registered trademarks in the United States and/or other countries of Business Objects and/or affiliated companies. SAP is the trademark or registered trademark of SAP AG in Germany and in several other countries. All other names mentioned herein may be trademarks of their respective owners.
Third-party Contributors
Business Objects products in this release may contain redistributions of software licensed from third-party contributors. Some of these individual components may also be available under alternative licenses. A partial listing of third-party contributors that have requested or permitted acknowledgments, as well as required notices, can be found at: http://www.businessobjects.com/thirdparty
2008-09-03

Contents

About Web Intelligence 17Chapter 1
How Web Intelligence performs business intelligence over the web.........18
How Web Intelligence performs business intelligence offline....................18
Interacting with Web Intelligence reports...................................................18
Creating and editing Web Intelligence documents....................................20
Accessing Web Intelligence from InfoView 23Chapter 2
To log in to InfoView...................................................................................24
To log out of InfoView................................................................................25
Web Intelligence InfoView options.............................................................25
Viewing and printing Web Intelligence reports.....................................19
Drilling on Web Intelligence reports......................................................19
Performing on-report analysis..............................................................19
Web Intelligence Query - HTML...........................................................20
Web Intelligence Java Report Panel....................................................21
Web Intelligence Rich Client................................................................21
Web Intelligence HTML Report Panel..................................................22
Web Intelligence document creation and viewing options...................25
To set Web Intelligence drill options.....................................................28
Web Intelligence locale options............................................................30
Building and editing queries in the Java Report Panel 35Chapter 3
Creating, editing and saving documents...................................................36
To select a universe..............................................................................36
To edit a Web Intelligence document...................................................36
How universe objects map to data............................................................37
Building reports using the Java Report Panel 3
Contents
Classes and subclasses.......................................................................37
Dimension object..................................................................................37
Detail object..........................................................................................37
Measure object.....................................................................................38
Building and using queries........................................................................38
To build and run a query in the Java Report Panel..............................38
To set query properties.........................................................................39
To interrupt a query..............................................................................40
To remove a query................................................................................41
To duplicate a query.............................................................................41
Multiple queries....................................................................................42
Controlling access to queries....................................................................43
Allow other users to edit all data providers query property..................43
Controlling how queries retrieve data........................................................43
Max retrieval time query property.........................................................43
Max rows retrieved query property.......................................................43
Retrieve duplicate rows query property................................................44
Setting the scope of analysis.....................................................................44
Scope of analysis.................................................................................44
Levels of scope of analysis..................................................................45
To set the scope of analysis.................................................................46
Query contexts...........................................................................................46
What is an ambiguous query?..............................................................46
What is a context?................................................................................47
Choosing a context when you run a query...........................................47
Defining how contexts are used...........................................................48
Using combined queries 49Chapter 4
Combined queries defined.........................................................................50
Types of combined query...........................................................................50
What can you do with combined queries?.................................................51
4 Building reports using the Java Report Panel
Contents
How does Web Intelligence generate combined queries?........................52
To build a combined query.........................................................................52
Combined query structure.........................................................................53
To return a list of years and reservation years based on the number of
guests...................................................................................................53
Combined query precedence....................................................................54
Multiple combined queries....................................................................55
To set the order of precedence of combined queries in the Java Report
Panel....................................................................................................56
Filtering queries 57Chapter 5
Query filters defined...................................................................................58
Query filters and report filters compared...................................................59
Types of query filter...................................................................................59
Predefined query filters........................................................................60
Quick filters...........................................................................................60
Custom query filters.............................................................................61
Query filter and prompt operators........................................................62
Combining query filters.........................................................................65
Filtering data with subqueries 69Chapter 6
What is a subquery?..................................................................................70
What can you do with subqueries?............................................................70
How do subqueries work?.........................................................................70
To build a subquery....................................................................................70
To find out which customers bought a service that had previously been reserved in Q1 of 2003, and how much revenue have they generated.72
Subquery parameters................................................................................72
Ranking data using database ranking 75Chapter 7
What is database ranking?........................................................................76
Building reports using the Java Report Panel 5
Contents
Database ranking parameters...................................................................77
To create a database ranking....................................................................78
To create a report that returns the top 10 employees based on salary,
and calculated by department..............................................................79
Filtering data using prompts 81Chapter 8
What is a prompt?......................................................................................82
Merged prompts...................................................................................83
Cascading prompts....................................................................................83
Hierarchical lists of values.........................................................................84
Query filter and prompt operators..............................................................84
Equal To operator.................................................................................84
Not Equal To operator..........................................................................84
Different From operator........................................................................84
Greater Than operator..........................................................................85
Greater Than Or Equal To operator......................................................85
Less Than operator..............................................................................85
Less Than Or Equal To operator..........................................................85
Between operator.................................................................................85
Not Between operator..........................................................................86
In List operator.....................................................................................86
Not In List operator...............................................................................86
Matches Pattern operator.....................................................................86
Different From Pattern operator...........................................................87
Both operator........................................................................................87
Except operator....................................................................................87
To create a prompt.....................................................................................88
To remove a prompt...................................................................................88
Defining how prompts display....................................................................88
Combining prompts....................................................................................90
Combining prompts with query filters...................................................90
6 Building reports using the Java Report Panel
Contents
To change the order of prompts.................................................................90
The Java Report Panel reporting interface 91Chapter 9
Answering prompts 95Chapter 10
To enter values to answer a prompt..........................................................96
To enter dates to answer a prompt............................................................96
Web Intelligence viewing modes 99Chapter 11
To switch between viewing modes..........................................................100
Draft mode..........................................................................................100
Page mode.........................................................................................100
PDF mode..........................................................................................100
Quick Display mode...........................................................................101
To select Enhanced Viewing mode....................................................103
Using alerters to highlight results 105Chapter 12
Alerters defined........................................................................................106
Sub-alerters........................................................................................107
To add, edit, duplicate, prioritize or activate alerters...............................107
To build an alerter....................................................................................107
To set the format of an alerter..................................................................109
Using formulas to create advanced alerters............................................109
Merging dimensions from multiple data providers 113Chapter 13
Merged dimensions defined....................................................................114
When to merge dimensions.....................................................................114
Choosing which dimensions to merge.....................................................114
Merged dimension example....................................................................115
Building reports using the Java Report Panel 7
Contents
Forcing merged calculations with the ForceMerge function....................117
Creating, editing and deleting merged dimensions.................................119
To merge dimensions.........................................................................119
To merge dimensions automatically...................................................120
To edit a merged dimension...............................................................120
To delete a merged dimension...........................................................121
Understanding the effects of merged dimensions...................................121
Synchronizing data providers with different aggregation levels.........121
Detail objects and merged dimensions..............................................122
Incompatible objects and merged dimensions...................................124
Filtering merged dimensions..............................................................125
Drilling on merged dimensions...........................................................127
Extending the values returned by merged dimensions......................127
Ranking data in Web Intelligence reports 131Chapter 14
Ranking data............................................................................................132
Rankings and sorts..................................................................................132
Tied rankings...........................................................................................133
Ranking parameters................................................................................135
Example of a ranking..........................................................................137
Ranking and data order...........................................................................138
Ranking workflows...................................................................................138
To create a ranking.............................................................................138
Ranking examples...................................................................................139
Tracking changes in data 145Chapter 15
Tracking changes in your data.................................................................146
Types of data change..............................................................................146
Data tracking modes................................................................................147
Automatic data tracking mode............................................................147
8 Building reports using the Java Report Panel
Contents
Manual data tracking mode................................................................147
To activate data tracking..........................................................................147
To change the reference data..................................................................148
Displaying changed data.........................................................................148
To display or hide changed data........................................................148
Configuring the appearance of changed data....................................148
How changed data is displayed in blocks..........................................149
How changed data is displayed in reports with merged dimensions...151
How changed data is displayed in sections.......................................152
How changed data is displayed in blocks with breaks.......................155
How changed data is displayed in charts...........................................155
Data tracking limitations...........................................................................155
Data tracking and drill.........................................................................156
Data tracking and Refresh on Open...................................................156
Using the Web Intelligence formula language to track changed data.....156
The RefValue function........................................................................157
The RefValueDate function................................................................157
Building formulas using the RefValue function...................................157
Changed data and the calculation context..............................................158
Organizing data with sections, breaks and sorts 161Chapter 16
Using sections to group data...................................................................162
Grouping information with sections....................................................162
Sections in Structure View.................................................................164
Creating and removing sections and subsections..............................165
Section properties..............................................................................166
To set the page layout for a section...................................................168
Using breaks............................................................................................168
Breaks defined...................................................................................168
Breaks compared to sections.............................................................168
Default sort order in breaks................................................................169
Building reports using the Java Report Panel 9
Contents
To insert a break.................................................................................169
To prioritize breaks.............................................................................169
To define display properties of a break..............................................170
To remove a break..............................................................................171
Using sorts to organize data....................................................................172
Sorting the results displayed on reports.............................................172
To apply an ascending or descending sort.........................................173
To apply a custom sort.......................................................................173
To prioritize multiple sorts...................................................................174
Calculations, formulas and variables 175Chapter 17
Calculations, formulas and variables.......................................................176
Working with standard calculations.........................................................176
To insert a standard calculation in a table or crosstab.......................176
To remove a standard calculation......................................................177
Working with formulas.............................................................................177
The Formula toolbar...........................................................................177
Working with variables.............................................................................179
To create a variable from a formula....................................................179
To create a variable using the Variable Editor....................................179
To edit a variable................................................................................179
To delete a variable............................................................................180
Filtering reports 181Chapter 18
Report filters defined................................................................................182
Types of report filter.................................................................................182
Query filters and report filters compared.................................................183
Report filter operators..............................................................................183
Equal To operator...............................................................................183
Not Equal To operator........................................................................183
10 Building reports using the Java Report Panel
Contents
Different From operator......................................................................183
Greater Than operator........................................................................184
Greater Than Or Equal To operator...................................................184
Less Than operator............................................................................184
Less Than Or Equal To operator........................................................184
Between operator...............................................................................184
Not Between operator........................................................................185
In List operator...................................................................................185
Not In List operator.............................................................................185
Is Null operator...................................................................................185
Is Not Null operator............................................................................186
Creating, editing and deleting report filters..............................................186
To create a report filter using the Quick Filter option..........................186
To create a report filter using the Filter Editor....................................186
To create simple report filters.............................................................187
To combine multiple filters on a report...............................................188
To view the filters on a report.............................................................188
To edit a report filter............................................................................189
To delete a report filter........................................................................189
Drilling on report data 191Chapter 19
What is drill?............................................................................................192
Scope of analysis...............................................................................193
To set the scope of analysis...............................................................195
Drill paths and hierarchies..................................................................195
To switch to drill mode.............................................................................196
Retrieving more levels of data to the report.............................................197
To drill out of the scope of analysis....................................................197
To choose a drill path when more than one is available..........................198
Drilling on dimensions in tables and sections..........................................198
Drilling down.......................................................................................199
Building reports using the Java Report Panel 11
Contents
Drilling up...........................................................................................201
Drilling by............................................................................................201
Drilling on measures in tables and sections............................................204
To drill down on a measure value.......................................................204
To drill up on a measure value...........................................................205
Synchronizing drill across multiple tables and charts..............................205
Drilling on charts......................................................................................205
Drilling on dimensions via chart axes.................................................206
Drilling on measures in charts............................................................207
Drilling on axis legends......................................................................209
Using filters when you drill.......................................................................210
To change a filter value on the Drill toolbar........................................211
To add or remove a drill filter .............................................................211
Saving reports with drill filters..................................................................211
Refreshing data in a drilled report with prompts......................................211
Drilling with query drill..............................................................................212
Query drill defined..............................................................................212
Displaying data in tables 217Chapter 20
Tables in Web Intelligence.......................................................................218
Table types in Web Intelligence...............................................................218
Vertical table.......................................................................................218
Horizontal table..................................................................................219
Crosstab.............................................................................................219
Forms.................................................................................................220
Structure View and Results View.............................................................221
Creating and editing tables......................................................................221
To create a table by dragging objects onto a report...........................221
To create a table by selecting a template...........................................222
To duplicate a table............................................................................223
To apply a different template to a table by using drag and drop........223
12 Building reports using the Java Report Panel
Contents
To apply a different template to a table with Turn To..........................224
To add rows or columns to tables using drag and drop......................224
To add table rows or columns using the Insert row or column toolbar
menu..................................................................................................225
To remove table rows or columns......................................................225
To move a row or column...................................................................225
To swap a row or column....................................................................225
To replace a row or column................................................................226
To clear cell contents from a table......................................................226
To remove a table...............................................................................226
Formatting tables and table cells.............................................................227
To select a background color for the table.........................................227
To define alternate row and column colors for a table........................227
To insert an image or skin in a table...................................................228
To format table or cell borders............................................................228
To format text in table cells.................................................................229
To set cell height and width................................................................229
To copy formatting using the Format Painter.....................................230
To set the position of a table or chart on the report page...................231
To layer tables and cells.....................................................................231
To merge table cells...........................................................................232
Modifying tables to create crosstabs.......................................................232
To create a crosstab by adding an object to a vertical or horizontal
table....................................................................................................232
To create a crosstab by moving a column or row...............................233
Controlling data display in tables.............................................................233
Showing or hiding empty tables, rows or columns.............................233
Aggregating duplicate rows................................................................234
To show or hide headers and footers.................................................234
To start tables on a new report page..................................................234
To display object names in headers on crosstabs..............................234
Building reports using the Java Report Panel 13
Contents
To avoid page breaks in tables...........................................................235
To repeat table headers or footers on report pages...........................235
Copying tables.........................................................................................235
To copy a table...................................................................................235
To copy a table as text........................................................................236
Displaying data in free-standing cells 237Chapter 21
Free-standing cells defined.....................................................................238
To insert a free-standing cell in a report..................................................239
To copy a free-standing cell.....................................................................239
To copy a free-standing cell to another application as text......................240
Displaying data in charts 241Chapter 22
Creating charts........................................................................................242
Chart types in Web Intelligence...............................................................242
Bar charts...........................................................................................242
Line charts..........................................................................................243
Area charts.........................................................................................243
Pie charts...........................................................................................244
Radar, polar and scatter charts..........................................................244
3D charts............................................................................................245
2D charts............................................................................................245
Adding, copying and removing charts.....................................................246
To add a chart to a report...................................................................246
To copy a chart...................................................................................247
To remove a chart...............................................................................247
Changing the chart type...........................................................................248
To change the chart type by using drag and drop..............................248
To change the chart type by using TurnTo.........................................248
Positioning and sizing charts...................................................................249
14 Building reports using the Java Report Panel
Contents
To set the position of a table or chart on the report page...................249
To position a chart in relation to another chart or table......................249
To resize a chart.................................................................................250
Formatting charts.....................................................................................250
To insert and format a chart title.........................................................250
To display a chart with a 3D look........................................................250
To add background colors to a chart..................................................250
To modify chart borders......................................................................251
To select and format chart floors and walls........................................251
To show and format axis legends.......................................................251
To avoid page breaks in charts..........................................................252
To show axis labels on pie charts.......................................................252
To format axis label text, borders, and background...........................252
To show, hide or format the axes grid................................................252
Displaying and formatting chart data..................................................253
Formatting numbers and dates 257Chapter 23
Predefined and custom formats...............................................................258
Predefined formats.............................................................................258
Custom formats..................................................................................259
Working with documents 265Chapter 24
To create a Web Intelligence document from InfoView............................266
To open a Web Intelligence document from InfoView..............................266
To delete a Web Intelligence document from InfoView............................266
Saving documents...................................................................................267
To save a new Web Intelligence document in InfoView.....................267
To save a Web Intelligence document as an Excel spreadsheet.......267
To save a Web Intelligence document as a PDF file..........................268
To save a Web Intelligence document as a CSV file..........................269
Building reports using the Java Report Panel 15
Contents
Automatic saving and recovery..........................................................269
Printing Web Intelligence documents......................................................272
To print a report from the Java Report Panel.....................................272
Editing document properties....................................................................273
To display document properties.........................................................274
To purge data from a document...............................................................274
Linking to other documents.....................................................................275
Linking to other documents................................................................275
Working with hyperlinks......................................................................303
Get More Help 305Appendix A
Index 309
16 Building reports using the Java Report Panel

About Web Intelligence

1
About Web Intelligence
1

How Web Intelligence performs business intelligence over the web

How Web Intelligence performs business intelligence over the web
Web Intelligence provides business users an easy to use interactive and flexible user interface for building and analyzing reports on corporate data over the web, on secured intranets and extranets. The Web Intelligence software is installed by your administrator on a web server on your corporate network.
To use Web Intelligence from your local computer, you log into the business intelligence portal InfoView via your Internet browser. Then, depending on your security profile, you can interact with the reports in corporate documents or edit or build your own documents using a Web Intelligence report panel or query panel.

How Web Intelligence performs business intelligence offline

Web Intelligence can be used offline as Web Intelligence Rich Client, a standalone Microsoft Windows application, equivalent to the Java Report Panel, that you can install on your computer. Web Intelligence Rich Client lets you continue to work with Web Intelligence (WID) documents when you are unable to connect to a CMS, when you want to perform calculations locally rather than on the server, and when you want to work with Web Intelligence documents without installing a CMS or application server.
Web Intelligence Rich Client can also be used when connected to a CMS.

Interacting with Web Intelligence reports

Depending on your security profile and on how Web Intelligence is deployed across your organization, you can view, analyze, or enhance and modify the data displayed on reports.
18 Building reports using the Java Report Panel
About Web Intelligence
Interacting with Web Intelligence reports

Viewing and printing Web Intelligence reports

Once logged into the business intelligence portal InfoView, you can access Web Intelligence documents and view reports. Onscreen navigation is made easy with page-to-page navigation buttons and a document map that allows you to jump from section to section or report to report.
The same document can provide the information adapted to each user due to prompts that request each user, who opens the document, to specify the data they want to return to the reports.
When you print reports, Web Intelligence automatically generates a copy of reports in Portable Document Format (PDF) format for optimum print quality.

Drilling on Web Intelligence reports

Drilling on Web Intelligence reports enables you to analyze the detailed data behind the displayed results. You can turn the report you are viewing into a drillable report or drill on a duplicate of the original report to retain a version of the results before your drill analysis.
1
Once you have found the information you need, you can save a snapshot of the drilled report to share the results of your analysis with other Web Intelligence users, or save the document in Excel or Portable Document (PDF) format to print or email to other business contacts.

Performing on-report analysis

Viewing Web Intelligence reports in Interactive view format enables you to enhance reports and fine-tune the data reports contain, to highlight the information that most interests you on demand.
On-Report Analysis is designed for:
users who need to build queries and then want to build reports
report consumers who need to manipulate the reports created by others
With On-Report Analysis you can:
Building reports using the Java Report Panel 19
About Web Intelligence
1

Creating and editing Web Intelligence documents

view document metadata to understand the data behind reports and see
how reports are structured and filtered
filter and sort results
add new tables and charts
add formulas and create variables
format and change the layout of charts and tables
slice and dice results by adding other data to charts and tables
Note:
On-report analysis of Web Intelligence reports in Interactive view format is only available if your administrator has deployed Web Intelligence in JSP mode.
Creating and editing Web Intelligence documents
You can create or edit Web Intelligence documents using several tools:
Web Intelligence Query - HTML on page 20
Web Intelligence Java Report Panel on page 21
Web Intelligence Rich Client on page 21
Web Intelligence HTML Report Panel on page 22

Web Intelligence Query - HTML

Designed for users requiring a pure HTML environment to build queries, Web Intelligence Query – HTML offers the ability to define the data content of documents on multiple data sources. You can use Query – HTML to create new documents from scratch or edit the queries in documents created using any of the other Web Intelligence tools.
Used together with On-Report Analysis, Query – HTML provides a complete solution for building queries and designing powerful reports in a pure HTML environment. Once you have run the queries to generate a standard report, you can leverage Web Intelligence On-Report Analysis features to format multiple reports, add formulas, and create variables.
20 Building reports using the Java Report Panel
Creating and editing Web Intelligence documents
Note:
Web Intelligence Query – HTML and On-Report Analysis in Interactive view format are only available, if your administrator has deployed Web Intelligence in JSP mode.

Web Intelligence Java Report Panel

The Java Report Panel is designed for users who need more flexibility with designing report layout and defining formulas and variables. A graphical Formula Editor enables you to build formulas rapidly using drag-and-drop.
Note:
The Web Intelligence Java Report Panel is available if your administrator has deployed Web Intelligence in ASP mode and if your administrator has deployed Web Intelligence in JSP mode.

Web Intelligence Rich Client

About Web Intelligence
1
Web Intelligence Rich Client is a locally installed Microsoft Windows application that lets you work with Web Intelligence (WID) documents that are stored locally or in a CMS.
When working without a CMS connection you can work on your local machine with either CMS-secured or unsecured documents.
Web Intelligence Rich Client is based on the Web Intelligence Java Report Panel and provides equivalent document creation, editing, formatting, printing and saving capabilities.
There are a number of reasons for using Web Intelligence Rich Client to work with WID documents:
You want to work with Web Intelligence documents but you are unable
to connect to a CMS (while traveling, for example).
You want to improve calculation performance: Web Intelligence Rich
Client performs calculations locally, rather than on the server, and local calculations can perform better than server calculations.
You want to work with Web Intelligence documents without installing a
CMS or application server.
Building reports using the Java Report Panel 21
About Web Intelligence
1
Creating and editing Web Intelligence documents

Web Intelligence HTML Report Panel

Designed for users who need to build basic reports, the HTML Report Panel provides query and report features in a simple wizard-like interface. Each document is based on a single data source and can contain multiple reports, displaying different subsets of information.
In addition, the HTML Report Panel is 508 compliant and can be customized for specialized deployments.
Note:
The Web Intelligence HTML Report Panel is only available if your administrator has deployed Web Intelligence in JSP mode.
22 Building reports using the Java Report Panel

Accessing Web Intelligence from InfoView

2
Accessing Web Intelligence from InfoView
2

To log in to InfoView

You access Web Intelligence reports and set global Web Intelligence options from InfoView, the corporate business intelligence portal.
To log in to InfoView
Before you can use InfoView and Web Intelligence you need the following information:
a URL to the InfoView server
the InfoView server name and port number
your login and password
your authentication, which controls the InfoView resources available to
you
Contact your adminstrator for these details if you do not already know them.
Note:
By default the InfoView server name and authentification method are not displayed on the InfoView logon page. You need to supply this information only if your administrator has made these options visible.
You access Web Intelligence by using your web browser to log into InfoView, the corporate business intelligence portal. Once you are in InfoView, you can analyze and enhance Web Intelligence reports.
1. Launch your web browser.
2. Point your browser to the InfoView bookmark or URL.
The InfoView login page appears.
3. If the System box is blank, type the name of the InfoView server followed
by a colon (:), and then type the port number.
4. In the Username box, type your user name.
5. In the Password box, type your password.
6. In the Authentication box, select the authentication provided to you by
your administrator.
7. Click Log On.
The InfoView home page appears.
24 Building reports using the Java Report Panel
Accessing Web Intelligence from InfoView

To log out of InfoView

To log out of InfoView
When you finish using InfoView or Web Intelligence you need to log out, instead of simply closing your web browser.
Logging out of InfoView ensures that any preferences you modified during your InfoView session are saved. It also lets your administrator track how many users are logged into the system at any given time and thus optimize InfoView and Web Intelligence performance.
Click Log Out.
The login page appears. You are logged out of InfoView

Web Intelligence InfoView options

Web Intelligence document creation and viewing options

2
You can set your Web Intelligence options to determine how you create, view and interact with documents using Web Intelligence.
You create documents using a query editor to build the query to retrieve the document data. After the query returns the data to the document, you can view and interact with the data.
Building reports using the Java Report Panel 25
Accessing Web Intelligence from InfoView
2
Web Intelligence InfoView options
Advanced
DescriptionDocument creation option
You create documents using the Java Report Panel, a Java applet than launches in your Web brows­er.
The Java Report Panel is a com­bined query building, report editing and data analysis environment. If you choose Advanced as your document creation option, you also use the Java Report Panel for working with the data returned by the query. The Select a default view format option is not taken into account.
The Java Report Panel provides the richest feature set of all Web Intelligence query building, report editing and data analysis environ­ments.
Interactive
Desktop
Web Accessibility
26 Building reports using the Java Report Panel
You build queries using Query ­HTML, an HTML-based query editor.
You build queries, edit reports and analyze data using Web Intelli­gence Rich Client, a standalone version of the Java Report Panel that runs outside your web browser.
You create documents using the HTML Report Panel, a 508-compliant query-building and report-viewing environment.
Accessing Web Intelligence from InfoView
Web Intelligence InfoView options
You can use the following view formats to view and interact with existing Web Intelligence documents, or documents that you have just created using a query editor:
DescriptionView format
Use Web (HTML) format when you
Web
Interactive
want to open reports, answer prompts, navigate reports, and/or perform drill analysis.
Use Interactive format when you want to apply filters, sorts, calcula­tions, modify formatting and data displayed on tables and charts, and/or perform drill analysis.
Use Interactive format if you are us­ing Query – HTML to define queries, and you want to format reports based on those queries and add formulas and variables.
2
Interactive view format is only avail­able if your administrator has de­ployed Web Intelligence in JSP mode.
PDF
Use PDF mode when you want to view static reports.
To select the Web Intelligence query editor
1. Click the Preferences button on the InfoView toolbar.
2. Click Web Intelligence Preferences to display the Web Intelligence
options.
3. Select the query editor beneath Select a default creation/editing tool.
4. Click OK.
Building reports using the Java Report Panel 27
Accessing Web Intelligence from InfoView
2
Web Intelligence InfoView options
To select the Web Intelligence view format
You can select different view formats for Web Intelligence documents depending on how you want to interact with the information displayed on the reports. You select your Web Intelligence view options in InfoView. When you modify your view options, the new settings are implemented the next time you open a Web Intelligence document.
1. Click the Preferences button on the InfoView toolbar.
2. Click Web Intelligence Preferences to display the Web Intelligence
options.
3. In the Select a view format section, select the view format.
To select a default universe for new documents
1. Click Preferences on the Infoview toolbar.
2. ClickWeb Intelligence Preferences to display the Web Intelligence
options.
3. Click Browse beneath Select a default universe and browse to the
universe you want to select as the default.

To set Web Intelligence drill options

Drilling on reports lets you look deeper into data to discover the details behind a good or bad summary result displayed on a table, chart, or section. Before you begin a drill session, you can set your drill options in InfoView to specify how reports will change each time you drill.
1. Click Preferences on the Infoview toolbar.
2. Click Web Intelligence Preferences to display the Web Intelligence
options.
3. Select the drill options under Drill options and Start drill session.
28 Building reports using the Java Report Panel
Hide drill toolbar option
When you drill on a value displayed on a report, the Drill toolbar appears and displays the value on which you drilled. The value displayed on the toolbar filters the results displayed on the drilled report.
For example, if you drill on year 2001, the results displayed on the drilled table are Q1, Q2, Q3, and Q4 for year 2001. This means that the quarterly values you drilled to are filtered by 2001.
Note:
If the drilled report includes dimensions from multiple queries, a ToolTip appears when you rest your cursor on the value displayed on the filter. The ToolTip displays the name of the query and the dimension for the value.
The Drill toolbar allows you to select alternative values on the same level, in order to filter the results differently. For example, if you use the Drill toolbar illustrated above to select “2002,? the results displayed on the drilled table would be Q1, Q2, Q3, and Q4 for year 2002.
You can opt to hide the Drill toolbar when you start drill mode. The Drill toolbar is only useful if you want to select filters during your drill session.
Accessing Web Intelligence from InfoView
Web Intelligence InfoView options
2
Prompt when drill requires additional data option
When you drill the results displayed on a Web Intelligence report, you may want to drill to higher- or lower-level information that isn’t included in the scope of analysis for the document. When this is the case, Web Intelligence needs to run a new query to retrieve the additional data from the data source.
Since queries on large selections of data may take a long time to be completed, you can choose to be prompted with a message every time a new query is necessary. The prompt message asks you whether you want to run the additional query or not. In addition, the prompt lets you apply filters to the extra dimensions you include in the new query. This means you can restrict the size of the query to only the data necessary for your analysis.
You need permission from your administrator to drill out of the scope of analysis during a drill session.
Building reports using the Java Report Panel 29
Accessing Web Intelligence from InfoView
2
Web Intelligence InfoView options
Synchronize drill on report blocks option
When you select the Sychronize drill on all report blocks option, the display of all blocks changes to correspond with your drill actions. For example, if you drill down on a block from year to quarter, and your report also contains a chart showing data by year, the chart display also changes to display data by quarter.
If you do not select the option, only the drilled block changes in response to drill actions.
Start drill session option
The Start drill session option controls how Web Intelligence behaves when you start drill mode.
Start drill session on existing report option
When you select Start drill session on existing report, the current report becomes drillable when you start drill mode. When you end drill mode, the report displays the drilled values.
Start drill session on a duplicate report option
When you select Start drill on a duplicate report, Web Intelligence creates a duplicate of the current report when you start drill mode, and you drill on the duplicate. This allows you to compare the results of the original report with the results you discover during your drill analysis.

Web Intelligence locale options

The locale determines how a Web Intelligence document displays data. It affects, for example, the formatting of numbers and the default sort order.
Three locale settings combine to determine how Web Intelligence displays data:
30 Building reports using the Java Report Panel
Accessing Web Intelligence from InfoView
Web Intelligence InfoView options
DescriptionLocale
2
Product locale
Document locale
Preferred viewing locale
Related Topics
To permanently associate a locale with a document on page 32
The product locale
The product locale is the locale that InfoView uses by default. You set the product locale in the Infoview General preferences.
To set the product locale
1. Click Preferences on the main InfoView toolbar.
2. Click General to display the general options.
3. Select the product locale from the Product locale list.
The locale in which InfoView displays data by default.
The locale associated with a particular Web Intelligence document. When you save a document, the document locale becomes the current product locale or the preferred viewing locale.
You can permanently associate a lo­cale with a document.
The locale in which you choose to view documents
The document locale
The document locale is the locale associated with a particular document. By default, the document takes the product locale when you save a document, or the preferred viewing locale if this is different from the product locale and your settings give the preferred viewing locale priority. The document retains this locale until the next time it is saved, when it again takes either the product locale or the preferred viewing locale.
Building reports using the Java Report Panel 31
Accessing Web Intelligence from InfoView
2
Web Intelligence InfoView options
Note:
The GetContentLocale Web Intelligence function returns the document locale.
Related Topics
To permanently associate a locale with a document on page 32
To display data using the document locale
1. Click Web Intelligence Preferences to display the Web Intelligence
options.
2. Click Use the document locale to format the data beneath When
viewing a document.
The preferred viewing locale
The preferred viewing locale is the locale that you choose to dislay data. The preferred viewing locale overrides the product locale if it is different from the product locale and your settings give the preferred viewing locale priority.
To set the preferred viewing locale
1. Click Preferences on the main InfoView toolbar.
2. Click General to display the general options.
3. Select the preferred viewing locale from the Preferred viewing locale
list.
4. Click Web Intelligence Preferences to display the Web Intelligence
options.
5. If you want data to be formatted using the preferred viewing locale, click
Use my Preferred Viewing Locale to format the data beneath When viewing a document.
To permanently associate a locale with a document
1. In Web Intelligence Interactive, select Document > Properties from the
menu to display the" Document Properties" dialog box.
2. Select Permanent regional formatting.
3. Save the document.
32 Building reports using the Java Report Panel
Accessing Web Intelligence from InfoView
Web Intelligence InfoView options
The current document locale is associated permanently with the document and overrides the product locale and the preferred viewing locale.
2
Building reports using the Java Report Panel 33
Accessing Web Intelligence from InfoView
Web Intelligence InfoView options
2
34 Building reports using the Java Report Panel

Building and editing queries in the Java Report Panel

3
Building and editing queries in the Java Report Panel
3

Creating, editing and saving documents

Creating, editing and saving documents
You create Web Intelligence documents by first selecting a universe in InfoView. Each universe maps to a database containing corporate business information. When you connect to a universe, Web Intelligence automatically launches the document editor selected on the Web Intelligence Document Preferences page in InfoView.
After you have selected a universe, you use the objects in the universe to build a query to return data from the database to your Web Intelligence document.
After creating a document you can save it to the InfoView repository.

To select a universe

1. On the InfoView Home page, click the arrow next to New on the top
toolbar.
2. Click Web Intelligence Document.
3. Click the title of the universe on which you want to create a document.
Your selected query editor opens and displays the objects in the universe.

To edit a Web Intelligence document

1. Navigate to the document you want to open on the InfoView home page.
2. Click Actions > Modify.
The document opens in the Web Intelligence document editor you selected in the InfoView preferences.
36 Building reports using the Java Report Panel
Building and editing queries in the Java Report Panel

How universe objects map to data

How universe objects map to data

Classes and subclasses

Objects are grouped into folders called classes. Each class can also contain one or more subclasses. Subclasses contain objects that are a further subcategory of the objects in the upper level of the class.
The role of classes is to organize the objects into logical groups. When you create queries on the universe, classes help you to find the objects that represent the information that you want to use in a query.

Dimension object

A dimension object represents data that provides the basis for analysis in a report. Dimension objects typically retrieve character-type data, for example; customer names, resort names, or dates.
3
Dimension objects appear as follows in the Web Intelligence query panel:

Detail object

A detail obect provides descriptive data about a dimension. A detail is always attached to the dimension for which it provides additional information. For example, [Age] is a detail object that is associated with the (Customer] dimension.
Detail objects appear as follows in the Web Intelligence query panel:
Building reports using the Java Report Panel 37
Building and editing queries in the Java Report Panel
3

Building and using queries

Measure object

The measure object retrieves numeric data that is the result of calculations on data in the database. For example, [Revenue] is the calculation of the number of items sold multiplied by item price. Measure objects are often located in a Measures class.
Measure objects appear as follows in the Web Intelligence query panel:
There are two types of measure:
classic measures - calculated by Web Intelligence
smart measures - calculated by the database on which the universe is
based
In certain situations, smart measures impact the way in which Web Intelligence displays calculations. For more information on smart measures, see the Using Functions, Formulas and Calculations in Web Intelligence guide.
Building and using queries

To build and run a query in the Java Report Panel

1. On the InfoView Home page, click the arrow next to New, then select
Web Intelligence Document on the top toolbar. Alternatively, click Add Query in the Query Panel if you are adding a query to a document that
already contains at least one query.
2. Click the title of the universe on which you want to create a document.
3. If the query you are building is not the first query in the document, you
need to specify how its data will be displayed.
38 Building reports using the Java Report Panel
Building and editing queries in the Java Report Panel
Building and using queries
DescriptionOption
3
Insert a table in a new report
Insert a table in the current report
Include the result objects in the document without gener­ating a table
4. In the Data tab, open a class.
5. Select the objects you want to include in the query and drag them to the
Result Objects pane. To add all the objects in the class, drag the class to the Result Objects pane.
6. Repeat the previous step until the query contains all the objects you want
to include.
7. Select the objects on which you want to define query filters and drag them
to the Query Filters pane. To create a quick filter on an object, select the object in the Result Objects pane then click Add Quick Filter at the top right of the pane.
8. Set the scope of analysis and other query properties.
9. To remove an object from the Result Objects or Query Filters panes,
click Remove at the top right corner of the pane.
10. To remove all objects from the Result Objects or Query Filters panes,
click Remove All at the top right corner of the pane.
11. Click Run Query to run the query.
Display the data on a new report in the document
Display the data on the currently selected report in a new table
Include the data in the document without displaying the data on a report. (You can add the objects returned by the query to the report(s) later.)

To set query properties

1. Click the Properties tab in the Query Panel.
2. Click the Fold/Unfold arrows at the top right of each section of the options
to expand or close the property groups.
3. Select or type query property options.
Building reports using the Java Report Panel 39
Building and editing queries in the Java Report Panel
3
Building and using queries

To interrupt a query

You can interrupt a query before Web Intelligence has returned all the data to the document.
When you interrupt a query, only partial data is returned to the document. The values displayed in the document do not accurately reflect the definition in the query.
Before returning the data to the document, Web Intelligence requests you to choose which version of the data you want retrieved
1. On the "Waiting - Refresh Data" dialog box, click Cancel.
The "Interrupt Data Retrieval" dialog box appears.
2. Select one of the options on the "Interrupt Data Retrieval" dialog box.
40 Building reports using the Java Report Panel
Building and editing queries in the Java Report Panel
Building and using queries
DescriptionOption
3
Restore the results from the previous data retrieval
Purge all data from the document
Return the partial results

To remove a query

1. Select a the query you want to remove by right-clicking the appropriate
Query tab.
2. Click Remove.
Web Intelligence restores the values to the document that were retrieved the last time the query was run. The values displayed will not be the most up to data information avail­able on the database. You can run the query later to return the up to date values from the database
Web Intelligence displays the document empty of values. The structure and formatting of the document is retained. You can run the query later to return the up to date values from the database
Web Intelligence displays the new values retrieved so far in the appropriate parts of the document. The rest of the document will dis­play the values retrieved the last time the query was run

To duplicate a query

If you want to build a different query on a universe already included in the document, you can duplicate the existing query on that universe and then modify it, instead of starting from scratch.
1. Select the query you want to duplicate by right-clicking the appropriate
Query tab at the bottom of the report panel.
2. Select Duplicate
Building reports using the Java Report Panel 41
Building and editing queries in the Java Report Panel
3
Building and using queries

Multiple queries

You can include one or multiple queries in a Web Intelligence document. When you include multiple queries, those queries can be based on a single universe or on multiple universes available in InfoView.
For example, you can include product sales data and customer data in the same document. In this case, your corporate data for product line sales is available on one universe and data on customers is available on another universe. 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 two queries; one query on each universe. You can then include and format results from both queries on the same report.
Defining multiple queries in a single document is necessary when the data you want to include in a document is available on multiple universes, or when you want to create several differently-focused queries on the same universe. You can define multiple queries when you build a new document or add more queries to an existing document. You can present the information from all of the queries on a single report or on multiple reports in the same document.
Multiple queries, combined queries and synchronized queries compared
It is important to understand the relationship between multiple data providers, combined queries and synchronized data providers .
A single data provider, or query, can contain multiple queries, called
combined queries.
A document can be based on multiple data providers (each one of which
can contain multiple queries). These data providers do not need to be synchronized. If they are not synchronized, the document contains multiple sources of unrelated data.
Multiple data providers can be synchronized if they have common
dimensions around which they can be linked. You synchronize data providers by merging these common dimensions.
42 Building reports using the Java Report Panel
Building and editing queries in the Java Report Panel

Controlling access to queries

Controlling access to queries

Allow other users to edit all data providers query property

When selected, other users who have the appropriate editing rights can access Query View and modify the data providers in the document. When cleared, only the report creator can modify the data providers. This option is selected by default. Unlike the other query properties, which only apply to the selected query, this option applies to all of the data providers in the document.

Controlling how queries retrieve data

Max retrieval time query property

3
Maximum time that a query can run before the query is stopped. This can be useful when a query is taking too long due to an excess of data, or network problems. You can set a time limit so a query can stop within a reasonable time.

Max rows retrieved query property

The Max rows retrieved query property determines the maximum number of rows of data that are displayed when a query is run. If you only need a certain amount of data, you can set this value to limit the number of rows of data in your document.
Max rows retrieved does not operate at the database level. If you set Max rows retrieved to 1000, and your query returns 5000 rows, Web Intelligence
initially retrieves all 5000 rows, before discarding 4000 and retaining only the first 1000 rows.
The Sample result set query property also applies a restriction on the number of rows in the query, but at the database level. If you set Max rows
Building reports using the Java Report Panel 43
Building and editing queries in the Java Report Panel
3

Setting the scope of analysis

retrieved to 2000 and Sample result set to 1000, the query retrieves a maximum of 1000 rows only.
This setting can be overridden by the limits set by your administrator in your security profile. For example, if you set the Max rows retrieved setting to 400 rows, but your security profile limits you to 200 rows, only 200 rows of data will be retrieved when you run the query.

Retrieve duplicate rows query property

In a database, the same data may be repeated over many rows. You can choose to have these repeated rows returned in a query, or to have only unique rows returned.
Setting the scope of analysis

Scope of analysis

The scope of analysis for a query is extra data that you can retrieve from the database to give more details on the results returned by each of the objects in a query. This extra data does not appear in the initial result report, but it remains available in the data cube, so you can pull this data in to the report to allow you to access more detail at any time. This process of refining the data to lower levels of detail is called drilling down on an object.
In the universe, the scope of analysis corresponds to the hierarchical levels below the object selected for a query. For example, a scope of analysis of one level down for the object Year, would include the object Quarter, which appears immediately under Year.
You can set this level when you build a query. It allows objects lower down the hierarchy to be included in the query, without them appearing in the Results Objects pane. The hierarchies in a universe allow you to choose your scope of analysis, and correspondingly the level of drill available.
In the Java Report Panel and in Web Intelligence Rich Client, you can also create a custom scope of analysis by selecting specific dimensions for the Scope of Analysis pane.
44 Building reports using the Java Report Panel
Note:
You cannot set the scope of analysis when working in query drill mode because this drill mode causes Web Intelligence to modify the scope dynamically in response to drill actions.

Levels of scope of analysis

You can set the following levels for scope of analysis:
None
One level down
Two levels down
Three levels down
Building and editing queries in the Java Report Panel
Setting the scope of analysis
DescriptionLevel
Only the objects that appear in the Results Objects pane are included in the query.
For each object in the Result Objects pane, one, two, or three objects lower down the hierarchy tree are included in the query. The data from these ob­jects is stored in the cube until you add them to the document.
3
Custom
Note:
This option is available in the Java Report Panel and in Web Intelligence Rich Client only.
Including a scope of analysis in a document increases the document size significantly. This is because the data necessary for the scope you specify is saved with the document, even though it is not visible in the reports unless you start drill mode and drill down to the data to display the corresponding values.
In order to minimize the size of documents and optimize performance, we recommend that you only include a scope of analysis in documents where you are certain that users will need to drill.
We suggest the following method because it will be easier for you to set the scope of analysis seeing the hierarchy of the classes and objects.
Building reports using the Java Report Panel 45
All objects added manually to the Scope of Analysis panel are included in the query.
Building and editing queries in the Java Report Panel
3

Query contexts

To set the scope of analysis

1. Click the Show/Hide Scope of Analysis Pane button so that it appears
pressed in. The Scope of Analysis panel appears at the bottom of the Result Objects
pane. The default scope of analysis is None. Each dimension in the Result Objects pane appears in the Scope of Analysis pane.
2. Click the down arrow in the Scope of Analysis drop-down list box.
3. Select a level for the scope of analysis.
The level appears in the list box and the dimensions that are hierarchically below each dimension in the Result Objects pane appear in the Scope
of Analysis pane.
4. If you want to add selected dimensions to the scope of analysis or create
a custom scope of analysis, select dimensions in the Query Manager and drag them across to the Scope of Analysis panel.
Query contexts

What is an ambiguous query?

An ambiguous query is a query that contains one or more objects that can potentially return two different types of information.
In a universe, certain dimensions may have values that are used for two different purposes in the database. For example, the [Country] dimension in the query below can return two types of information:
Customers and the country in which they spent their vacation.
Customers and the country for which they have made their reservation.
The role that Country plays in this query is ambiguous. A country can be either the country where a vacation was sold, or a country where a vacation is reserved. One is existing information (sales), and the other is future information (reservations).
46 Building reports using the Java Report Panel
To avoid ambiguities in a query, the universe designer identifies the different ways that objects can be used in the universe, and implements restrictions on how these objects can be combined. These restrictions are called contexts.

What is a context?

A context is a defined group of objects that share a common business purpose. This business purpose is usually the type of information that these related objects represent. For example, a sales context is a grouping of all the objects that can be used to create sales queries. A reservations context is a grouping of all the objects that can be used in reservation queries. Contexts are defined in a universe by the universe designer.
You can combine any object within the same context to create a query. You can also combine objects in different contexts. If you use an object that is common to both contexts, Web Intelligence will try to determine the context that best fits the other objects in the query.
If it cannot determine a context, you are prompted to choose the context that you want to apply to the query.
Building and editing queries in the Java Report Panel
Query contexts
3

Choosing a context when you run a query

When you create a query or refresh a report, you may be asked to choose a context before the query can run. Contexts are set up in a universe to avoid ambiguous queries.
To choose a context when you run a query
1. Run the query containing multiple contexts.
The "Select a Context" dialog box appears.
2. Select the context in the "Select a Context" dialog box.
Building reports using the Java Report Panel 47
Building and editing queries in the Java Report Panel
3
Query contexts

Defining how contexts are used

Reset contexts on refresh query property
When selected, you are prompted to choose a context each time a query requiring a context is run. When unselected, Web Intelligence retains the context specified the first time you run the query.
To reset contexts on query refresh
1. Make sure you are in Query View.
2. Click the Properties tab to display the query properties.
3. Select Reset contexts on refresh.
Clear contexts query property
When this property is selected, Web Intelligence clears the contexts listed in the list when you next run the query or refresh the data.
To clear contexts
1. Make sure you are in Query View.
2. Click the Properties tab to display the query properties.
3. Click Clear Contexts
48 Building reports using the Java Report Panel

Using combined queries

4
Using combined queries
4

Combined queries defined

Combined queries defined
A combined query is a group of queries that work together to return a single result. All queries in the group must be based on the same universe.

Types of combined query

You can combine queries in three relationships:
union
intersection
minus
In a union combination, Web Intelligence takes the all the data from both queries, eliminates duplicate rows, and builds a combined data set.
In an intersection combination, Web Intelligence returns the data that is common to both queries.
In a minus combination, Web Intelligence returns the data in the first query that does not appear in the second.
Example: Union, intersect and minus queries
In this example you have two queries that return lists of countries as shown in the following table:
Depending on the type of combined query, Web Intelligence returns the following values:
50 Building reports using the Java Report Panel
ValuesQuery
US; UK; Germany; FranceQuery 1
US; SpainQuery 2
ValuesCombination type
US; UK; Germany; France;SpainUNION
Using combined queries

What can you do with combined queries?

ValuesCombination type
US;INTERSECTION
UK; Germany; FranceMINUS
What can you do with combined queries?
Combined queries allow you to answer questions that are otherwise difficult or impossible to frame in a single Web Intelligence query.
Example: Return a data set using a combined query
The Island Resorts Marketing sample universe contains the dimension Year, which returns guests who have already stayed in a resort, and Reservation Year, which returns guests who have reserved to stay in the future. Because of the structure of the database and universe, these objects are incompatible, which means that you cannot include them in the same block in a report.
4
What if you want to return a single list of years that includes those years where more than n guests stayed in a resort and those years where more than n guests reserved to stay in a resort? You can do this using a combined query, as follows:
ReturnsQuery
Query 1
UNION
Query 2
The union between these two queries returns the list of years that you want.
Building reports using the Java Report Panel 51
Years where more than n guests stayed in a resort
Years where more than n guests re­served to stay in a resort
Using combined queries
4

How does Web Intelligence generate combined queries?

How does Web Intelligence generate combined queries?
If your database supports the type of combination in your query, combined queries work at the database level: they alter the query that Web Intelligence submits to the database. They do so by generating SQL (Structured Query Language) queries containing UNION, INTERSECT and MINUS operators.
Note:
SQL is the standard query language of relational databases, although each database has its own dialect.
If your database does not support the type of combination in your query, Web Intelligence performs the query at the report level by generating multiple SQL queries whose data it resolves after retrieval from the database.

To build a combined query

1. Create an initial query in the Query Panel.
2. Click Add a combined query (to the right of the SQL button) on the
toolbar. Web Intelligence adds a copy of the initial query to the data provider. The
second query has the following characteristics:
It contains the same report objects as the original query.
It does not contain the filters defined on the original query.
It is combined with the original query in a UNION relationship.
3. To switch to a query, click Combined Query n in the bottom left pane of
the Query Panel. The individual queries in the combined queries are named Combined
Query n.
4. To delete a query, right-click the Combined Query n you want to delete,
then select Remove on the menu.
5. To change the combination type, double-click on the operator. The
operator moves through the sequence UNION, INTERSECTION, MINUS.
6. Build each query within the combined query as you build any normal Web
Intelligence query.
7. Click Run Query.
52 Building reports using the Java Report Panel
Using combined queries

Combined query structure

Combined query structure
The queries within a combined query must return the same number of objects of the same data type and the objects must be in the same order. You cannot combine queries when the number of objects in the query results and the data types of those objects are not identical. For example, you cannot combine a query than returns Year with a query that returns Year and Revenue, and you cannot combine a query that returns Year with a query that returns Revenue.
You must also pay attention to the semantics of your combined queries. While it is possible to combine a query that returns Year with a query that returns Region if both dimensions are of the same data type, the result - a mixed list of years and regions - is unlikely to be meaningful. Typically, if your first query contains a Year dimension, your second query also contains a dimension that returns a list of years.

To return a list of years and reservation years based on the number of guests

4
This example describes the workflow for the query described in the example Return a data set using a combined query. You want to build a query that returns a list of years consisting of years where more than n guests stayed in a resort and years where more than n guests reserved to stay in a resort.
1. Select the Island Resorts Marketing universe in the list of universes to
open the Query Panel.
2. Drag the Year object to the Result Objects pane.
3. Drag the Number of Guests object to the Query Filters pane and create
a report filter that restricts Number of Guests to greater than n.
4. Click Combined Query.
The Combined Query pane appears in the bottom left of the Query panel with the two queries joined by UNION.
5. Click on the second query and remove the Year and Number of Guests
objects.
6. Drag the Reservation Year object to the Result Objects pane.
7. Drag the Future Guests object to the Query Filters pane and create a
report filter that restricts the future guests to greater than n.
Building reports using the Java Report Panel 53
Using combined queries
4

Combined query precedence

8. Click Run Query.
The query returns the combined list of years and reservation years.
Related Topics
Return a data set using a combined query on page 51
Combined query precedence
The order in which Web Intelligence executes query combinations in a combined query is crucial in determining the final result.
In the simplest form of combined query you combine two or more queries in a relationship as follows:
Query 1
Query 2INTERSECTION
Query 3
In such a case, Web Intelligence first finds the set of data that represents the union/intersection/minus between Combined Query n and Combined Query n + 1, then finds the union/intersection/minus between that data set and the data returned by Combined Query n + 2. Web Intelligence continues in this way through all the queries in the relationship. This gives the following result for the above example:
54 Building reports using the Java Report Panel
DataQuery
US; UK; France; GermanyQuery 1
US; France; FinlandQuery 2
US; FranceINTERSECTION of 1 and 2
US; SpainQuery 3
USFinal INTERSECTION

Multiple combined queries

You can combine multiple queries in complex relationships to determine the order of execution, as in the following example:
MINUS
Combined Query 1
Using combined queries
Combined query precedence
4
INTERSEC TION
Combined Query 3
Web Intelligence processes query groups from right to left as they appear in the Query Panel, and from top to bottom within each group. (Higher-precedence groups, such as the MINUS group in the above example, appear indented to the right in the Query Panel.) In the above query Web Intelligence first determines the result of the minus combination then finds the intersection of this result with the result of Combined Query 3 as shown in the following table:
Combined Query 2
ResultQuery
US; UK; Spain; GermanyQuery 1
GermanyQuery 2
US; UK; SpainQuery 1 MINUS Query 2
US; Spain; FinlandQuery 3
(Query 1 MINUS Query 2)
INTERSECTION
Query 3
US; Spain
Building reports using the Java Report Panel 55
Using combined queries
4
Combined query precedence
Note:
If your database directly supports the type of combined query you wish to execute, Web Intelligence generates SQL containing combination operators. In this case the order of precedence depends on the order of precedence defined in the database. See your Web Intelligence administrator for more details.

To set the order of precedence of combined queries in the Java Report Panel

1. Build the first query in the Query Panel.
2. Click Combined Query.
3. Repeat these steps until you have built all the component queries.
4. To increase the precedence of a pair of queries, drag and drop a query
on to the query with which you want to associate it in the higher-precedence pair.
Web Intelligence indents the source and target queries in the drag-and-drop operation and combines them by default in a UNION.
5. Continue adding queries to the higher-precedence group by dragging
and dropping them on to the space between any two queries already in the group.
6. To create further higher-precedence groups within an existing
higher-precedence group, repeat the previous two steps.
7. Double-click the combination operators of all the groups in the query to
change them as required.
8. Click Run Query.
56 Building reports using the Java Report Panel

Filtering queries

5
Filtering queries
5

Query filters defined

Query filters defined
You limit the data returned to the document by applying filters when you define the query. Using query filters enables you to secure the data that you don’t want specific user groups to see and limits the size of the documents that are stored on your network. When you run the query on the document data, the Web Intelligence returns only the values that meet the query filter definitions.
Query filters limit the data Web Intelligence returns to a document. They retrieve a sub-set of the data from the database and return the corresponding values to the document. You define filters to match business questions. For example, you can filter the [Year] dimension to view only sales revenue for Year 2003; or filter the [Annual Income] dimension to view only customers whose annual income is equal to or greater than $1.5M.
Query filters allow you to:
retrieve only the data you need to answer a specific business question
hide the data you don’t want specific users to see when they access the
document
minimize the quantity of data returned to the document to optimize
performance
Example: In Q4 2002, which stores in my sales region gained margins
above $130K?
As Regional Marketing Manager for Texas, you are only interested in analyzing margins for Texas, but the sales universe includes data US-wide. In addition, you only want to view information for stores where margins reached over your 4Q 2002 quarterly target figure: $130K. To create a document with only the information you need, you apply a filter on the [State], [Year], and [Quarter] dimensions and a filter on the [Margin] measure:
58 Building reports using the Java Report Panel
Filtering queries

Query filters and report filters compared

Year Equal to 2002
Quarter Equal to Q4
AND
State Equal to Texas
Margin Greater than or equal to 130000
To avoid displaying the filtered values Texas, 2002, and Q4 in the table columns Year, Quarter, and State, you exclude the [Year], [Quarter], and [State] objects from the Result Objects pane. When you generate the report, the report values correspond to Texas stores with 4Q 2002 margins greater than or equal to $130K:
MarginSales RevenueStore name
133,802307,914e-Fashion Houston
5
e-Fashion Houston Leighton
136,055316,232
Query filters and report filters compared
You can apply filters at two levels within a document:
query filters – these filters are defined on the query; they limit the data
retrieved from the data source and returned to the Web Intelligence document.
report filters – these filters limit the values displayed on reports, tables,
charts, sections within the document, but they don’t modify the data that is retrieved from the data source; they simply hide values at the report level.

Types of query filter

You can create the following types of query filter:
Building reports using the Java Report Panel 59
Filtering queries
5
Types of query filter
predefined filters – created by your administrator
custom filters – you define on the query
quick filters - a simplified form of custom filter for simple filters
prompts – you define these dynamic filters to display a question or a list
of values so you or other users can select different filter value(s) at each run query
You can mix different types of filters on a single query.

Predefined query filters

Predefined filters make the specific data you most typically need for reports permanently available in Web Intelligence. They are created by an administrator and saved with the universe. Predefined filters often contain complex expressions that require a detailed knowledge of the database structure. Including predefined filters on the universe means you don’t need to create the same custom filters every time you create new Web Intelligence documents based on the same universe.
As a Web Intelligence user, you cannot view the component parts of predefined filters or edit predefined filters.
To select a predefined query filter
Double-click the predefined filter or drag it to the Query Filters pane.
When you run the query, the data corresponding to the query filters you selected is returned to the report.

Quick filters

Quick filters allow you to quickly define the values you want to retrieve for a specific object without launching the Filter Editor. By default, Quick filters use the Equal to operator if you select a single value or the In list operator if you select multiple values.
For example:
If you select the [Payment Status] dimension and the value “unpaid? you
create the filter: [Payment Status] Equal to “unpaid?
60 Building reports using the Java Report Panel
If you select the [Country] dimension and the values US, Japan, Germany,
you create the filter: [Country] In list “US;Japan;Germany?
To create a quick query filter
1. Select the object you want to filter in the Result Objects pane.
2. Click Add quick filter at the top right corner of the Result Objects pane
to display the "Add Quick Filter" dialog box.
3. Select or type the values you want to filter and click OK.
Web Intelligence adds the filter to the Query Filters pane.

Custom query filters

You create custom query filters to limit document data to information corresponding to:
a specific business question
the business information needs of a specific group of users
Filtering queries
Types of query filter
5
For example, you can create custom filters to retrieve sales results data for specific dates, products, or services, or to view customer information only for customers who are high wage earners or who live in a particular region.
To add and remove custom query filters
1. Select the object you want to filter and drag it to the Query Filters pane.
The query filter appears in outline in the Query Filters pane.
2. Click the arrow next to the default operator (In List) and select the query
operator from the list of operators.
3. Click the arrow on the right of the query filter and select Constant,
Value(s) from List or Object.
4. Type/select the constant, list of values or object you want to include in
the filter.
5. To remove the filter, select it and click the Delete key, or click Remove
at the top right corner of the Query Filters pane. To remove all filters, click Remove All at the top right corner of the Query Filters pane.
Building reports using the Java Report Panel 61
Filtering queries
5
Types of query filter

Query filter and prompt operators

Equal To operator
Use the Equal to operator to obtain data equal to a value.
For example, to return data for the US only, create the filter "County Equal To US".
Not Equal To operator
Use the Not Equal To operator to obtain data not equal to a value.
For example, to return data for all countries except the US create the filter "County Not Equal To US".
Different From operator
Use the Different From operator to retrieve data different from a value.
For example, to retrieve data for all quarters execpt Q4, create the filter [Quarter] Different From "Q4"
Greater Than operator
Use the Greater Than operator to retrieve data greater than a value.
For example, to retrieve data for customers aged over 60, create the filter "[Customer Age] Greater than 60".
Greater Than Or Equal To operator
Use the Greater Than Or Equal To operator to retrieve data greater than or equal to a value.
62 Building reports using the Java Report Panel
For example, to retrieve data for revenue starting from $1.5M, create the filter "[Revenue] Greater than or equal to 1500000".
Less Than operator
Use the Less Than operator to retrieve data lower than a value.
For example, to retrieve data for exam grades lower than 40, create the filter "[Exam Grade] Less Than 40".
Less Than Or Equal To operator
Use the Less Than Or Equal To operator to retrieve data less than or equal to a value.
For example, to retrieve data for customers whose age is 30 or less, create the filter "[Age] Less Than Or Equal To 30".
Filtering queries
Types of query filter
5
Between operator
Use the Between operator to retrieve data between and including two values.
For example, to retrieve data for weeks starting at week 25 and finishing at 36 (including week 25 and week 36), create the filter "[Week] Between 25 and 36".
Not Between operator
Use the Not Between operator to retrieve data outside the range of two values.
For example; to retrieve data for all the weeks of the year, except for and not including weeks 25 through 36, create the filter "[Week] Not between 25 and 36".
Building reports using the Java Report Panel 63
Filtering queries
5
Types of query filter
In List operator
Use the In List operator to retrieve data corresponding to values in a list of values.
For example, to retrieve data for the US, UK and Japan only, create the filter [Country] In List ("US";"UK";"Japan").
Not In List operator
Use the Not In List operator to retrieve data that does not correspond to multiple values.
For example, if you do not want to retrieve data for the US, UK and Japan, create the filter [Country] Not In ("US";"UK";"Japan").
Matches Pattern operator
Use the Matches Pattern operator to retrieve data that includes a specific string or part of a string.
For example, to retrieve customers whose date of birth is 1972, create the filter [DOB] Matches Pattern "72".
Different From Pattern operator
Use the Different From Pattern operator to return data that doesn't include a specific string.
For example, to retrieve customers whose date of birth is not 1972, create the filter [DOB] Different From Pattern '72'.
Both operator
Use the Both operator to retrieve data that corresponds to two values.
For example, to retrieve customers who have both a fixed and a mobile telephone, create the filter [Account Type] Both 'Fixed' And 'Mobile'.
64 Building reports using the Java Report Panel
Except operator
Use the Except operator to retrieve data that corresponds to one value and excludes another.
For example, to retrieve customers who have a fixed telephone and do not have a mobile telephone, create the filter [Account Type] 'Fixed' Except 'Mobile'.
The Except operator is more restrictive than Different From or Not In
List. For example, a report that returns customers and that includes the
filter [Lines] Different From 'Accessories' excludes all sales records where the item sold is part of the 'Accessories' line. If the same customer has purchased Accessories and non-Accessories items, the customer still appears in the report, but their spending total includes only non-Accessories sales.
If the filter is [Lines] Except 'Accessories', only customers who have bought no accessories are included in the report.
Filtering queries
Types of query filter
5
Related Topics
Not In List operator on page 185
Different From operator on page 183

Combining query filters

Combining query filters
Typical business questions require you to retrieve information that matches more than one criteria. For example, if you are analyzing customer services data, you will most likely want to focus on customers for a specific time period and also for a specific region, and probably also for a specific level of customer service contract. You can retrieve data that answers several criteria like this by combining filters in the same query.
Building reports using the Java Report Panel 65
Filtering queries
5
Types of query filter
Example: Analyze sales revenue this year at stores where the floor size
is over 4,000 square feet and sales revenue figures are equal to or less than $1.5M
In this example, you are an operations manager for a retail chain. You want to analyze information about the large retail stores in your chain that are making less than the sales revenue figure your company has set as the target.
To do this you add a predefined filter on the [Year] dimension to specify that you only want to retrieve values for this year. Then you create a second filter on the [Sales Floor Size] dimension to specify that you only want to retrieve data for stores where the floor size is greater than 4,000 square feet. After this, you create a third filter on the [Sales Revenue] measure to specify that you only want to retrieve data for stores where the sales revenue figures are equal to or less than $1.5M. Finally, you combine these three filters with the And operator:
Last Year
AND
When you run the query, only data for stores that satisfy all three criteria will be returned to the report.
To combine query filters
1. Create the filters and add them to the Query Filters pane.
By default, Web Intelligence combines the filters with the AND operator.
2. Double-click the operator (in Query - HTML) or click the arrow next to the
operator checkbox and select the other operator (HTML Report Panel) to toggle between AND and OR.
Nesting query filters
Nesting query filters allows you to create more complex filter conditions than is possible when you combine filters at the same level.
Sales Floor Size Group Greater than or equal to: 4000
Sales Revenue Less than 1,500,000
66 Building reports using the Java Report Panel
Filtering queries
Types of query filter
When you nest filters, you set the order in which Web Intelligence evaluates them. For example, Web Intelligence can return the data given by two query filters joined in an OR relationship (where either one filter condition or the other is true) and then further restrict this data by applying another filter to it. In this case, the two filters in an OR relationship are nested, then compared with the other filter in an AND relationship.
The following example illustrates this:
Example: List all sales made in Japan either in Q4 or where the revenue
was greater than 1000000
To answer this question you create the following nested query filter:
Country Equal To Japan
5
AND
Web Intelligence first returns sales data where the sale was made in Q4 or the revenue was greater than 1000000, then restricts this data further by returning only those sales made in Japan.
To nest query filters
1. Drag and drop a report object onto an existing query filter.
A query filter outline on the report object appears in a nested AND relationship with the existing query filter.
2. Define the new query filter.
OR
Quarter Equal To Q4
Revenue Greater Than 1000000
Building reports using the Java Report Panel 67
Filtering queries
Types of query filter
5
68 Building reports using the Java Report Panel

Filtering data with subqueries

6
Filtering data with subqueries
6

What is a subquery?

What is a subquery?
A subquery is a more flexible kind of query filter that allows you to restrict values in more sophisticated ways than is possible with a ordinary query filters.
Subqueries are more powerful than ordinary query filters for the following reasons:
They allow you to compare the values of the object whose values are
used to restrict the query with values from other objects.
They allow you to restrict the values returned by the subquery with a
WHERE clause.

What can you do with subqueries?

Subqueries allow you to pose complex questions that are difficult or impossible to formulate with simple query filters. For example: what is the list of customers and their associated revenue where the customer purchased a service that had previously been reserved (by any customer) in Q1 of 2003?

How do subqueries work?

Subqueries work by modifying the SQL that Web Intelligence generates to retrieve the query data. Web Intelligence generates SQL containining a subquery that restricts the data returned by an outer query. For more information on SQL subqueries, see any book on SQL.
Note:
SQL is the query language supported by all relational databases (RDBMS), although each database has its own syntax.

To build a subquery

1. Add the objects that you want to appear in the query to the Result Objects
pane.
2. Select the object in the Result Objects pane that you want to filter with a
subquery and click Add a subquery at the top right of the Query Filters pane.
70 Building reports using the Java Report Panel
Filtering data with subqueries
To build a subquery
The subquery outline appears in the Query Filters pane. By default the object you selected appears as the Filter object and Filter By object.
3. To add a WHERE condition to the subquery, drag a report object to the
area of the subquery below the Drop an object here boxes.
4. To add a WHERE condition to the subquery, drag a report object to the
area of the subquery below the Drop an object here boxes. You can use an existing subquery or standard query filter as a WHERE
condition in a subquery. To do so, drag and drop the existing filter or subquery to the area of the subquery below the Drop an object here boxes. To copy rather than move the existing filter to the WHERE condition, hold down the Control key while dragging and dropping. In this case the existing filter remains in its initial place and becomes part of the WHERE condition of the subquery.
5. Select the operator and values used to filter the object in the WHERE
condition.
6. Click Subquery to add an additional subquery to the query filter.
In addition to linking subqueries in AND or OR relationships, you can nest them (create subqueries within subqueries) by dragging an existing subquery to the area beneath the Drop an object here boxes. In this case the inner subquery becomes part of the WHERE condition of the outer subquery. To copy rather than move the subquery to the WHERE condition, hold down the Control key while dragging and dropping. In this case the second subquery remains at the same level as the first, and becomes part of the WHERE clause of the first.
By default the two subqueries are linked in an AND relationship. Click the AND operator to toggle between AND and OR.
6
7. To nest a subquery (create a subquery within a subquery), drag an existing
subquery to the area beneath the Drop an object here boxes. To copy rather than move the subquery to the WHERE condition, hold
down the Control key while dragging and dropping. In this case the second subquery remains at the same level as the first, and becomes part of the WHERE clause of the first
The inner subquery becomes part of the WHERE condition of the outer subquery.
Building reports using the Java Report Panel 71
Filtering data with subqueries
6

Subquery parameters

To find out which customers bought a service that had previously been reserved in Q1 of 2003, and how much revenue have they generated

1. Drag the Customer and Revenue objects to the Result Objects pane of
the Query Panel.
2. Select the Service object.
3. Click Subquery.
The subquery outline appears in the Query Filters pane.
Note:
The selected object appears in both boxes in the subquery outline. You often use the same object in both boxes, although this is not required. If the objects do not return any common values, the subquery returns no values, and the query therefore returns no values.
4. Drag the Reservation Year object to the area of the subquery outline
beneath the Service objects. Web Intelligence adds a WHERE condition on the Reservation Year
object.
5. Set the Reservation Year condition operator to Equal To.
6. Type ‘FY2003’ in the Type a constant box.
7. Drag the Reservation Quarter object to the area of the subquery outline
beneath the Service objects. Web Intelligence adds the Reservation Quarter object to the WHERE
condition.
8. Set the Reservation Quarter condition operator to Equal To.
9. Type ‘Q1’ in the Type a constant box.
10. Click Run Query to run the query.
Subquery parameters
A subquery or set of subqueries contains the following parameters:
72 Building reports using the Java Report Panel
Filtering data with subqueries
Subquery parameters
DescriptionParameter
The object whose values are used to filter the result objects.
6
Filter Object(s)
Filter By Object(s)
Operator
You can include more than one Filter Object. If you do, Web Intelligence concatenates the values of the ob­jects you specify.
The object that determines which Filter Object values the subquery re­turns.
You can include more than one Filter By object. If you do, Web Intelligence concatenates the values of the ob­jects you specify.
The operator that specifies the rela­tionship between the Filter object and the Filter By object.
Because of database restrictions you cannot use certain combinations of operators and Filter By objects togeth­er. For example, if you use the Equal To operator with a Filter By object that returns multiple values, the database rejects the SQL because this type of subquery requires the Filter By object to return one value only.
In cases where the generated SQL is rejected by the database, you see an error message showing the error description returned by the database
Building reports using the Java Report Panel 73
Filtering data with subqueries
6
Subquery parameters
WHERE condition (optional)
DescriptionParameter
An additional condition that con­strains the list of values of the Filter By object. You can use ordinary re­port objects, predefined conditions or existing query filters (including subqueries) in the WHERE condition.
If there is more than one subquery, determines the relationship between the subqueries.
Relationship operator
AND - the conditions in all of the subqueries must be satisfied.
OR - the conditions in any one of the subqueries must be satisfied.
74 Building reports using the Java Report Panel

Ranking data using database ranking

7
Ranking data using database ranking
7

What is database ranking?

What is database ranking?
When you rank data you sort and filter it according to ranking criteria. Web Intelligence allows you to return unranked data from a database, then rank it in Web Intelligence.
A database ranking allows you to specify a ranking at the query and database level so that the data returned to Web Intelligence by the query is already ranked.
Database rankings allow you to answer questions like Return the top 3 customers based on the revenue they generated for each year? at the query level, without the need to return data that falls outside the ranking to Web Intelligence and then filter it using a Web Intelligence ranking.
Database ranking has the following advantages:
Ranking data can be processing-intensive. By ranking at the database
level you allow the server, which is typically far more powerful than the client machine, to perform this processing.
Pre-ranking data reduces the amount of data retrieved across the network
and stored in Web Intelligence.
A database ranking works by modifying the SQL that Web Intelligence generates to retrieve the query data. If your database supports ranking, Web Intelligence generates SQL to rank the data. Web Intelligence uses the SQL-99 Rank function in ranking SQL. (SQL is the query language supported by all relational databases (RDBMS), although each database has its own syntax.)
Note:
You can perform a database ranking only if your database supports it. If this is not the case, the Add a database ranking button is disabled on the Query Panel toolbar. Databases that support ranking are Oracle, DB2, Terradata and Redbrick.
Related Topics
Ranking data on page 132
76 Building reports using the Java Report Panel
Ranking data using database ranking

Database ranking parameters

A database ranking appears as follows in the Query Filters pane of the Query Panel:
The following table describes the parameters from left to right in the ranking:
DescriptionParameter
Ranking order.
Top/Bottom
Top - ranks in descending order.
Bottom - ranks in ascending order.
Database ranking parameters
7
Number of records
Ranking dimension
Based on
For Each (optional)
The number of records to return in the ranking. For example, the top 10.
The dimension used in the ranking. For example, if the dimension is Region and the ranking is Top 10, the ranking returns the top 10 regions.
The measure by which the ranking di­mension is ranked. For example, if the measure is Revenue and the dimen­sion is Region, Web Intelligence ranks regions by the amount of revenue they generate
Dimension that specifies additional calculation context for the ranking. For example, if the ranking dimension is Region, the measure is Revenue and the For Each dimension is Country, Web Intelligence ranks regions by rev­enue within each country.
Building reports using the Java Report Panel 77
Ranking data using database ranking
7

To create a database ranking

WHERE condition (optional)
To create a database ranking
1. Add the objects that you want to appear in your query to the Result Objects
pane of the Query Panel.
2. Select the dimension that you want to rank by.
3. Click Add a database ranking on the toolbar.
The ranking outline appears in the Query Filter pane. The dimension you selected appears as the ranking dimension and the first measure in the query appears as the ranking measure in the Based on box.
DescriptionParameter
Additional restriction on the values re­turned in the ranking that appears be­low the other parameters. For example, a ranking of regions with a condition that restricts Country to “USA? ranks only those regions in the USA.
Note:
The Add a database ranking button is disabled if your database does not support ranking.
4. Select the ranking direction (Top or Bottom).
5. Type the number of records you want the ranking to return in the box next
to Top/Bottom. You can specify a prompt instead of a constant by clicking on the arrow
next to the number. When you select a prompt the user must enter the ranking number when the query is run.
6. Drag the dimension that provides the calculation context for the measure
to the For Each box. This dimension is optional. To display the For Each box, click the arrow
to the right of the Based on measure.
7. Drag any dimensions that you want to include in the WHERE restriction
to the area at the bottom of the ranking.
8. Click Run Query.
78 Building reports using the Java Report Panel
Ranking data using database ranking
To create a database ranking
Related Topics
What is a subquery? on page 70

To create a report that returns the top 10 employees based on salary, and calculated by department

1. Drag the Department, Employee Name, and Salary objects to the Report
Objects pane within the Query Panel.
2. Select the Employee Name object.
3. Click Add a database ranking on the toolbar.
Web Intelligence adds an outline database rank to the Query Filters pane. The ranking dimension is Employee Name and the ranking measure is Salary.
4. Set the ranking direction to Top.
5. Set the ranking number to 10.
6. Click the arrow next to the Based on measure if the For Each box is not
already visible.
7. Set the For Each dimension to Department by dragging and dropping the
dimension. The ranking now looks like this:
7
8. Click Run Query.
Building reports using the Java Report Panel 79
Ranking data using database ranking
To create a database ranking
7
80 Building reports using the Java Report Panel

Filtering data using prompts

8
Filtering data using prompts
8

What is a prompt?

What is a prompt?
A prompt is a special type of query filter. It is a dynamic filter that displays a question every time you refresh the data in a document. You answer prompts by either typing or selecting the value(s) you want to view before you refresh the data. Web Intelligence retrieves only the values you specified from the database and returns those values to the reports within the document. Prompts allow multiple users viewing a single document to specify a different sub-set of the database information and display it in the same report tables and charts. Prompts also reduce the time it takes for the data to be retrieved from the database.
A prompt contains the following elements:
a filtered object
an operator
a message
For example, to prompt users to select a specific year, you define a prompt on the [Year] dimension:
Year Equal To ("Which year?°)
In this prompt, the filtered object is [Year], the operator is Equal To, and the prompt message is "Which year?".
You can define prompts on any dimension, measure, or detail object. For example, you can filter the [Year] dimension to return values for a specific year, filter the [Sales Revenue] measure to return values for a range of revenue figures, or filter the [Year/week] detail to return values for a specific week in a year.
You can create multiple prompts, related by the AND or OR operators, in the same query. You can also nest prompts. When the user runs a query, Web Intelligence displays the prompts.
Prompts appear in the SQL generated by a Web Intelligence query as either the value supplied in response to the prompt (when the SQL is read-only), or as Web Intelligence prompt syntax (when the SQL is editable). For example, a prompt on [Country] can appear in the generated SQL as
Resort_Country.country = @prompt('Enter Country:','A', 'Resort\Country', Mono,Free,Persistent,,User:0)
82 Building reports using the Java Report Panel
or as
Resort_country.country In ('UK')
Prompts can be optional. The user is not obliged to specfy a value for an optional prompt. If no value is specified, Web Intelligence ignores the prompt.

Merged prompts

When a document contains multiple data providers, any prompts that include (1) objects with the same data type, (2) operators of the same operator type, and that (3) use the same prompt text are merged.
When all the data providers are refreshed, a single prompt message appears for such prompts.
The List of Values displayed by the merged prompt is the list associated with the object in the prompt that has the most display property constraints.

Cascading prompts

Filtering data using prompts
Cascading prompts
8
Some objects cause Web Intelligence to display a cascading prompt when they are included in a prompt definition. The universe designer defines the lists of values of these objects hierarchically in relation to other object lists of values in the universe.
Cascading prompts help the user to focus on the object values they want to include in the prompt without the need to search all possible object values.
Example: Choosing a store
In this example the universe designer has defined the [Store Name], [City] and [State] objects in a hierarchy. If you include a prompt [Store Name]
Equal To <value>, Web Intelligence displays these objects in a hierarchy
in the Prompts dialog box. In order to select the store, the user must first select the state in which the store city is found, then the city in which the store is found, then the store itself. When the user selects the state, Web Intelligence restricts the values of City to the cities in the state; when the user selects the city, Web Intelligence restricts the stores to the stores in the city.
Building reports using the Java Report Panel 83
Filtering data using prompts
8

Hierarchical lists of values

Hierarchical lists of values
If your universe contains hierararchical lists of values, these lists appear in tree form. You navigate down through the tree to the items you want.
Whether a list of values appears as a cascading prompt or hierarchically depends on how the list is configured in the universe. See your administrator for more information.

Query filter and prompt operators

Equal To operator

Use the Equal to operator to obtain data equal to a value.
For example, to return data for the US only, create the filter "County Equal To US".

Not Equal To operator

Use the Not Equal To operator to obtain data not equal to a value.
For example, to return data for all countries except the US create the filter "County Not Equal To US".

Different From operator

Use the Different From operator to retrieve data different from a value.
For example, to retrieve data for all quarters execpt Q4, create the filter [Quarter] Different From "Q4"
84 Building reports using the Java Report Panel

Greater Than operator

Use the Greater Than operator to retrieve data greater than a value.
For example, to retrieve data for customers aged over 60, create the filter "[Customer Age] Greater than 60".

Greater Than Or Equal To operator

Use the Greater Than Or Equal To operator to retrieve data greater than or equal to a value.
For example, to retrieve data for revenue starting from $1.5M, create the filter "[Revenue] Greater than or equal to 1500000".

Less Than operator

Filtering data using prompts
Query filter and prompt operators
8
Use the Less Than operator to retrieve data lower than a value.
For example, to retrieve data for exam grades lower than 40, create the filter "[Exam Grade] Less Than 40".

Less Than Or Equal To operator

Use the Less Than Or Equal To operator to retrieve data less than or equal to a value.
For example, to retrieve data for customers whose age is 30 or less, create the filter "[Age] Less Than Or Equal To 30".

Between operator

Use the Between operator to retrieve data between and including two values.
Building reports using the Java Report Panel 85
Filtering data using prompts
8
Query filter and prompt operators
For example, to retrieve data for weeks starting at week 25 and finishing at 36 (including week 25 and week 36), create the filter "[Week] Between 25 and 36".

Not Between operator

Use the Not Between operator to retrieve data outside the range of two values.
For example; to retrieve data for all the weeks of the year, except for and not including weeks 25 through 36, create the filter "[Week] Not between 25 and 36".

In List operator

Use the In List operator to retrieve data corresponding to values in a list of values.
For example, to retrieve data for the US, UK and Japan only, create the filter [Country] In List ("US";"UK";"Japan").

Not In List operator

Use the Not In List operator to retrieve data that does not correspond to multiple values.
For example, if you do not want to retrieve data for the US, UK and Japan, create the filter [Country] Not In ("US";"UK";"Japan").

Matches Pattern operator

Use the Matches Pattern operator to retrieve data that includes a specific string or part of a string.
For example, to retrieve customers whose date of birth is 1972, create the filter [DOB] Matches Pattern "72".
86 Building reports using the Java Report Panel

Different From Pattern operator

Use the Different From Pattern operator to return data that doesn't include a specific string.
For example, to retrieve customers whose date of birth is not 1972, create the filter [DOB] Different From Pattern '72'.

Both operator

Use the Both operator to retrieve data that corresponds to two values.
For example, to retrieve customers who have both a fixed and a mobile telephone, create the filter [Account Type] Both 'Fixed' And 'Mobile'.

Except operator

Filtering data using prompts
Query filter and prompt operators
8
Use the Except operator to retrieve data that corresponds to one value and excludes another.
For example, to retrieve customers who have a fixed telephone and do not have a mobile telephone, create the filter [Account Type] 'Fixed' Except 'Mobile'.
The Except operator is more restrictive than Different From or Not In
List. For example, a report that returns customers and that includes the
filter [Lines] Different From 'Accessories' excludes all sales records where the item sold is part of the 'Accessories' line. If the same customer has purchased Accessories and non-Accessories items, the customer still appears in the report, but their spending total includes only non-Accessories sales.
If the filter is [Lines] Except 'Accessories', only customers who have bought no accessories are included in the report.
Related Topics
Not In List operator on page 185
Different From operator on page 183
Building reports using the Java Report Panel 87
Filtering data using prompts
8

To create a prompt

To create a prompt
1. From the Data tab, drag the object on which you want to apply a prompt
and drop it onto the Query Filters pane. The query filter appears in outline in the Query Filters pane.
2. Click the arrow at the right of the Query Filter and select Prompt from
the menu.
3. Type the prompt text in the text box.
4. Click the icon next to the text box and use the dialog box that appears to
set the prompt properties.
If the prompt is for a date and you want users to see the popup
calendar in order to select the date(s) then do not select Prompt with
List of Values
If the document contains multiple data providers, and there is already
a prompt that includes (1) objects with the same data type, (2) operators of the same operator type, and (3) that uses the same prompt text as the new prompt, Web Intelligence displays a warning to tell you that the two prompts will be merged. This means that whenever all the data providers are refreshed, a single prompt message will appear for the two prompts.
5. Select Optional prompt to make the prompt optional.
6. To delete a prompt, right-click it and select Remove from the menu.
The prompt appears at each document refresh.
Related Topics
Defining how prompts display on page 88
Merged prompts on page 83

To remove a prompt

Select the prompt and then click the Delete key.

Defining how prompts display

By default, prompts display a box and a list of values. You answer the prompt by either typing the value(s) in the box or by selecting value(s) from the list.
88 Building reports using the Java Report Panel
Filtering data using prompts
Defining how prompts display
You can modify how prompts display by checking one, some, or all of the following options:
8
If you want the prompt to display...
the list of values associat­ed with the filtered dimen­sion, measure, or detail,
the value(s) specified the last time the prompt was answered (users can se­lect a different value(s)),
the value(s) you specify as the default (users can select a different val­ue(s)),
want to view all the val­ues for the object and then select from those values
often reselect the same value(s) when you re­fresh the document, but want the ability to select a different value when necessary, such as the name of the current month
almost always reselect the same value(s) when you refresh the docu­ment, but want the ability to select a different value when necessary, such as the number for the cur­rent year
then...(useful when you...)
leave the option selected by default: Prompt with
List of Values
select the option: Keep last values selected
select the option: Set de­fault value(s)
a list of values from which users select a value(s),
prevent users from typing a value that might not ex­ist on the database
select the option: Select
only from List
To make the prompt optional, select Optional prompt. The user is not obliged to specify a value for the prompt. In this case, Web Intelligence ignores the prompt.
Note:
If the prompt is for a date and you want users to see the popup calendar in order to select the date(s) then do not select Prompt with List of Values
Building reports using the Java Report Panel 89
Filtering data using prompts
8

Combining prompts

Combining prompts
Combining multiple prompts on a single query enables you to filter the data returned to the document so that each person viewing the reports sees only the information relevant to their business need. For example, you can combine the following three prompts on a Customer Accounts document:
Which customer?
Which account?
Which calendar period: from? to?
This enables each accounts manager viewing the document to view report values for a specific customer account during a specific period.
You combine prompts in the same way that you combine query filters.

Combining prompts with query filters

Combining prompts and filters on a single query enables you decide the values for some of the selected objects on the query using filters and allow users to decide the values of other selected objects using prompts. For example, if you combine the following filters and prompts on a HR document:
[Year] Equal to This Year
[Job title] Not equal to Senior Executive
Which employee?
Users viewing the document can choose which employee they view information for, but they can only view data for the current year and they can’t view data for senior executives.

To change the order of prompts

1. Click the Properties tab in the Query Panel.
2. Select the prompt you want to move up or down in the prompt order in
the Prompt Order box, then press the Up or Down arrow next to the box.
90 Building reports using the Java Report Panel

The Java Report Panel reporting interface

9
The Java Report Panel reporting interface
9
By default, the Java Report Panel report interface appears as follows:
Report tabs - a collection of four tabs at the left of the screen that you
use to work with reports.
DescriptionTab
Data
Templates
Map
Properties
Toolbars
Main
Formatting
Displays the universe objects, formulas and variables that can be included in the report.
Displays the tables, charts and cells that can be included in the report.
Displays a hierarchical map of the report components (for examples tables, cells, sections, filters).
Displays the editable properties used to configure the appear­ance and behavior of the report. The list of properties varies depending on the report component selected.
DescriptionToolbar
You use the main toolbar to switch between query view and report view, to save and print documents, and to ac­tivate data tracking and drill mode, and to configure the report interface.
The main toolbar is always visible. All the other toolbars can be hidden.
You use the formatting toolbar to format text and report objects.
Reporting
Page Naviga­tion
Reports - by default the reports contained in the Web Intelligence
document appear to the right of the report tabs and below the toolbars. Each report appears on its own
92 Building reports using the Java Report Panel
You use the report toolbar to add reporting features (for ex­ample filters, variables, rankings, calculations).
You use the page navigation toolbar to navigate through the pages in a report.
The Java Report Panel reporting interface
You can configure the report interface (for example by hiding toolbars or changing the position of the report tabs) by selecting options from the Configure View menu on the main toolbar.
9
Building reports using the Java Report Panel 93
The Java Report Panel reporting interface
9
94 Building reports using the Java Report Panel

Answering prompts

10
Answering prompts
10

To enter values to answer a prompt

To enter values to answer a prompt
1. With a report in a Web Intelligence document open, click Refresh Data
on the right of the main toolbar above the report. The "Prompts" dialog box appears.
2. Select a prompt question.
If the prompts are organized hierarchically in a tree, you need to select the prompt at the lowest level of the hierarchy first. This type of prompt is referred to as a cascading prompt.
The values you can choose are listed in the pane on the lower left.
If the list of values is not available, click Refresh values to display it. The list of values now appears together with the date on which it was last refreshed.
If the prompt has been answered previously, the values selected the last time appear in the prompt answer pane on the right. You can either leave those values selected or use << to remove them.
The options you see when you answer prompts depend on (1) whether this is the first time the results have been refreshed or not and (2) the properties set for the prompts when they were created.
3. Select the values from the list of choices in the pane on the left, for which
you want to view results, or type the values into the text box, and click the >> to add them to the prompt answer box on the right.
If you type multiple values, you need to separate each value with a semi-colon (;). For example: Florida;Texas.
4. Click Run Query.
Web Intelligence retrieves the data for the values you specified, and returns the results to the reports.
Note:
If the prompt is optional, click Run Query without supplying a value. Web Intelligence ignores the prompt.

To enter dates to answer a prompt

1. With a report in a Web Intelligence document open, click Refresh Data
on the right of the main toolbar above the report.
96 Building reports using the Java Report Panel
Answering prompts
To enter dates to answer a prompt
The "Prompts" dialog box appears.
2. To select a date, click the arrow to the right of the text box, select a date
from the popup calendar, and then click >> to add the date you selected to the list on the right.
If the prompt has been answered previously, the values selected the last time appear in the prompt answer pane on the right. You can either leave those values selected or use << to remove them.
3. If the prompt allows you to select multiple dates, and you want to view
results for more than one date, repeat the previous step.
4. Click Run Query.
Web Intelligence retrieves the data for the values you specified, and returns the results to the reports.
Note:
If the prompt is optional, click Run Query without supplying a value. Web Intelligence ignores the prompt.
10
Building reports using the Java Report Panel 97
10
Answering prompts
To enter dates to answer a prompt
98 Building reports using the Java Report Panel

Web Intelligence viewing modes

11
Web Intelligence viewing modes
11

To switch between viewing modes

To switch between viewing modes
You can view Web Intelligence reports in different modes depending on how you want to work with data and how you want the data to appear.
1. In Web Intelligence Interactive, select the report tab of the report you
want to view.
2. Click the arrow next to the View button on the main toolbar above the
report.
3. Select the viewing mode.
Web Intelligence Interactive displays the report in the selected viewing mode.
4. In the Java Report Panel, use Switch Page/Quick Display on the
Reporting toolbar to alternate between Page mode and Quick Display
mode.

Draft mode

Draft mode displays just the tables, reports, and free standing cells in reports.
Use Draft mode when you want to focus on analyzing results, add calculations or formulas, or add breaks or sorts to tables to organize results.

Page mode

Page mode displays the page layout of reports, including page margins, headers, and footers.
Use Page mode when you want to fine-tune the formatting of tables and charts and the layout of report pages.

PDF mode

PDF mode displays the report in PDF format.
100 Building reports using the Java Report Panel
Loading...