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.
I have a simple fex that prints a report. The report prints fine so long as there is data…a nicely formatted report appears. If no data, you instead see the Webfocus code showing no data was found…a little nasty looking.
So… If there is no data, I'd like to pop up a message in the footing that simply says 'No Data to Graph' To do this I put an IF STATEMENT in place, that, based on if lines are present, attempts to alter what prints in the footing.
The end result of all this that if no data is present I get an error centered around the IF statement. If data is present, I get my report, sans the footing altogether but all report formatting is lost.
Here is the code structure . . . WHERE J0.TBLMSTR_BANBRBANAMEXREF.IDXSPECIALTY EQ &IDXSPECIALTY; WHERE J0.TBLMSTR_BANBRBANAMEXREF.IDXROLLUP EQ &IDXROLLUP;
-IF &LINES NE 0 THEN GOTO PRINTRPT; FOOTING "NO DATA" -GOTO FINISHLINE
-PRINTRPT FOOTING "END OF REPORT" ON TABLE SET PAGE-NUM NOLEAD ON TABLE SUMMARIZE AS 'TOTAL' ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1, SIZE=10, $ TYPE=REPORT, COLUMN=N1, WRAP=6.000000, $ TYPE=REPORT, COLUMN=N2, SQUEEZE=ON, $ TYPE=REPORT, COLUMN=N3, SQUEEZE=2.555556, $ ENDSTYLE END -GOTO FINISHLINE
-FINISHLINE ENDThis message has been edited. Last edited by: RobertF,
-IF &LINES NE 0 THEN GOTO PRINTRPT;FOOTING "NO DATA"-GOTO FINISHLINE
if there are lines, there is no error however my formatting /stylesheet appears to be lost and the footing does not print at all.
if there are NO LINES I get tis error:
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0 (FOC1517) UNRECOGNIZED COMMAND FOOTING (FOC1517) UNRECOGNIZED COMMAND "NO DATA"
latest code: . . . HEADING "AR Summary" "as of: &PERIOD " WHERE TBLEXTRACT_121DAYAR.TBLEXTRACT_121DAYAR.PERIOD EQ . WHERE TBLEXTRACT_121DAYAR.TBLEXTRACT_121DAYAR.RPTBANBR EQ &IDXBA2; WHERE J0.TBLMSTR_BANBRBANAMEXREF.IDXSPECIALTY EQ &IDXSPECIALTY; WHERE J0.TBLMSTR_BANBRBANAMEXREF.IDXROLLUP EQ &IDXROLLUP;
-IF &LINES NE 0 THEN GOTO PRINTRPT; FOOTING "NO DATA" -GOTO FINISHLINE
-PRINTRPT FOOTING "END OF REPORT" ON TABLE SET PAGE-NUM NOLEAD ON TABLE SUMMARIZE AS 'TOTAL' ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1, SIZE=10, $ TYPE=REPORT, COLUMN=N1, WRAP=6.000000, $ TYPE=REPORT, COLUMN=N2, SQUEEZE=ON, $ TYPE=REPORT, COLUMN=N3, SQUEEZE=2.555556, $ ENDSTYLE END -GOTO FINISHLINE
RobertF we have developed a norecords.fex. We add one line of code to the end of all of our reports so if there is an error or no data the user will get a nicely formatted message with instructions. You would not need to create hold files to do this in every report. Hope this helps. Michelle
-IF &LINES EQ 0 THEN GOTO now_what
-ELSE GOTO FINISHED;
-now_what
-IF &WFFMT = 'HTML' OR &WFFMT = 'AHTML' THEN GOTO NORECS_HTML
-ELSE GOTO NORECS_PDF;
-NORECS_HTML
-HTMLFORM IBFS:/WFC/Repository/Common/html/norecords.htm
-GOTO FINISHED;
-NORECS_PDF
-SET &ERRMSG = IF &FOCERRNUM NE 0 THEN 'Error Number: ' | &FOCERRNUM ELSE '';
-SET &WFFMT = PDF;
-SET &MYORIENT = LANDSCAPE;
-INCLUDE IBFS:/WFC/Repository/Common/fex/sets_2.fex
-*the sets_2.fex works in conjuntion with our
-*mystyle.fex to create our standard style
DEFINE FILE TIME_DIM
NEW_DAY_TIME/HMTDYYIA=HGETC(8, NEW_DAY_TIME);
END
TABLE FILE TIME_DIM
SUM
NEW_DAY_TIME NOPRINT AS ''
TIME_DIM.TIME_DIM.FULL_DATE NOPRINT
HEADING
"&DATEHMTDYYIa "
" "
"There Are No Matching Records"
"Please Review Parameters Chosen and Try Again"
" "
"If you feel you have received this message in error,"
"please contact Administrative Computing at 488.4240. "
" "
"&ERRMSG"
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
FOOTING BOTTOM
"Page 1 of 1"
ON TABLE SUBFOOT
" "
" "
"- end of report - "
"Report Name:<+0> &REPORTNAME"
"Run By:<+0> &USR"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-INCLUDE IBFS:/WFC/Repository/Common/fex/include_mystyle.fex
-*include_mystyle.fex sets our standard style....you can use your own here.
TYPE=HEADING,
LINE=3,
COLOR='BLACK',
STYLE=BOLD,
SIZE=12,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=4,
COLOR='BLACK',
STYLE=BOLD,
SIZE=12,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=6,
COLOR='BLACK',
STYLE=NORMAL,
JUSTIFY=CENTER,
SIZE=11,
$
TYPE=HEADING,
LINE=7,
COLOR='BLACK',
STYLE=NORMAL,
JUSTIFY=CENTER,
SIZE=11,
$
TYPE=HEADING,
LINE=9,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=9,
SIZE=10,
COLOR='BLACK',
STYLE=NORMAL,
$
TYPE=FOOTING,
SIZE=9,
$
TYPE=REPORT,
COLUMN=N2,
SQUEEZE=4.430556,
$
ENDSTYLE
END
-RUN
-FINISHED
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML