Tải bản đầy đủ (.pdf) (12 trang)

Printing a Pivot Table

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (284.82 KB, 12 trang )

223
CHAPTER 11
■ ■ ■
Printing a Pivot Table
O
ne of the strengths of pivot tables is the ability to change the layout and analyze data
from different perspectives. Sometimes, though, you want a static picture from the pivot
table and need to print the data. For the most part, pivot tables print the same as other
data on a worksheet, but there are a few special settings that you can apply to a pivot table.
Some printing issues, such as printing a copy of the pivot table for each item in the
page field, can be solved by programming, and examples are given in Chapter 13.
11.1. Repeating Pivot Table Headings
Problem
Your pivot table spans several printed pages, and the page, row and column headings
only print on the first page. You want the headings on every page so readers can under-
stand the report.
Solution
You can set an option for the pivot table to make the page, row, and column headings
appear on every sheet when you print the pivot table.
Before you turn on this option, clear any entries for row and column titles on the
worksheet:
1. On the Excel Worksheet menu, choose File ➤ Page Setup.
2. On the Sheet tab, under Print titles, clear the Rows to repeat at top and Columns
to repeat at left boxes.
3. Click OK to close the Page Setup dialog box.
6293ch11.qxd 2/1/06 2:34 PM Page 223
Figure 11-1. The pivot table print titles appear even when the print area is set for L1:M4.

Note
If either of these boxes contains an entry, the Set print titles option won’t be applied.
4. Right-click a cell in the pivot table, and choose Table Options.


5. Add a checkmark to Set print titles.

Note
Only one pivot table per worksheet can have the Set print titles option selected.
6. Click OK to close the PivotTable Options dialog box.

Tip
If you clear the Print titles settings in the Page Setup dialog box after turning on the Set print titles
option, you’ll have to turn the Set print titles option off, then turn it back on, for it to take effect.
How It Works
When the Set print titles option is selected, the page, row, and column headings for the
pivot table print on every page. If there are multiple pivot tables on the worksheet, or
other data, the pivot table headings will also print with those.
For example, you may have a pivot table in cells A1:F300, and a summary in cells
L1:M4, with the print area set for cells L1:M4. If Set print titles is selected for the pivot
table, the page and row fields headings that are in rows 1:4 will print at the top left of the
page, even though they’re not included in the print area (see Figure 11-1).
11.2. Setting the Print Area to Fit the Pivot Table
Problem
Your pivot table frequently changes size, and you have to reset the print area every time
you want to print it.
11.2

SETTING THE PRINT AREA TO FIT THE PIVOT TABLE224
6293ch11.qxd 2/1/06 2:34 PM Page 224
11.3

COMPACTING THE SPACE REQUIRED FOR ROW LABELS 225
Solution
Don’t set a print area on the sheet with the pivot table, and the entire pivot table will print,

no matter what its size, although it may span several sheets of paper. To remove an exist-
ing print area, on the Excel Worksheet menu choose File ➤ Print Area ➤ Clear Print Area.
If you’re setting a print area because there are other items on the sheet that you don’t
want to print, move those items to another sheet, if possible, so you can print the pivot
table separately. If the items must remain on the same sheet as the pivot table, use the
following technique to quickly set a print area that encompasses the entire pivot table.
Quickly Setting a Print Area for the Entire Pivot Table
1. Right-click a cell in the pivot table, and choose Select ➤ Entire Table.
2. From the Excel worksheet menu, choose File ➤ Print Area ➤ Set Print Area.

Tip
You can add a Set Print Area button to one of your toolbars by using the Tools ➤ Customize command.
11.3. Compacting the Space Required for Row Labels
Problem
There are several row fields in your pivot table, and when you print, the row field labels
fill the first page. You’d like to reduce the space required for the labels so it’s easier to read
the printed report.
Solution
With the pivot table in Outline layout, you can reduce the column width for many of the
row fields:
1. Double-click the field button for the outer row field.
2. Click the Layout button to open the PivotTable Field Layout dialog box.
3. Select the Show items in outline form option, and add a checkmark to Display
subtotals at top of group.
4. Click OK to close the PivotTable Field Layout dialog box.
6293ch11.qxd 2/1/06 2:34 PM Page 225
Figure 11-2. The column width is reduced with the pivot table in Outline layout.
5. Click OK to close the PivotTable Field dialog box.
6. Repeat Steps 1–5 for each remaining row field, except the innermost field.
7. At the top of the worksheet, select the columns for all the row fields that you

formatted.
8. Adjust the width of the selected columns so they show only a few characters.
9. At the left of the worksheet, select the row that contains the row field buttons.
10. In the Excel worksheet menu, choose Format ➤ Cells.
11. On the Alignment tab, change the Orientation to 90 degrees, and set the Horizon-
tal Text alignment to Center.
12. Click OK to close the Format Cells dialog box.
The pivot table row fields now require much less space, and the labels and data may
fit on the same printed page, as shown in Figure 11-2.
11.4

PRINTING THE PIVOT TABLE FOR EACH PAGE ITEM226
11.4. Printing the Pivot Table for Each Page Item
Problem
You need to give each salesperson a printed copy of the pivot table with their sales results
visible.
Solution
You can use the Show Pages feature to create a worksheet for each item in the Salesperson
page field:
6293ch11.qxd 2/1/06 2:34 PM Page 226
11.5

PRINTING FIELD ITEMS: STARTING EACH ITEM ON A NEW PAGE 227
1. On the PivotTable toolbar, choose PivotTable ➤ Show Pages.
2. If there are multiple page fields, the Show Pages dialog box will appear. Select the
Salesperson field, and click the OK button.
3. Select all the worksheets that were created, and print them.
4. After printing, you can delete the sheets that were created by the Show Pages
command, or close the workbook without saving the changes.
11.5. Printing Field Items: Starting Each Item on a New Page

Problem
Your pivot table has Customer and Product in the row area, and when you print your
pivot table, you want each customer’s data to start on a new page.
Solution
You can set the Customer field so each item starts on a new page:
1. Right-click the Customer field button, and choose Field Settings.
2. Click the Layout button, and add a checkmark to Insert page break after each
item.
3. Click OK to close the PivotTable Field Layout dialog box, and click OK to close the
PivotTable Field dialog box.

Tip
When starting each item on a new page, your pivot table may be easier to understand if you set the
pivot table print titles, as described in Section 11.1. This repeats the pivot table headings on each page, so
they’ll be visible with each customer’s data.
Notes
Depending on how you’ve formatted the pivot table, the bottom border may be missing
from each customer’s subtotal when you use the Insert page break after each item option
(see Figure 11-3).
6293ch11.qxd 2/1/06 2:34 PM Page 227

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×