Focal Point
Displaying user friendly messages

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

October 03, 2006, 05:36 AM
<Sengott>
Displaying user friendly messages
Hi,

Sometimes when there is no data for the Graph to plot it displays " NO HTML OUTPUT "

But instead of this i want to display a more user friendly message like " for the &movie there is no data"

Kindly provide me a solution

Regards

Sengot

This message has been edited. Last edited by: <Sengott>,
October 03, 2006, 09:05 AM
Prarie
If you search on this forum...there are several discussions on this topic. Here one.
https://forums.informationbuilders.com/eve/forums/a/tpc/...661078331#2661078331


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
thanks
What I do is force an "empty" report using table CAR with a message in my title... That way you create a report, no matter which output (EXL2K, HTML, PDF, ...) but it's just an error message.

In my report I set &TITLE2 to '', but in case my report is empty, I set it to a message. &TITLE 2 is included in my heading all the time.

You check if your last TABLE FILE returns lines and if no, you goto this procedure:

-IF &LINES EQ 0 THEN GOTO FINISH;

...

-FINISH
SET EMPTYREPORT = ON
-SET &TITLE2 = '*** Sorry there is no data for your selections ***';
TABLE FILE CAR
PRINT CAR NOPRINT
BY COUNTRY NOPRINT
WHERE CAR EQ 'NODATA';
-GOTO STYLE;

STYLE is the style sheet part of code used for both the empty report and real one (HEADING, FOOTING, STYLE, etc...).
ex:
-STYLE
HEADING
"&TITLE"
"&TITLE2"
" "
FOOTING
"Page "&TITLE&TECHNAME"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT '&WFFMT.(HTML,EXL2K,PDF).Display Output.'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
...

END

I hope it helped you.


Web Focus Studio 5.2.5 on Win2k3
or..
-IF &LINES GT 0 GOTO repgen;
-HTMLFORM BEGIN
<html>
<table><tr><td>
no data ...
</td></td></table>
</html>
-HTMLFORM END
-EXIT (or GOTO eoj.thisfex;)

-repgen
..write your report here





In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID