As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Something funny going on with Compound Reports in v7.6.5.
The code below is a simplified version of a complex program. As is usual with almost every report I have written in the last few years, the code handles Excel 2000, PDF and HTML versions of the report. When it is a Compound report, I use SET COMPOUND = OPEN and SET COMPOUND = CLOSE - I leave these commands even when the report is run for HTML output.
In v5.3.4, the code worked and the two individual HTMTABLE report HOLD files were correctly created and the !IBI.FIL.output-file-name; command worked.
In v7.6.5, the second HTMTABLE report HOLD file does not get created, even though no error is displayed until the !IBI.FIL.output-file-name; does not find the file. If I leave the SET COMPOUND = OPEN and SET COMPOUND = CLOSE out, the report works.
I always thought that the SET COMPOUND statements were ignored when output is HTMTABLE. If this behaviour has changed, I have dozens of compound reports to modify - I will have to add Dialogue Manager code to comment the SET COMPOUND statements when HTML is selected as the output type.
-SET &ECHO = 'ALL';
SET MSG = ON
-RUN
-SET &OUTPUT = 'H';
SET COMPOUND = OPEN
-RUN
-SET &OUTFIL_NAME = 'OUTPUT11';
-SET &OUT_TYPE = DECODE &OUTPUT (
- 'P' 'ON TABLE PCHOLD FORMAT PDF'
- 'E' 'ON TABLE PCHOLD FORMAT EXL2K'
- ELSE 'ON TABLE HOLD AS &OUTFIL_NAME.EVAL FORMAT HTMTABLE');
TABLE FILE CAR
SUM
SALES/D20S AS ''
BY COUNTRY
BY CAR
BY MODEL
ACROSS BODYTYPE AS ''
&OUT_TYPE
END
-RUN
SET COMPOUND = CLOSE
-RUN
-SET &OUTFIL_NAME = 'OUTPUT21';
-SET &OUT_TYPE = DECODE &OUTPUT (
- 'P' 'ON TABLE PCHOLD FORMAT PDF'
- 'E' 'ON TABLE PCHOLD FORMAT EXL2K'
- ELSE 'ON TABLE HOLD AS &OUTFIL_NAME.EVAL FORMAT HTMTABLE');
TABLE FILE CAR
SUM
SALES/D20S AS ''
BY CAR
BY MODEL
ACROSS COUNTRY AS ''
&OUT_TYPE
END
-RUN
-IF &OUTPUT EQ 'H' GOTO OUTPUT_H;
-EXIT
-OUTPUT_H
-HTMLFORM BEGIN
<HTML>
<HEAD>
<TITLE>WebFOCUS Report Viewer</TITLE>
</HEAD>
<BODY>
!IBI.FIL.OUTPUT11;
<BR>!IBI.FIL.OUTPUT21;
<BR>!IBI.FIL.OUTPUT31;
</BODY>
</HTML>
-HTMLFORM END
-EXIT
12:37 - I revised the code to enable testing for Excel 2000, PDF and HTML outputs.This message has been edited. Last edited by: Francis Mariani,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
-HTMLFORM BEGIN (FOC36225) UNABLE TO OPEN FILE OUTPUT21 SPECIFIED BY WEBFOCUS TABLE (FOC36225) UNABLE TO OPEN FILE OUTPUT31 SPECIFIED BY WEBFOCUS TABLE -HTMLFORM END
When I run your code, this is what I see in the View Source but it doesn't make sense. I got it to work once but not as coded and can't recreate. Have been busy crashing agents while re-arranging your code.
I should have supplied the result of the "View Source".
I expect and get the error in both v5.3.4 and v7.6.5 for output file OUTPUT31 because it is not created in the program
(FOC36225) UNABLE TO OPEN FILE OUTPUT31 SPECIFIED BY WEBFOCUS TABLE
but I get the error for output file OUTPUT21 only in v7.6.5.
(FOC36225) UNABLE TO OPEN FILE OUTPUT21 SPECIFIED BY WEBFOCUS TABLE
SET MSG = ON
-RUN
-SET &OUTPUT = 'H';
SET COMPOUND = OPEN
-RUN
-SET &OUTFIL_NAME = 'OUTPUT11';
-SET &OUT_TYPE = DECODE H (
- 'P' 'ON TABLE PCHOLD FORMAT PDF'
- 'E' 'ON TABLE PCHOLD FORMAT EXL2K'
- ELSE 'ON TABLE HOLD AS OUTPUT11 FORMAT HTMTABLE');
TABLE FILE CAR
SUM
SALES/D20S AS ''
BY COUNTRY
BY CAR
BY MODEL
ACROSS BODYTYPE AS ''
ON TABLE HOLD AS OUTPUT11 FORMAT HTMTABLE
END
-RUN
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18
0 HTML FILE SAVED ...
SET COMPOUND = CLOSE
-RUN
-SET &OUTFIL_NAME = 'OUTPUT21';
-SET &OUT_TYPE = DECODE H (
- 'P' 'ON TABLE PCHOLD FORMAT PDF'
- 'E' 'ON TABLE PCHOLD FORMAT EXL2K'
- ELSE 'ON TABLE HOLD AS OUTPUT21 FORMAT HTMTABLE');
TABLE FILE CAR
SUM
SALES/D20S AS ''
BY CAR
BY MODEL
ACROSS COUNTRY AS ''
ON TABLE HOLD AS OUTPUT21 FORMAT HTMTABLE
END
-RUN
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18
0 HTML FILE SAVED ...
-IF H EQ 'H' GOTO OUTPUT_H;
-OUTPUT_H
-HTMLFORM BEGIN
(FOC36225) UNABLE TO OPEN FILE OUTPUT21 SPECIFIED BY WEBFOCUS TABLE
(FOC36225) UNABLE TO OPEN FILE OUTPUT31 SPECIFIED BY WEBFOCUS TABLE
-EXIT
-HTMLFORM END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
The workaround for this problem is below. I wonder if this is a bug or a new behaviour.
I will have to modify dozens of programs to make them work.
-SET &ECHO = 'ALL';
SET MSG = ON
-RUN
-SET &OUTPUT = 'H';
-SET &COMPOUND_CM = IF &OUTPUT = 'H' THEN '-* ' ELSE '';
&COMPOUND_CM.EVAL SET COMPOUND = OPEN
-RUN
-SET &OUTFIL_NAME = 'OUTPUT11';
-SET &OUT_TYPE = DECODE &OUTPUT (
- 'P' 'ON TABLE PCHOLD FORMAT PDF'
- 'E' 'ON TABLE PCHOLD FORMAT EXL2K'
- ELSE 'ON TABLE HOLD AS &OUTFIL_NAME.EVAL FORMAT HTMTABLE');
TABLE FILE CAR
SUM
SALES/D20S AS ''
BY COUNTRY
BY CAR
BY MODEL
ACROSS BODYTYPE AS ''
&OUT_TYPE
END
-RUN
&COMPOUND_CM.EVAL SET COMPOUND = CLOSE
-RUN
-SET &OUTFIL_NAME = 'OUTPUT21';
-SET &OUT_TYPE = DECODE &OUTPUT (
- 'P' 'ON TABLE PCHOLD FORMAT PDF'
- 'E' 'ON TABLE PCHOLD FORMAT EXL2K'
- ELSE 'ON TABLE HOLD AS &OUTFIL_NAME.EVAL FORMAT HTMTABLE');
TABLE FILE CAR
SUM
SALES/D20S AS ''
BY CAR
BY MODEL
ACROSS COUNTRY AS ''
&OUT_TYPE
END
-RUN
-IF &OUTPUT EQ 'H' GOTO OUTPUT_H;
-EXIT
-OUTPUT_H
-HTMLFORM BEGIN
<HTML>
<HEAD>
<TITLE>WebFOCUS Report Viewer</TITLE>
</HEAD>
<BODY>
!IBI.FIL.OUTPUT11;
<BR>!IBI.FIL.OUTPUT21;
<BR>!IBI.FIL.OUTPUT31;
</BODY>
</HTML>
-HTMLFORM END
-EXIT
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
According to Tech Support, this is a "behavior change":
quote:
I ran the fex in DEVSTUDIO. It performed as you stated. When I went back to research the problem, I found prior cases where it was determined that this issue is a behavior change not a bug. The FOC36225 error was send to programming. I will associate your case to that case. You will be notified when/if a fix is created.
I have asked for an explanation of this behaviour change. Meanwhile I have to modify dozens of programs to fix this behaviour change.
All my programs are written so that they can be run as HTML, PDF and Excel 2000 reports, based on the output format parameter passed from the launch screen. All the code runs exactly the same way for the three different output formats, except for the style-sheet. If they are Compound reports, the COMPOUND commands are executed, even for HTML output - this all works correctly in v5.3.4, now it fails for HTML in v7.6.5 (
I would like to know what other developers do? How do you develop a Compound report that may be run in different formats? Do you bypass the COMPOUND statements when HTML is selected?
Thanks,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Bypassing the HTML sounds reasonable and not too nasty. You could just make the entire SET COMPOUND = ... statement a DM variable - I do that stuff all the time and it works pretty well - thank god for DM.
WebFOCUS 7.6.6/TomCat/Win2003,SQL Server 2005,Oracle
Posts: 125 | Location: New England | Registered: February 20, 2007