[CLOSED] How to Name Worksheets in excel TOC reports?
Hi all, Is it possible to name worksheets depending on particular value of BY field which has been used to create Excel Tables of Contents Reports?This message has been edited. Last edited by: Kerry,
JG, That is ok.By doing BYTOC,it will generate the report with different worksheet with the name in data file.I want to give my own name to the worksheet for some values.Is it possible?
I posted a solution for this a few weeks a go. Do a search and you will find it.
February 18, 2009, 09:10 AM
Glenda
When I want to set my own tab titles, I loop through rather than using BYTOC.
Something like this maybe:
-SET &PASS = 0;
-REDO
-SET &PASS = &PASS + 1;
-IF &PASS = 6 GOTO NOMORE;
-SET &TabTitle = DECODE &PASS(1 ENG
- 2 JAP
- 3 ITY
- 4 WGM
- 5 FRA);
-SET &WHRC = DECODE &PASS(1 'WHERE COUNTRY EQ ''ENGLAND'''
- 2 'WHERE COUNTRY EQ ''JAPAN'''
- 3 'WHERE COUNTRY EQ ''ITALY'''
- 4 'WHERE COUNTRY EQ ''W GERMAN'''
- 5 'WHERE COUNTRY EQ ''FRANCE''');
-SET &HOLDER = DECODE &PASS(1 'ON TABLE PCHOLD FORMAT EXL2K OPEN'
- 5 'ON TABLE PCHOLD FORMAT EXL2K CLOSE'
- ELSE 'ON TABLE PCHOLD FORMAT EXL2K');
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
BODYTYPE
BY CAR NOPRINT
&WHRC.EVAL
&HOLDER.EVAL
ON TABLE SET STYLE *
TYPE=REPORT,
TITLETEXT='&TabTitle',
$
ENDSTYLE
END
-GOTO REDO
-NOMORE
-EXIT
Glenda
In FOCUS Since 1990 Production 8.2 Windows
February 20, 2009, 06:05 AM
Shankar
Hi Glenda, I do not have any fix number of values for the field for which different worksheet will be generated.So,it is not possible to use loop here.What I want is,suppose I have blank value for my BY field,In this case the records will be populated with blank tab.I just want to name the tab.Is it possible???