Focal Point
Is there a way to get WebFOCUS to generate various reports.
June 12, 2006, 05:54 PM
Adolf MergulhaoIs there a way to get WebFOCUS to generate various reports.
TABLE FILE RFIFLTREC
PRINT FR_OOS_DUR
FR_CLOSE_DATE
FR_CLRCAT
GROUP_NAME
WHERE CR_STATUS EQ 'W' OR
CR_STATUS EQ 'C' AND CR_COMP_DATE GE '&PREVYYMD'
WHERE FR_CLOSE_DATE GE '&SELFROM' AND FR_CLOSE_DATE LT '&SELTO'
WHERE FR_INT_NAT EQ 'I'
WHERE GROUP_NAME EQ 'CNS'
ON TABLE HOLD AS 'CNS REPORT1' FORMAT HTML
END
I have a table that contains all the GROUP_NAME that I need the above report to run. Is that any way to get FOCUS to read the group name from a different file and then save the output as the GROUP_NAME followed by REPORT 1
Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 12, 2006, 06:09 PM
susannahyou bet.
TABLE FILE RFIFLTREC
BY GROUP_NAME
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS MYLIST FORMAT ALPHA
END
-RUN
-top.loop
-READ MYLIST NOCLOSE &MYGROUP.A3
-IF &IORETURN NE 0 GOTO end.loop ;
-* FILEDEF OUTPUT DISK &MYGROUP|REPORT_1.HTM
TABLE FILE RFIFLTREC
...stuff
WHERE GROUP_NAME IS '&MYGROUP'
ON TABLE HOLD AS &MYGROUP|REPORT_1 FORMAT HTMTABLE
END
-RUN
-GOTO top.loop ;
-end.loop
-CLOSE MYLIST
-RUN
-HTMLFORM BEGIN
now you can loop thru your list again to dump out the reports...
-HTMLFORM END
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
June 13, 2006, 01:17 AM
Adolf MergulhaoThank I will try it
Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 13, 2006, 01:40 AM
Adolf MergulhaoI am getting the following error
0 NUMBER OF RECORDS IN TABLE= 2 LINES= 2
(FOC261) EXPRESSION IS INCOMPLETE BECAUSE AN OPERATION IS MISSING
This is the coding
TABLE FILE RFICDREC
BY GROUP_NAME
WHERE GROUP_NAME EQ 'REUTERS' OR 'CNS (ATT OSS+)'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS GROUPNAME FORMAT ALPHA
END
-RUN
-top.loop
-READ GROUPNAME NOCLOSE &GROUPNAME.A3
-IF &IORETURN NE 0 GOTO end.loop
-FILEDEF OUTPUT DISK &GROUPNAME|REPORT_1.HTM
JOIN LEFT_OUTER CR_TERM_1 IN rficctrec TO EC_RECNO IN rfiectab AS J2
JOIN LEFT_OUTER CR_TERM_2 IN rficctrec TO EC_RECNO IN rfiectab AS J3
JOIN CR_ACCT_NBR IN rficctrec TO CD_ACC_NBR IN rficdrec AS J4
SET ORIENTATION = PORTRAIT
SET PAGESIZE = A4
SET SQUEEZE = ON
DEFINE FILE RFICCTREC ADD
CR_DETAIL/A92=J2EC_TOWN || '-' || J3EC_TOWN || '-' || CR_SERIAL;
CCT_TYPE/A8=DECODE CR_DIGITAL( Y Digital N Analogue ELSE Other );
INTLNAT/A13=DECODE CR_INT_NAT( I International N National ELSE Other );
STATUS/A6=DECODE CR_STATUS( W Active C Cease ELSE Other );
FLAG/A8=DECODE CR_DIGITAL( Y Digital ELSE Analogue );
END
TABLE FILE RFICCTREC
PRINT
CR_DETAIL AS 'Circuit Designation Detail'
CR_A_COUNTRY AS 'A End Country'
ON CD_NAME SUBHEAD
"1 Accout Name :
HEADING
" "
"*** In Commercial Confidence ***"
"Customer Group Name<+0> <" List of <+0>International <+0>Private Circuits "
"Page<+0> of<+0> (Program ECRPT0001)"
FOOTING
"*** In Commercial Confidence ***"
"This report was complied on <+0>&DATEtrMDYY <+0> "
"End of this page"
WHERE ( CR_A_COUNTRY NE 'U.K.' ) AND ( CR_INT_NAT EQ 'I' );
WHERE GROUP_NAME EQ '&GROUPNAME';
WHERE ( CR_STATUS EQ 'W' ) OR ( CR_STATUS EQ 'C' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
END
-RUN
-GOTO top.loop;
-end.loop
-CLOSE GROUPNMAE
-RUN
-HTMLFORM
-HTMLRORM END
Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 13, 2006, 01:44 AM
Adolf MergulhaoSorry there we some typo in the previous message.
Still getting same error message
TABLE FILE RFICDREC
BY GROUP_NAME
WHERE GROUP_NAME EQ 'REUTERS' OR 'CNS (ATT OSS+)'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS GROUPNAME FORMAT ALPHA
END
-RUN
-top.loop
-READ GROUPNAME NOCLOSE &GROUPNAME.A3
-IF &IORETURN NE 0 GOTO end.loop
-* FILEDEF OUTPUT DISK &GROUPNAME|REPORT_1.HTM
JOIN LEFT_OUTER CR_TERM_1 IN rficctrec TO EC_RECNO IN rfiectab AS J2
JOIN LEFT_OUTER CR_TERM_2 IN rficctrec TO EC_RECNO IN rfiectab AS J3
JOIN CR_ACCT_NBR IN rficctrec TO CD_ACC_NBR IN rficdrec AS J4
SET ORIENTATION = PORTRAIT
SET PAGESIZE = A4
SET SQUEEZE = ON
DEFINE FILE RFICCTREC ADD
CR_DETAIL/A92=J2EC_TOWN || '-' || J3EC_TOWN || '-' || CR_SERIAL;
CCT_TYPE/A8=DECODE CR_DIGITAL( Y Digital N Analogue ELSE Other );
INTLNAT/A13=DECODE CR_INT_NAT( I International N National ELSE Other );
STATUS/A6=DECODE CR_STATUS( W Active C Cease ELSE Other );
FLAG/A8=DECODE CR_DIGITAL( Y Digital ELSE Analogue );
END
TABLE FILE RFICCTREC
PRINT
CR_DETAIL AS 'Circuit Designation Detail'
CR_A_COUNTRY AS 'A End Country'
ON CD_NAME SUBHEAD
"1 Accout Name :
HEADING
" "
"*** In Commercial Confidence ***"
"Customer Group Name<+0> <" List of <+0>International <+0>Private Circuits "
"Page<+0> of<+0> (Program ECRPT0001)"
FOOTING
"*** In Commercial Confidence ***"
"This report was complied on <+0>&DATEtrMDYY <+0> "
"End of this page"
WHERE ( CR_A_COUNTRY NE 'U.K.' ) AND ( CR_INT_NAT EQ 'I' );
WHERE GROUP_NAME EQ '&GROUPNAME';
WHERE ( CR_STATUS EQ 'W' ) OR ( CR_STATUS EQ 'C' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS &GROUPNAME|REPORT_1 FORMAT HTMTABLE
END
-RUN
-GOTO top.loop;
-end.loop
-CLOSE GROUPNAME
-RUN
-HTMLFORM
-HTMLRORM END
Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 13, 2006, 01:52 AM
Adolf MergulhaoGetting this error message using Developer studio version 7.1.4
0 NUMBER OF RECORDS IN TABLE= 2 LINES= 2
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0
(FOC36233) -HTMLFORM IS NOT SUPPORTED IN CURRENT MODE.
The code
TABLE FILE RFICDREC
BY GROUP_NAME
WHERE GROUP_NAME EQ 'REUTERS' OR 'CNS (ATT OSS+)'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS GROUPNAME FORMAT ALPHA
END
-RUN
-top.loop
-READ GROUPNAME NOCLOSE &GROUPNAME.A3
-IF &IORETURN NE 0 GOTO end.loop
FILEDEF OUTPUT DISK &GROUPNAME|REPORT_1.HTM
JOIN LEFT_OUTER CR_TERM_1 IN rficctrec TO EC_RECNO IN rfiectab AS J2
JOIN LEFT_OUTER CR_TERM_2 IN rficctrec TO EC_RECNO IN rfiectab AS J3
JOIN CR_ACCT_NBR IN rficctrec TO CD_ACC_NBR IN rficdrec AS J4
SET ORIENTATION = PORTRAIT
SET PAGESIZE = A4
SET SQUEEZE = ON
DEFINE FILE RFICCTREC ADD
CR_DETAIL/A92=J2EC_TOWN || '-' || J3EC_TOWN || '-' || CR_SERIAL;
CCT_TYPE/A8=DECODE CR_DIGITAL( Y Digital N Analogue ELSE Other );
INTLNAT/A13=DECODE CR_INT_NAT( I International N National ELSE Other );
STATUS/A6=DECODE CR_STATUS( W Active C Cease ELSE Other );
FLAG/A8=DECODE CR_DIGITAL( Y Digital ELSE Analogue );
END
TABLE FILE RFICCTREC
PRINT
CR_DETAIL AS 'Circuit Designation Detail'
CR_A_COUNTRY AS 'A End Country'
HEADING
" "
"*** In Commercial Confidence ***"
"Customer Group Name<+0> <
" List of <+0>International <+0>Private Circuits "
"Page<+0> of<+0> (Program ECRPT0001)"
FOOTING
"*** In Commercial Confidence ***"
"This report was complied on <+0>&DATEtrMDYY <+0> "
"End of this page"
WHERE ( CR_A_COUNTRY NE 'U.K.' ) AND ( CR_INT_NAT EQ 'I' );
WHERE GROUP_NAME EQ '&GROUPNAME';
WHERE ( CR_STATUS EQ 'W' ) OR ( CR_STATUS EQ 'C' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS &GROUPNAME|REPORT_1 FORMAT HTMTABLE
END
-RUN
-GOTO top.loop;
-end.loop
-CLOSE GROUPNAME
-HTMLFORM BEGIN
-HTMLFORM END
Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 13, 2006, 02:41 AM
Adolf MergulhaoThis works i.e it produces 2 html files on the screen. The -HTMLFORM BEGIN and HTMLFORM END dosen't work
TABLE FILE RFICDREC
BY GROUP_NAME
WHERE GROUP_NAME EQ 'INFONET' OR 'REUTERS'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS GROUPNAME FORMAT ALPHA
END
-RUN
-top.loop
-READ GROUPNAME NOCLOSE &GROUPNAME.A30
-IF &IORETURN NE 0 GOTO end.loop
FILEDEF OUTPUT DISK &GROUPNAME
JOIN LEFT_OUTER CR_TERM_1 IN rficctrec TO EC_RECNO IN rfiectab AS J2
JOIN LEFT_OUTER CR_TERM_2 IN rficctrec TO EC_RECNO IN rfiectab AS J3
JOIN CR_ACCT_NBR IN rficctrec TO CD_ACC_NBR IN rficdrec AS J4
SET ORIENTATION = PORTRAIT
SET PAGESIZE = A4
SET SQUEEZE = ON
DEFINE FILE RFICCTREC ADD
CR_DETAIL/A92=J2EC_TOWN || '-' || J3EC_TOWN || '-' || CR_SERIAL;
CCT_TYPE/A8=DECODE CR_DIGITAL( Y Digital N Analogue ELSE Other );
INTLNAT/A13=DECODE CR_INT_NAT( I International N National ELSE Other );
STATUS/A6=DECODE CR_STATUS( W Active C Cease ELSE Other );
FLAG/A8=DECODE CR_DIGITAL( Y Digital ELSE Analogue );
END
TABLE FILE RFICCTREC
PRINT
CR_DETAIL AS 'Circuit Designation Detail'
CR_A_COUNTRY AS 'A End Country'
HEADING
" "
"*** In Commercial Confidence ***"
"Customer Group Name<+0> <
" List of <+0>International <+0>Private Circuits "
"Page<+0> of<+0> (Program ECRPT0001)"
FOOTING
"*** In Commercial Confidence ***"
"This report was complied on <+0>&DATEtrMDYY <+0> "
"End of this page"
WHERE ( CR_A_COUNTRY NE 'U.K.' ) AND ( CR_INT_NAT EQ 'I' );
WHERE GROUP_NAME EQ '&GROUPNAME';
WHERE ( CR_STATUS EQ 'W' ) OR ( CR_STATUS EQ 'C' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD AS &GROUPNAME FORMAT HTML
END
-RUN
-GOTO top.loop;
-end.loop
-CLOSE GROUPNAME
Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 14, 2006, 10:39 AM
Jim_at_LMSome ideas on your multiple report generation and HTML. We do it throughout our applications:
:
ON TABLE HOLD AS WADSRQHD FORMAT HTMTABLE
ON TABLE SET STYLE *
-************ HTML *******************
UNITS=IN,
UNITS=IN,
PAGESIZE='LETTER', < ‘A4’ in your case.
LEFTMARGIN=0.060000,
RIGHTMARGIN=0.060000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
RIGHTGAP=0.040000,
LEFTGAP=0.040000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
COLOR=BLACK, > etc .
ENDSTYLE
:
-HTMLFORM BEGIN
Your Report Title
!IBI.FIL.WADSRQHD ;
: -HTMLFORM END
WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
June 14, 2006, 10:43 AM
Jim_at_LMSOrry, first send corrupted this piece:
-HTMLFORM BEGIN
<HTML>
<TITLE>Your Report Title</TITLE>
<STYLE TYPE="TEXT/CSS">
</STYLE>
<BODY>
<CENTER>
!IBI.FIL.WADSRQHD ;
: <Multiple HTML forms here
</CENTER>
</BODY>
</HTML>
-HTMLFORM END
WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
June 27, 2006, 03:39 AM
Adolf MergulhaoThanks I will try it
Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 27, 2006, 01:21 PM
susannahquote:
READ GROUPNAME NOCLOSE &GROUPNAME.A3
Adolph you're reading the groupname from the flat file as A3, but we know its longer than A3 because you say
IF GROUPNAME EQ 'REUTERS' OR 'whatever the otherone was'
SO, you need to make the read variable the same length as the source.
See?
Also, put your JOINs and FILEDEFs and DEFINES up top, before the loop. You only want to join and filedef and Define
one time. and don't ON TABLE PCHOLD
just ON TABLE HOLD AS &WHATEVER FORMAT HTMTABLE
and...
learn to EDIT your posts, rather than repost an entire revised version, much easier for all of us to read.
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
June 27, 2006, 01:41 PM
Adolf MergulhaoThanks for your advice
Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server