Focal Point
[SOLVED] Graph with no Data

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4757037506

June 20, 2011, 10:35 AM
dhibach
[SOLVED] Graph with no Data
I have a graph that I want to show a special message when there is no data. My research to date shows that I must perform a table request first to see if &LINES EQ 0. Then if there is data, I run the Graph report, otherwise show my HTML custom error page.

I am looking for a way to accomplish this more efficiently, since I am running two passes if there is data.

Thanks in advance.

This message has been edited. Last edited by: Kerry,


WF 7.6.11
Windows
Excel, HTML, and PDF.
June 20, 2011, 11:04 AM
GamP
You can do the graph, let it create an empty graph and hold it. Then check &LINES (it will be 0 for an empty graph) and take action upon that - either show the held image or show some empty graph message.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
June 20, 2011, 01:05 PM
shakila25
Hi,
-IF &LINES.EVAL NE 0 THEN GOTO END_GRAPH;
TABLE FILE CARPRINT
COMPUTE GRAPHND/A850 = 'NO DATA AVAILABLE'; AS ' '
MODEL NOPRINT
BY MODEL NOPRINT
HEADING
" "
FOOTING
" "
IF RECORDLIMIT EQ 1
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='A4',
LEFTMARGIN=1.5,
RIGHTMARGIN=&RIGHTMARGIN,
TOPMARGIN=0.150000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
TOPGAP=0.023889,
$
TYPE=HEADING, SIZE=10, TOPGAP=0.40,$
TYPE=REPORT, COLUMN=N2, SIZE=10,WRAP=5.0, $
TYPE=DATA, COLUMN=N2, SIZE=12,WRAP=5.0,STYLE=BOLD, $
TYPE=FOOTING, SIZE=10, TOPGAP=-1.05 ,JUSTIFY=RIGHT,STYLE=BOLD,$
ENDSTYLE
END
-RUN
-END_GRAPH

Thanks!


WebFOCUS 7.6.x
Windows
Output: Excel,PDF, HTML
June 21, 2011, 10:05 AM
dhibach
Thanks, All.


WF 7.6.11
Windows
Excel, HTML, and PDF.