In the Web Layout Editor, add a new web page, and select Active Report as the In the Active Report Specification pane of the Web Layout Editor, click Edit Click OK. In the WebLayout Editor, add a new web page and select Historical Report as the In the His

B-8 Application Administrators Guide for Content Server

1. In the Web Layout Editor, add a new web page, and select Active Report as the

Page Type.

2. In the Active Report Specification pane of the Web Layout Editor, click Edit

Report Query . 3. Define the query by entering information on the Edit Active Report Query Screen .

4. Click OK.

B.4.3 Defining a Historical Report To prepare an Archive Historical Report:

1. In the WebLayout Editor, add a new web page and select Historical Report as the

Page Type.

2. In the Historical Report Specification pane of the Web Layout Editor, click Create

Report Data . 3. When you create the report data in the Create Historical Report Screen , specify Archive History for the data source. 4. Write a query for the report that will return the data that you want to retrieve. For example, specify the Content ID.

5. When done specifying information for the report, click OK.

B.4.4 Editing a Query Expression in an Active Report To edit the query expression in an active report: 1. In the Web Page Hierarchy Pane , select the report you want to edit.

2. In the Active Report Specification pane, click Edit Report Query.

3. In the Query Expression window on the Edit Active Report Query Screen , select the query line to edit.

4. Make changes to the query as necessary, and click Update.

5. Click OK. If a query is not specified, all values are returned.

B.5 Writing Queries This section covers these topics: ■ About Writing Queries on page B-9 ■ Writing Directory Queries on page B-9 ■ Writing Report Queries on page B-9 ■ Creating a Query Link on page B-10 ■ Editing the Query Expression in a Query Link on page B-10 ■ Adding a Query Results Page on page B-10 Caution: If you clear the Custom Query Expression check box, the expression reverts to its original definition; all modifications will be lost. Building a Web Site B-9 ■ Editing a Query Results Page on page B-11 ■ Deleting a Query Results Page on page B-11 B.5.1 About Writing Queries You can write custom query expressions when you define query links. The method that you use to write custom queries varies depending on the kind of query that you write: ■ Directory: See Writing Directory Queries on page B-9. ■ Report: See Writing Report Queries on page B-9. B.5.2 Writing Directory Queries To write directory custom queries, you can use Idoc Script. Idoc Script is Content Servers scripting language, which is described in detail in the Oracle Software Developers Kit SDK. B.5.3 Writing Report Queries To write report queries, you can use SQL script and Idoc Script. Idoc Script is the proprietary scripting language, which is described in detail in the Oracle Fusion Middleware Idoc Script Reference Guide. Basic SQL script is briefly described below. B.5.3.1 Basic SQL Script SQL script involves operators, which are words that show logical relationships between the words in your query. The following table contains some basic operators and their use. Note: Your SQL syntax is dependent on your database. Different databases expect different syntax for items like wildcards, and so forth. See your database documentation for specific syntax information. Operator Use AND Returns files that contain the words it links. OR Returns files that contain at least one of the words it links. = Equal or Not equal Less than Greater than + Less than or equal to + Greater than or equal to IN Finds a position in a table. BETWEEN Finds a value in a range. NOT Excludes the files that contain the specified condition. B-10 Application Administrators Guide for Content Server B.5.3.2 Basic SQL Examples ■ Finds all files that have an internal revision ID less than 50000: dID 50000 ■ Finds all files that have a Content ID between 10000 and 50000: dDocName BETWEEN 10000 AND 50000 B.5.4 Creating a Query Link To create a query link: 1. In the Web Page Hierarchy Pane , select the page where you want to locate the new query link.

2. In the Page Links pane, click Add.