Focal Point
[CLOSED] BYTOC and PAGE-BREAK

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3237059595

December 27, 2010, 05:48 AM
Ramkumar - Webfous
[CLOSED] BYTOC and PAGE-BREAK
Hi..

SET COMPOUND=BYTOC
TABLE FILE CAR
PRINT
RETAIL_COST
BY COUNTRY
BY CAR
ON CAR PAGE-BREAK
HEADING
"Hi Car... "
ON TABLE PCHOLD FORMAT EXL2K
END

As I know, BYTOC will give us seperate worksheets based on the Very first BY field.

My Requirment is Like I need to do a BYTOC based on the First BY field and a Page Break to display the Header and Footer based on Second BY field.

I wrote the code the above way. But New worksheets are created based on both the BY values...



Is there a way to resolve this ? ? ?

This message has been edited. Last edited by: Kerry,


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
December 27, 2010, 04:32 PM
j.gross
SET COMPOUND=BYTOC

TABLE FILE CAR
PRINT
RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD
END

TABLEF FILE HOLD
PRINT
RETAIL_COST
BY CAR SUBTOTAL
BY MODEL
HEADING
"Car...<COUNTRY> <CAR> "
ON TABLE PCHOLD FORMAT EXL2K
END

December 28, 2010, 02:25 AM
Ramkumar - Webfous
Hi Gross,

Thank you for the reply. But my neeed is that I need to do BYTOC based on the first BY field and PAGE-BREAK based on the second BY field. Page break should happen in every worksheet.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
December 28, 2010, 05:11 AM
atturhari
I dont think "PAGE-BREAK" is applicable to an Excel report.

You can place the column titles in SUBHEAD along with HEADING.

-Hari
WF-769


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
December 28, 2010, 07:31 AM
<JG>
Hari is correct.

A page break has no meaning in Excel except from the point of view of printed output.

You can only have 1 level of BYTOC in an Excel output document.

If what you mean by a PAGE-BREAK is each car must appear on a seperate tab then you need to
create an artificial 1st level sort using the NOPRINT option

 
SET COMPOUND=BYTOC
DEFINE FILE CAR
-* Note you can define the field as any length you like but Excel will only use the 1st 31 characters
-* for the tab name (Excel limit) may be an issue because tab names must be unique.
PAGESORT/A50= COUNTRY || ' ' | CAR ;
END
TABLE FILE CAR
PRINT
RETAIL_COST
BY PAGESORT NOPRINT
BY COUNTRY
BY CAR
HEADING
"Hi Car... "
ON TABLE PCHOLD FORMAT EXL2K
END 


If you mean each countries cars must be on the same tab but with a seperating header
use SUBHEAD as suggested by Hari.