August 08, 2007, 11:03 AM
<Navin>But Prarie,
Is that not possible to fill a specified cell without using a template.
or even using a template , how can i fill a particular cell. Webfocus starts printing the data right from the starting cell "A1" . So in that case how can i make that to fill a specified cell.
August 08, 2007, 11:39 AM
Tony ANaveen,
The same way as many a hunter would shoot a bear behind a tree, ricochet the arrow off of another tree!!
Basically you cannot reference a cell directly within an Excel worksheet at the time the WF report runs because there is no Excel sheet until the report content has been built.
You could use FRL to effect a solution or you could use a sledge hammer and the McGyver technique -
APP FI MCGYVER DISK MCGYVER.MAS (LRECL 80
-RUN
-WRITE MCGYVER
-WRITE MCGYVER FILE=MCGYVER,SUFFIX=FOC
-WRITE MCGYVER SEGNAME=SEG1
-WRITE MCGYVER FIELD=MCGYVER_KEY, ,A1 ,A1 ,FIELDTYPE=I, $
-WRITE MCGYVER FIELD=SEQUENCE, ,A3 ,A3 ,$
-RUN
CREATE FILE MCGYVER
MODIFY FILE MCGYVER
FIXFORM MCGYVER_KEY/A1 SEQUENCE/A3
DATA
001
002
003
004
005
006
007
008
009
010
011
012
END
-RUN
JOIN MCGYVER_KEY WITH COUNTRY IN CAR TO MULTIPLE MCGYVER_KEY IN MCGYVER AS J1
DEFINE FILE CAR
MCGYVER_KEY/A1 WITH COUNTRY = ' ';
SPC/A1 = ' ';
CELL_VALUE/A10 MISSING ON = IF SEQUENCE EQ '012' THEN COUNTRY ELSE MISSING;
END
TABLE FILE CAR
SUM SPC AS ''
CELL_VALUE AS ''
BY SEQUENCE NOPRINT
BY SPC AS ''
ON TABLE PCHOLD FORMAT EXL2K
END
-RUN
Will place FRANCE in cell C12.
T