February 11, 2006, 09:14 AM
<JG>Prarie,
As you are a 5.35 site, using the compound report syntax for EXL2K should deliver what you want.
However to expand on the not so helpful hottrack solution that you found.
MOD or APPEND works to create a single output file to the destination dataset,
The problem is, for EXL2K output the format is actually extended html.
WebFocus correctly generates the output to a single file however Microsoft Excel cannot read what is delivered.
The reason is that WebFocus generates a single file with 2 complete documents in the 1 file and Excel reads the first and then stops.
Using more gives you a single output from two sources with exactly the same format.
It is very definitely NOT 2 different excel reports in the same document.
If you want to have multiple EXl2K Reports in the same sheet (pre EXL2K compound functionality) you must manipulate the output files to give you a single document with multiple HTML tables. (use a variation on my posting about Macro's in pre 7.1.
sample code is as follows.
FILEDEF EXCEL DISK EXCEL.MAS
-RUN
-*
-* write your dummy master to allow Focus to read the .XHT file as input
-*
-WRITE EXCEL FILE=EXCEL ,SUFFIX=FIX
-WRITE EXCEL SEGNAME=EXCEL ,SEGTYPE=S0
-WRITE EXCEL FIELDNAME =DATALINE ,E01 ,A256 ,A256 ,$
-RUN
TABLE FILE CAR
"Report 1"
PRINT MODEL
ON TABLE HOLD AS X FORMAT EXL2K
END
-RUN
TABLE FILE CAR
" "
"Report 2"
PRINT MODEL
BY COUNTRY
ON TABLE HOLD AS Y FORMAT EXL2K
END
-RUN
FILEDEF Z DISK c:\ibi\apps\focalpoint\excelappend.xls (APPEND
FILEDEF EXCEL DISK x.xht
-RUN
DEFINE FILE EXCEL
WANTED/A1= IF EDIT(DATALINE,'9999999') EQ '</BODY>' THEN 'N'
ELSE IF LAST WANTED EQ 'N' THEN 'N' ELSE 'Y';
END
TABLEF FILE EXCEL
PRINT DATALINE
WHERE WANTED EQ 'Y';
ON TABLE SAVE AS Z FORMAT ALPHA
END
-RUN
FILEDEF EXCEL DISK y.xht
-RUN
DEFINE FILE EXCEL
WANTED/A1= IF EDIT(DATALINE,'9999999') EQ '<TABLE' THEN 'Y'
ELSE IF LAST WANTED EQ 'Y' THEN 'Y' ELSE 'N';
END
TABLEF FILE EXCEL
PRINT DATALINE
WHERE WANTED EQ 'Y';
ON TABLE SAVE AS Z FORMAT ALPHA
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>EXCEL2K Compound </title>
</head>
<frameset rows="*">
<frame name="EXCEL2K" src="http://192.168.1.3:9080/approot/focalpoint/excelappend.xls" scrolling="auto" >
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
-HTMLFORM END
As I mentioned in the original posting this requires a permanent storage location that can be accessed by the webserver and so will need management.
JG
February 13, 2006, 09:36 AM
PrarieThanks JG...this looks good. No problem on the permanent place.