June 21, 2006, 03:55 PM
rcNo HTML Output! page how to redirect?
If there is no data I get the standard No HTML Output! blank page. How can I redirect to a standard output page?
June 21, 2006, 04:26 PM
Jim_at_LMHad some difficulties - I hope you get all of this:
After your report:
-SET &BANG_NODS00 = IF &RECORDS EQ 0
- THEN '!IBI.FIL.MINORECS;' ELSE ' ';
-HTMLFORM BEGIN
<HTML>
<TITLE> National Report
<STYLE TYPE="TEXT/CSS">
</STYLE>
<BODY>
<CENTER>
!IBI.FIL.NATRPT;
&IBIBANG1;
&BANG_NODS00
</CENTER>
</BODY>
</HTML>
-HTMLFORM END
In your HTML PDS:
SPF/E BROWSE WebFOCUS….HTML.DATA(MINORECS)
<HTML>
<HEAD>
<TITLE> No Data Found </TITLE>
</HEAD>
<BODY><FONT FACE="ARIAL" SIZE=1>
There is no data matching the parameters you requested.
</FONT> </BODY> </HTML>
(You can center this.)
June 22, 2006, 03:27 AM
Tony AAlso try SET EMPTYREPORT = OFF
T
June 22, 2006, 08:58 AM
susannahrc, this will give you the idea how to put a redirect into your output area.
You can adjust the code here to display some alternate "no data found--try again" page for a few seconds (currently set to 5, content="5") before redirecting to some nice pre-made page you might have somewhere, what you call your 'standard output page'
If your report does in fact return data, then the redirect statement is bypassed.
SET EMPTYREPORT=ON
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS MYTAB FORMAT HTMTABLE
END
-RUN
-SET &HOWMANY = &LINES ;
-HTMLFORM BEGIN
<html>
<head>
-IF &HOWMANY GT 0 GOTO no.redirect ;
<META HTTP-EQUIV="Refresh"
CONTENT="5 ;
URL=http://the page you want to redirect to">
</head>
-no.redirect
!IBI.FIL.MYTAB;
-HTMLFORM END
June 22, 2006, 10:22 AM
rcquote:
!IBI.FIL.MYTAB;
What is !IBI.FIL.MYTAB; ?