A HOLD file is the output of a report request stored in a file
that you can use as input to another WebFOCUS procedure.
You can then create new report requests that extract data from
the HOLD file, resulting in multi-step report.
HOLD files can be created to use in a report, chart, document,
or visualization.
xValuable Applications of HOLD Files
A HOLD file is valuable when you want to do the following:
- Extract fields from
a large data source for faster and more efficient retrieval in subsequent
requests.
- Store virtual field
values or summary values calculated in one request for further processing
in another request.
x
HOLD files can be created for immediate use and saved
temporarily or they can be stored for future and repeated use.
xOutput Formats for Reports
You can save a HOLD
file for a report in the following formats:
- Binary (*.ftm)
- FOCUS (*.foc). For
more information, see FOCUS Format Index Fields.
- Comma Delimited with
Titles (*.csv)
- Plain Text (*.ftm)
- Tab Delimited (*.tab)
- Tab Delimited with
Titles (*.tab)
- Database Table (*.sql)
Note: The Database Table output
is only available when working against an SQL database.
- SQL Script (*.sql)
- Hyperstage (*.bht)
Note: The Hyperstage output is only
available when the reporting server has a Hyperstage adapter configuration.
- XML (*.xml)
- Visual
Discovery AE (*.txt)
Note: The Visual
Discovery AE output option is only available with a Visual Discovery
Analyst Edition license.
x
This section contains examples of how you would use
a HOLD file.
Note:
- Across fields are not allowed in HOLD files.
- Using the Change Title option in the Query pane, you can change
the title of a field prior to creating a HOLD file. A blank space
in the title will be replaced by an underscore. This functionality
enables you to control the names used for the fields included in
the HOLD file, and makes it easier to find the fields when creating
report.
- When creating a HOLD file, the Temporary dialog box displays
only those reporting server applications to which you have access.
- You can use Auto Linking when working with HOLD files. For more
information, see Using the Auto Linking Feature to Link Content.
x
Procedure: How to Create a Tabular Report From a HOLD File
To create
a tabular report from a HOLD file, begin by creating a report.
-
In the Open
dialog box, select the wf_retail_lite Master File.
-
Add the
following measure fields to the report:
- Cost of Goods
- Discount
- Gross Profit
- Quantity,Sold
- Revenue
-
Add the
following dimension fields to the report:
- Product Category
- Product,SubCategory
- Sale,Year
-
On the Home
tab, in the Format group, click File.
The Temporary dialog box opens.
-
In the Temporary dialog box, name the HOLD file, keep
the default file type, Binary (*.ftm), and click Save.
-
At the bottom of the canvas, click Create Report.
The custom database structure displays in the Resources
panel. The canvas is returned to a default blank state, enabling
the development of a new report using the HOLD file.
-
From the HOLD file, drag Quantity,Sold to the canvas.
-
On the canvas, select the Quantity,Sold column heading.
-
On the Field tab, in the Display group, click Aggregation and
then click First Value.
Note: The heading changes to FST Quantity Sold.
-
Select the FST Quantity Sold heading.
-
On the Field tab, in the Display group, click Hide Field to
hide Quantity,Sold, as it will be used in a subsequent calculation.
-
On the Data tab, in the Calculation group, click Summary (Compute).
-
In the Summary Field (COMPUTE) dialog box, do the following:
- In the Format field, type D8.2%.
- Double-click the Quantity,Sold field to add it to the formula
box.
- Add / 100 after the Quantity Sold field to calculate the percentage.
-
Click OK to close the dialog box.
-
Drag Product,Category to the By Query field container.
-
In the Query pane, select the Product,Category field.
-
On the Field tab, in the Break group, select Subtotal to
create Subtotals on Product,Category.
-
Drag Product, Subcategory to the By Query field container.
-
Drag Sale,Year to Across.
-
On the Home tab, in the Report group, click Row Totals.
The final report displays.
x
Procedure: How to Rearrange HOLD File Components
The
following procedure describes how to rearrange file components in
a HOLD file.
Note: This procedure creates a binary
HOLD file and a subquery to illustrate how to rearrange HOLD files.
It also shows the result of this rearrangement.
-
Create a new document, using the wf_retail_lite
Master File for the data source.
-
On the Insert tab, in the Reports group,
click Report. Populate the report with the
following fields from the Data pane:
- Gross Profit
- Quantity,Sold
- Revenue
- Product,Category
- Product,Subcategory
-
On the Home tab, in the Format group, click File to
create a HOLD file.
In the Temporary dialog box, enter a name for the file.
For example, File1_binary.
-
Click Save.
-
Create a report using the HOLD file, specifying Product,Category, Product,Subcategory,
and Quantity,Sold.
-
Next, using the following steps, add a subquery SQL script
for use as a filter on the first report.
-
On the Data tab, in the Data Source group,
click Switch.
Select the original master file (wf_retail_lite.mas).
-
Locate and double-click the Product,Category dimension field.
This creates a second report, which you can drag and resize
as needed on the Document canvas.
-
Create a filter on Product,Category, where the product
category is equal to Televisions.
-
With the new component selected, click the Home tab
and in the Format group, click File.
In the File name field, enter File2_subquery and select
the SQL Script (*.sql) format from the file types menu.
-
Click Save.
-
Rearrange the order of the HOLD files so that the File2_subquery
is positioned above the File1_binary HOLD file using the following
steps:
-
Right-click Files in
the Query pane and click Arrange Files, as
shown in the following image.
The Arrange Files
dialog box opens.
-
Using the Arrange Files dialog box that displays,
select File2_subquery and click Move Up to move the file
above File1_binary.
-
Click OK.
-
Edit the first report and create a filter using the subquery.
-
Click OK to exit the Create a
filtering condition dialog box.
Your report is refreshed to reflect the filtering you have applied.
x
FOCUS Format Index Fields
FOCUS is the only format that supports an index field.
The maximum number of fields to index is four. If the file format
is FOCUS, then Index appears on the Query pane.
xCreating a Subquery Filter Using a HOLD File
You can create a subquery using a HOLD file. A subquery
is a nested query that is added to the Where clause of an SQL statement.
A subquery is valuable because it is highly reusable.
x
Procedure: How to Create a Subquery Filter Using a HOLD File
This
procedure describes how to create a subquery filter using a HOLD
file created in the previous procedure.
-
Build a
report.
-
On the Data
tab, in the Filter group, click Filter.
The Filter dialog box opens.
-
In the Filter
dialog box, from the Type drop-down menu, select Subquery as
the filter type for the left-most part of the expression.
-
From the
Subquery drop-down menu, select In list as
the comparison operator.
-
From the
list of subqueries, select the subquery that was created (in this
example, File1) for the right-most part of the expression.
-
Click OK.
The report is filtered by the subquery that you created.
Note: To
view the SQL statements generated by the request, go to the Quick
Access Toolbar, open the Run drop-down menu, and select SQL Trace.