Вы находитесь на странице: 1из 21

RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

Practice 2-1: Adding Filters to a Request


Goals To add a column filter to constrain a request to obtain results that answer a
particular question and to limit results to specific months
Scenario Add a filter that allows you to filter results based on region, state, and city.
Time 10 15 minutes
Instructions
1. If necessary, start Oracle Business Intelligence Presentation Services and log in as
Administrator. To do this, click Start >Programs >Oracle Business Intelligence >
Presentation Services and enter Administrator in the User ID and Password
fields.
2. Add filters to your saved request.
a. Click the Answers link.
b. Open the Formatted Sales By State request.
i. Click the Catalog tab (in the selection pane).
ii. Select My Folders >My Sales and expand the My Sales folder.
iii. Click the saved request, Formatted Sales By State.
iv. Click the Modify button.
c. Add a filter to show records only from the West region. Note that you dont
want to add the Region column to your results.
i. Click Region in the Customers table. The Region column is added to
the Columns section on the Criteria tabbed page.
ii. Click the Column Properties button in the Region column. The Column
Properties dialog box is displayed.
iii. Click the Column Format tab.
iv. Check the Hide check box at the upper-right corner.
v. Click OK.
vi. Click the Add Filter button in the Region column. The Create/Edit Filter
dialog box is displayed.
vii. In the right panel, click All Choices, and then click West. Note that
West is added to the Value field.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


viii. Click East. Note that it is added as a second value.

ix. Click OK.
x. Note that you are returned to the Criteria tab and that in the Filters
section you have a new filter called Region is equal to / is in West,
East.

xi. Click the Filter Options button and select Edit Filter.
xii. In the Create/Edit Filter window, click the Delete button next to the
East value.
xiii. Click OK.

d. Add another filter value to show records only from 1999. Follow the steps
above, using the Periods table and the Year column.
e. Check your filters:

f. How would you change the AND to an OR in your filters?



RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


g. Click the Results tab to view the results.

h. How many records appear?



i. Save the filter for use with other content.
i. Click the Criteria tab.
ii. Click the Save Filter button. The Save Filter dialog box is displayed.
iii. Click the My Filters folder. My Filters: Supplier Sales appears in the
Folder text box.
iv. Enter West Region, 1999 in the Name field.
v. Click OK.
j. Save the existing request with the filter.
i. Click the Save button.
ii. Select My Folders >My Sales.
iii. Name the request Formatted Sales by State, West Region 1999.
iv. Click OK.
3. Create a filter for the current and previous month using variables.
a. Click the Answers link.
b. Open the Sales by State request in the My Sales folder.
c. Click the Modify button.
d. Add the Month column to the request by selecting Periods, and then Month
in the selection pane.
e. Click the Add Filter button in the Month column.
f. In the filter Operator field, choose is equal to / is in.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


g. Change Value to Variable by clicking the Add button and selecting Variable,
and then Repository from the drop-down list.
Note: The administrator has predefined variables called CURRENT_MONTH
and PREVIOUS_MONTH.
h. In the Server Variablefield, enter CURRENT_MONTH.
i. Click the Add button and select Variable, and then Repository from the
drop-down list.
j. In the Server Variablefield, enter PREVIOUS_MONTH.
k. Click OK.
l. Click the Results tab to review the results.
m. Save the request as Sales by State for Current and Previous Month in
the My Sales folder.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


Solutions 2-1: Adding Filters to a Request
Answers
2.f. How would you change the AND to an OR in your filters?
Click the AND.
2.h. How many records appear?
29
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


Practice 2-2: Adding a Column Filter Prompt to
a Request
Goals To use a column filter prompt to constrain a request to obtain results that
answer a particular question
Scenario Build a column filter prompt that allows you to filter results based on region,
state, and city.
Time 10 15 minutes
Instructions
1. If necessary, start Oracle Business Intelligence Presentation Services and log in as
Administrator.
2. Create a request.
a. Click the Answers link.
b. Select the SupplierSales subject area.
c. Create the following request:

3. Add a column filter prompt.
a. Click the Prompts tab.
b. Select Create Prompt >Column Filter Prompt. The Column Filter Properties
dialog box opens.
c. In the Caption field, enter Filter by Region. This caption will appear to the
user.
d. In the Description field, enter Filter by Region. Descriptions are displayed
when administrators use the Catalog Manager.
e. In the Filter on Column drop-down list, select the Region column.
f. In the Operator drop-down list, select is equal to / is in.
g. Under How should the user choose a value or values?, accept the defaults:
Select it from a drop-down list and Single Value Only.
h. Under What values should be shown to the user?, select Limited Values.
Limiting values prevents a user from choosing values that would result in no
data. In this example, when a Region is selected in the first prompt, only states
within that region will be available for selection in the next prompt.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


i. Select Allow user to skip prompt. This will cause a Skip Prompt option to
appear. The user can then click this option to bypass a selection for this filter.
j. Check your work:


k. Click OK. The prompt is added to the request.

4. Test the prompt.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


a. Click the Test Prompts button. The prompt appears in a separate window.
Notice the Skip Prompt option:

b. Click the drop-down list and verify that three regions appear: Central, East,
and West.

c. Close the window where the prompt appears.
5. Repeat the steps outlined above and build two more column filter prompts: one
for State, and one for City. Use the screenshots below as a guide.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


