Focal Point
[CLOSED] FILEDEF and compound reports

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

March 25, 2013, 03:46 PM
Malinda
[CLOSED] FILEDEF and compound reports
I have a file that I am trying to output to our ftp server using the filedef command. The report is setup to be a compound excel report. The process runs fine and places the file on the ftp server but when I try to open the file it gives me an error. If I output it as a csv, it opens a jibberish code as it doesn't know where one part of the report stops and the other starts. When I try to save the report as a .xlsx file and open it, I get a "file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file". I am creating it with the following commands:

-SET &XPATH = 'D:\\FOCUS\SC\CSC\IR\OUT\';
-SET &XTERM = EDIT(&EXP_GRAD_TERM,'$9999');
-SET &FILE_NM = &XPATH || &XTERM || '_' || '&AREA_WORDS.EVAL' || '_IVYDAY.XLSX';
FILEDEF IVYDAY DISK &FILE_NM
TABLE FILE
......
ON TABLE HOLD AS IVYDAY FORMAT EXL2K OPEN
END
TABLE FILE
.....
ON TABLE HOLD AS IVYDAY FORMAT EXL2K BYTOC 3
END

How can I get it to run and save out on the ftp server and create the compound report and still be able to open it. The report runs fine without the filedef command to place it on the ftp server.

Malinda Linegar
CSC

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
March 25, 2013, 05:21 PM
Prarie
Are you getting an error? Do other reports FTP to this server? Does WebFocus have permissions?
March 25, 2013, 06:16 PM
Malinda
I don't get an error when running the report and placing it on the ftp server. That part worked just fine. It is when I move the file onto my desktop and try to open it.

I did find out that it will work if my extension is a .xls with the FORMAT EXL2K.

Yes, other reports ftp to this server - WF does have permission.

Malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
March 25, 2013, 06:22 PM
Tony A
Sounds to me like you need to understand your extensions and how windows would attempt to open them.

.xls extension is MS Excel 2000 whereas .xlsx is MS Excel 2007 and upwards.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 26, 2013, 09:19 AM
jgelona
Malinda, .xlsx files are really .zip files. Take a real .xlsx, rename to a .zip and unzip it and look at what you get.

The reason you got gibberish is:
1. 7.6.11 does not understand or support Office 2007/2010 extensions;
2. When you said '...FORMAT EXL2K' that is building a .xls format file regardless of the file extension. You could have given the file an extension of .txt and it would still be an .xls format file;
3. Since the file had a .xlsx extension, EXCEL tried to unzip the file which it could not do since it was not a .zip file.
4. That is why when you renamed the file to .xls, it worked.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.