Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Empty Graph Message ..Almost Works..Help

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Empty Graph Message ..Almost Works..Help
 Login/Join
 
Master
posted
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_IT

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Expert
posted Hide Post
You need to stop the program or branch somewhere else before the GRAPH_IT label

Also you do not need the .EVAL on &LINES.

You have a GOTO GRAPHIT and a label GRAPH_IT, is this a typo ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
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!

Yes typo...


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
quote:
GRAPHIT

I think I see my issue! My I condition is wrong...let me retry....


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
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

-GRAPHIT


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Expert
posted Hide Post
Have you run the code with -SET &ECHO=ALL; to see what is happening with values ?

What is the previous step that produces the &LINES ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
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



WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Master
posted Hide Post
The issues seem to be:

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


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
I noticed this too w/&ECHO=ALL:


-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


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
hmmm...can someone explain the difference between &LINES and &LINES.EVAL...I seem to be having some luck when I change top IF statement to:

-IF &LINES NE 0 THEN GOTO GRAPHIT


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Gold member
posted Hide Post
We add this at the end of each fex

-INCLUDE IBFS:/WFC/Repository/Landscape/no_records.fex



The code for no_records:

-IF &LINES EQ 0 THEN GOTO TABLE1 ELSE GOTO OTHERS;

-TABLE1
TABLE FILE CAR
PRINT COUNTRY NOPRINT
WHERE RECORDLIMIT LE 1;
HEADING
"There is No Data that Matches Your Selection"
END

-OTHERS


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 74 | Registered: December 23, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Empty Graph Message ..Almost Works..Help

Copyright © 1996-2020 Information Builders