a. State column filter prompt:

RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


b. City column filter prompt:

6. Set the execution order of the column filter prompts.
a. If necessary, use the up and down arrows to move the prompts so they appear
in the following order:

7. Test your work.
a. Click Test Prompts.
b. In the Filter By Region prompt, select West from the drop-down list. The next
prompt, Filter By State, appears automatically.
c. In the Filter By State prompt, select CA (California) from the drop-down list.
Notice that only states in the West region appear. The next prompt, Filter By
City, appears automatically.



RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841




d. In the Filter By City prompt, select San Francisco from the drop-down list.
Notice that only cities in California appear. The filtered request appears,
displaying customers who are in the West region, in the state of California, in
the city of San Francisco.

e. Close the prompt test window.
8. Save the request as My Column Filter Prompts in the My Sales folder.
9. Leave Answers open for the next practice.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


Practice 2-3: Adding an Image Prompt to a
Request
Goals To add an image prompt to an Oracle Business Intelligence request
Scenario Create an image prompt for a map image that users click to return results
filtered by region.
Time 10 15 minutes
Instructions
1. Save an image file in the i net pub\ Wwwr oot directory so that the Oracle BI
Presentation Server can locate the file.
a. In Windows Explorer, navigate to D: \ l abs.
b. Copy the file USAMap.jpg. This image has already been defined with hot
spots for the purposes of this practice. The image is a United States map with
three drillable regions defined: West, Central, and East.
c. Paste the file into D: \ I net pub\ Wwwr oot .
2. Create the following request:

3. Create an image prompt.
a. Click the Prompts tab.
b. Select Create Prompt >Image Prompt.
c. In the Caption field, enter Click a region on the map to see total
region revenue by customer.
d. In the Image URL field, enter http://localhost/USAMap.jpg.
e. Navigate to D: \ l abs and open the file USAMap.txt. This file has the
appropriate HTML <map>tags and data for the USAMap. j pg file, including
the hot spots and image coordinates.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


f. Select and copy the contents of USAMap. t xt and paste them into the HTML
image map field.

g. Click Extract Image Map from HTML. The Image Map Prompt Properties
dialog box expands to show the area titles, shapes, and coordinates entered in
the HTML field.
h. Enter the following values. Area Title can be any value. Column needs to be a
fully qualified column name in the format Table.Column. The Value column
must display values contained in the request table. Column and Value are
case-sensitive.
Area Title Column Value
West Customers.Region West
Central Customers.Region Central
East Customers.Region East
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


i. Check your work.
j. Click OK. The image prompt is displayed on the Prompts tab.

k. Click Test Prompts.

l. Move your cursor over the different regions of the map and verify that the
region names appear.
m. Drill down on the West region.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


n. Verify that you see the expected results.

o. Close the prompt test window.
p. Save the request as My Image Prompt in the My Sales folder.
4. Leave Answers open for the next practice.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


Practice 2-4: Using a Saved Request as a Filter
Goals To create a filter based on the results of another saved request.
Scenario Use a saved request as a filter to limit the number of rows returned for a new
request.
Time 5 10 minutes
Instructions
By using the results of a saved request to filter a column in another request, you can
ensure that the results are limited to the same dataset between related requests.
1. Create and save a request to be used as a filter in another request.
a. Create the following request and associated filter:


b. Click Results. There should be 31 records. The screenshot shows only a
portion of the records.

c. Save the request as Customers West Region in the My Sales folder.
2. Create a request to be filtered by a saved request.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


a. Create the following request:

b. Click Results. There should be 136 records returned. These are all the
customers in all regions. The screenshot displays only a portion of the results.

c. Click the Criteria tab.
d. Click the Filter button for the Region column. The Create/Edit Filter dialog
box is displayed.
e. Click Advanced.
f. Select Filter based on results of another request.

g. In the Relationship field of the Filter on Saved Request dialog box, select is
equal to any.
h. Click Browse.
i. In the Choose Request dialog box, select the Customers West Region
request.
j. Click OK.
k. In the Use values in Column field, select Region.
l. Click OK. The filter appears in the workspace.

m. Click Results.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


n. Verify that only 31 rows are returned, and that results include only customers
in the West region.
3. Leave Answers open for the next practice.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


Practice 2-5: Editing SQL for a Column Filter
Goals To edit the SQL for a column filter in an Oracle Business Intelligence request
Scenario You edit the logical SQL WHERE clause to be used as a filter to add another
region to the filter.
Time 5 minutes
Instructions
While it is generally not necessary to directly edit SQL in your requests, it is
sometimes preferable to directly edit the WHERE clause issued in the SQL for a filter.
1. Edit the SQL generated for a column filter.
a. Open the saved Customers West Region request.
b. Click Modify.
c. Click the Filter button for the Region column.
d. Click Advanced >Convert this filter to SQL.

e. In the Advanced SQL Filter text box, enter Customers.Region = East.
f. Click OK. The filter appears in the workspace.

g. Click the AND operator to change it to OR.

h. Click Results.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841


i. Verify that the request now returns results for customers in the East and West
regions. There should be 87 records returned.

j. Save the request as Customers East and West Regions in the My Sales
folder.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

Вам также может понравиться