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 series of graphs on a dashboard. Sometimes no data is present. I wanted to print a little message: No Data Present when th egraph is empty. I took the following approach but it does not seem the IF statement is evaluated correctly. It prints the message no matter what... Anyone see something wrong with my syntax?
. . .
-IF &LINES.EVAL EQ 0 THEN GOTO GRAPHIT; DEFINE FILE TBLMSTR_CALENDARPERIOD MESSAGE/A50='There is no Data to Graph!'; END TABLE FILE TBLMSTR_CALENDARPERIOD BY LOWEST 1 TBLMSTR_CALENDARPERIOD.TBLMSTR_CALENDARPERIOD.FISCALYEAR NOPRINT BY MESSAGE AS 'New Inpatient Visits - MESSAGE!' HEADING " " " " " " " " ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ TYPE=DATA, COLUMN=N2, SIZE=18, COLOR='BLUE', $ TYPE=TITLE, COLUMN=N2, SIZE=18, COLOR='PURPLE', BACKCOLOR=RGB(51 204 204), $ ENDSTYLE END
-GRAPH_ITThis message has been edited. Last edited by: <Kathryn Henning>,
Agree on the branching but for now it hits the IF statement and should jump to the GRAPHIT section if there is no data, however it seems to ignore the IF statement and do both no matter what.
I originally had: SET EMPTYREPORT = ON
that works but leaves a rather odd looking empty space!
ok, if I have data....it prints 'There is no Data to Graph' then prints the graph. Should it not bypass the code causing the message????
Here is the latest code:
-IF &LINES.EVAL NE 0 THEN GOTO GRAPHIT; DEFINE FILE TBLMSTR_CALENDARPERIOD MESSAGE/A50='There is no Data to Graph!'; END TABLE FILE TBLMSTR_CALENDARPERIOD BY LOWEST 1 TBLMSTR_CALENDARPERIOD.TBLMSTR_CALENDARPERIOD.FISCALYEAR NOPRINT BY MESSAGE AS 'New Inpatient Visits - MESSAGE!' HEADING " " " " " " " " ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ TYPE=DATA, COLUMN=N2, SIZE=18, COLOR='BLUE', $ TYPE=TITLE, COLUMN=N2, SIZE=18, COLOR='PURPLE', BACKCOLOR=RGB(51 204 204), $ ENDSTYLE END
Try putting a -GOTO SKIPGRPH after the no data report.
-IF &LINES.EVAL NE 0 THEN GOTO GRAPHIT;
DEFINE FILE TBLMSTR_CALENDARPERIOD
MESSAGE/A50='There is no Data to Graph!';
END
TABLE FILE TBLMSTR_CALENDARPERIOD
BY LOWEST 1 TBLMSTR_CALENDARPERIOD.TBLMSTR_CALENDARPERIOD.FISCALYEAR NOPRINT
BY MESSAGE AS 'New Inpatient Visits - MESSAGE!'
HEADING
" "
" "
" "
" "
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=DATA,
COLUMN=N2,
SIZE=18,
COLOR='BLUE',
$
TYPE=TITLE,
COLUMN=N2,
SIZE=18,
COLOR='PURPLE',
BACKCOLOR=RGB(51 204 204),
$
ENDSTYLE
END
-GOTO SKIPGRPH
-GRAPHIT
GRAPH FILE ....
graph code
END
-RUN
-SKIPGRPH
1)When data is present, it prints both the no data found message and graph
2) when no data is present it prints the message..I can not tell whats happening with the grapgh...there is no data...I see no nothing.
I tried the echo thing, then viewed the source. I ran the report for an area where I know there is data...it printed the message and graph.....the Echo ended with this...
0 NUMBER OF RECORDS IN TABLE= 2134 LINES= 2134 0 NUMBER OF RECORDS IN TABLE= 6 LINES= 6 0 NUMBER OF RECORDS IN TABLE= 24 LINES= 12 0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18 0 HOLDING HTML FILE ON PC DISK ... 1 0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1 0 NUMBER OF RECORDS IN GRAPH= 18 PLOT POINTS= 12
-IF 0 NE 0 THEN GOTO GRAPHIT DEFINE FILE TBLMSTR_CALENDARPERIOD MESSAGE/A50='There is no Data to Graph!'; END TABLE FILE TBLMSTR_CALENDARPERIOD BY LOWEST 1 TBLMSTR_CALENDARPERIOD.TBLMSTR_CALENDARPERIOD.FISCALYEAR NOPRINT BY MESSAGE AS 'New Inpatient Visits - MESSAGE!' HEADING