Focal Point
Excel multiple tabs with template file in WebFocus 7.6.x

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

January 16, 2008, 07:56 PM
Suntai
Excel multiple tabs with template file in WebFocus 7.6.x
Has anyone successfully been able to create a compound request with an Excel Template in WebFocus 7.6.x?

It works well in WebFocus 7.1.4 and 7.1.6 but doesn't work in 7.6.4 getting the following error message. Frowner

"Unknown error occurred.
Agent on reporting server EDASERVE may have crashed.
Please investigate reporting server log."


The code I'm using is like this:

=====================================================================================
APP HOLD SESSION
APP FI HOLD1 COMPXLSH.MHT

TABLE FILE CAR
HEADING
"Report 1: W Germany"
PRINT DCOST BY COUNTRY BY CAR
IF COUNTRY EQ 'W GERMANY'
ON TABLE HOLD AS HOLD1 FORMAT EXL2K TEMPLATE 'COMPXLS_SINGLE' SHEETNUMBER 1
END

TABLE FILE CAR
HEADING
"Report 2: England"
PRINT RCOST BY COUNTRY BY CAR BY MODEL
IF COUNTRY EQ ENGLAND
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'COMPXLSH' SHEETNUMBER 2
END
=======================================================================================

Any experience with this or input would be appreciated. Big Grin

Regards,

Suntai


Windows2003,
WebFocus714, WebFocus764
January 17, 2008, 09:49 AM
Dgraff
Without trying this completely since I cannot set up the template without an act of GOD. I was getting a similar mesg. that was related to of all things the WHere IF statement and the number of SINGLE (') that were either in the code or being generated by WebFocus. So please review especially if you are passing a varible that is tested in you example COUNTRY as &country.


Duane

WebFOCUS 8.0.7
DS 8.0.7 AS 8.0.7
Windows
Output: Excel, HTML, PDF, AHTML,Mobile
In Focus 1982
January 17, 2008, 10:07 AM
jgelona
First, the template names are not the same. Should the template name in the first fex be COMPXLSH?

Second, this is not really a compound request because you are not using the OPEN and CLOSE for compound report.

Third, at least in 7.1.3, it is documented that the use of excel templates with compound reports is not supported (see page 9-80 in the Creating Reports Manual).


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
January 17, 2008, 07:27 PM
Suntai
Thanks Dgraff and jgelona for kind reply~!

I think jgelona is right that excel templates with compound reports is not supported in WF7.1.3.
It works pretty well in WF7.1.4 and you can see more detail about this function in http://fire2007.org/resources/EXL2K_Templates_FI
RE2007.ppt

Here is another more simple code that I used.
This also works well in 7.1.4 but results same error message like this
"Unknown error occurred. Agent on reporting server EDASERVE may have crashed. Please investigate reporting server log."


--------------------------------------------------------------------------------------------------

SET HOLDLIST = PRINTONLY

APP FI HOLD1 DISK D:\FLEXS\MHTHOLD1.MHT


TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
BODYTYPE
RETAIL_COST
DEALER_COST
COMPUTE MARGIN/D5.2 = (RETAIL_COST - DEALER_COST) / DEALER_COST;
ON TABLE HOLD AS HOLD1 FORMAT EXL2K TEMPLATE 'CARTEMP' SHEETNUMBER 2
END
-RUN


TABLE FILE CAR
PRINT
COUNTRY
COMPUTE COUNTRY_C/A30 = IF COUNTRY EQ 'ENGLAND' THEN 'UK'
ELSE IF COUNTRY EQ 'JAPAN' THEN 'JP'
ELSE IF COUNTRY EQ 'ITALY' THEN 'IT'
ELSE IF COUNTRY EQ 'W GERMANY' THEN 'GR'
ELSE IF COUNTRY EQ 'KOREA' THEN 'KR'
ELSE 'ETC';
COMPUTE IMSI/A10 = 'SHEET3'; AS 'SHEET NO'
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'MHTHOLD1' SHEETNUMBER 3
END
-RUN
-EXIT
-------------------------------------------------------------------------------------------

This code is running on Windows2003/ WF764z(or WF714) /Office2003


Any assistance you can provide is so much appreciated!


Windows2003,
WebFocus714, WebFocus764
January 18, 2008, 02:35 AM
Tony A
Suntai,

There are many unknown reasons for agent crashes and they are the most awful problems to trace. You could turn on the servlet tracing on the Client server to get a good trace. However, whether you could understand the output I can't say. I have had a little success in determining problems from this sort of trace file but each case is different and I would advise that you raise a case on this problem with IB and have these trace files to hand for when they request them.

Just to ensure that it is not anything else you have going on, a few questions -

1) Does your Reporting Server have a folder on the D: drive called FLEXS?
2) Do you really need to permanently save the MHTHOLD1.MHT file?

If the answer to 1) is yes, then that's OK, but 2) becomes pertanent.
If the answer to 1) is no, then sort that problem out with regard to the answer to 2).

If the answer to 2) (as I suspect it should) is no, then remove the path detail from your FILEDEF so that the file becomes a temporary file defined within the temporary agent folder in EDATEMP. This way the file is discarded when the procedure ends.

Good luck

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 
January 21, 2008, 11:22 AM
EWoerle
Whenever I've done compound reports I've done them like this:

APP FI COMPXLSH DISK compxlsh.mht

ON TABLE HOLD AS COMPXLSH FORMAT EXL2K TEMPLATE 'mhtholdfile' SHEETNUMBER 1

I've found that the the upper and lowercase are very important.

A couple things to note, you are always holding as the file you just declared in the APP FI command and the template is whatever your previous APP FI command was.


Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
January 21, 2008, 08:28 PM
Suntai
Thanks you Tony A and EWoerle Big Grin

I checked and changed original source as you suggested like this (change the folder and to lowercase).
But it still result the same error in WF7.6.4 and work well in WF7.1.4

If I solve this problem, I'll post solution about this stuff.


-----------------------------------------
SET HOLDLIST = PRINTONLY

APP FI HOLD1 DISK MHTHOLD1.MHT


TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
BODYTYPE
RETAIL_COST
DEALER_COST
COMPUTE MARGIN/D5.2 = (RETAIL_COST - DEALER_COST) / DEALER_COST;
ON TABLE HOLD AS HOLD1 FORMAT EXL2K TEMPLATE 'cartemp' SHEETNUMBER 2
END
-RUN

TABLE FILE CAR
PRINT
COUNTRY
COMPUTE COUNTRY_C/A30 = IF COUNTRY EQ 'ENGLAND' THEN 'UK'
ELSE IF COUNTRY EQ 'JAPAN' THEN 'JP'
ELSE IF COUNTRY EQ 'ITALY' THEN 'IT'
ELSE IF COUNTRY EQ 'W GERMANY' THEN 'GR'
ELSE IF COUNTRY EQ 'KOREA' THEN 'KR'
ELSE 'ETC';
COMPUTE IMSI/A10 = 'SHEET3'; AS 'SHEET NO'
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'MHTHOLD1' SHEETNUMBER 3
END
-RUN
-EXIT


Windows2003,
WebFocus714, WebFocus764