Javier,Brad, Emmitt: It is not as easy as it sounds.
With all due respect (and certainly no intent to minimize the complexity to which you refer), I'd like to suggest that you expand your thinking with respect to the use of a temporary table. Since it is up to you, the system architect, to design the temporary table to suit your needs, you can put any number of columns in place that may or may not contain data, conditional as you suggest. These columns could even contain data that you wish to place in headers and footers. When the report writer retrieves the first row of a new section, extra columns could contain information for the header; likewise, the last row for a section could contain data for the footer.
You can even do conditional labels in headers - test whether a field contains data or is null, and if not null print the label otherwise print a space. Or print two different labels conditional on the content of a column on the temporary table. Or, to simplify that logic, put the labels in the columns on the temporary table and place fields on the report instead of labels.
It may even be possible, though I have not tried it, to use similar techniques to create your 'report within a report.' Simply ask whether one of these reports could be created fully within a report header or a report footer by populating columns on the first or last row of a temporary table.
With PAGEMODE you have a blank piece of paper and you are in control of what goes where. Look at your Windows report based on a temporary table the same way, and determine what you need to add to the temporary table to accomplish your goals. You are in control.
There are many different ways to skin this particular cat. I have used PAGEMODE extensively in DOS, and I'm always looking for the easy way to convert to Windows in order to take advantage of the fonts and formatting available in Windows. Often that is to use the techniques I've discussed instead of trying to reinvent the wheel in Windows.
Emmitt Dove
Manager, DairyPak Business Systems
Blue Ridge Paper Products, Inc.
40 Lindeman Drive
Trumbull, CT 06611
(203) 673-2231
[EMAIL PROTECTED]
[EMAIL PROTECTED]

