[Solved]How do you change the default no results message
How do you change the default no results message? This is the message that reads:
Your request did not return any output to display. Possible causes: - No data rows matched the specified selection criteria. - Output was directed to a destination such as a file or printer. - An error occurred during the parsing or running of the request.
I want to add something about if you see this message, please send the entire message to IT support for resolution.This message has been edited. Last edited by: Geri,
U can give ur own message, if no rows are retrieved for ur selection as below:
Give the below code at the end of ur report
-RPTEND
-IF &LINES EQ 0 THEN GOTO NODATA;
-ELSE GOTO THEEND;
-NODATA
-SET &ERRMSG1 = 'There is no data retrieved for the selected parameters.';
-*****U can give ur entered I/P parameter bottom *******-
-SET &ERRMSG2 = 'DATE RANGE : ' | &STARTDT | ' to ' | &ENDDT;';
-SET &ERRMSG3 = 'Try again with new set of values';
-GOTO ERRORMSG
-ERRORMSG
-HTMLFORM BEGIN
<HTML>
<BODY>
<P> &ERRMSG1 </P>
<P> &ERRMSG2 </P>
<P> &ERRMSG3 </P>
</BODY>
</HTML>
-HTMLFORM END
-GOTO THEEND
-THEEND
WebFocus Version 7.7.05 Windows, HTML/PDF/EXL2K/AHTML
In the file look for "err_42" message. There are several messages in the file mentioned.
Thanks for sharing the doc...
WebFocus Version 7.7.05 Windows, HTML/PDF/EXL2K/AHTML
April 30, 2012, 10:27 AM
dhagen
This is the one I've been using for years in the ENtemplate.xml. Simple, but better than the default (IMHO):
<template name='error_42'>
<![CDATA[
<HTML>
<HEAD>
<TITLE>No Results Returned</TITLE>
<style type='text/css'>
div.msgstyle {
height:20px;
font-size:12px;
color:#333;
font-family:"Lucida Grande",Verdana;
padding:7px 5px 7px 5px;
border-top:1px solid #ddd;
border-bottom:1px solid #ddd;
text-align: center;
}
div.msgerror {
font-size:12px;
font-family:Arial,sans-serif;
color:#444444;
background-color:#EEEEEE;
border-style:solid;
border-color:#e6e6e6;
border-width:1px;
align: center;
}
div.msgerrorhead {
font-size:12px;
font-family:Arial,sans-serif;
color:#444444;
background-color:#EEEEEE;
border-style:solid;
border-color:#8a8a8a;
border-width:1px;
align: center;
}
</style>
<script id='il1' type=text/javascript>
function window_onload() {
var focexec = '<insertvariable _executing_fex_name />';
var domain = '<insertvariable IBIMR_domain />';
if (document.getElementById('fmsg').innerHTML.indexOf('0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0') != -1) {
document.getElementById('dmsg').innerHTML = 'No records were returned that match your criteria!<br>Please change your request and try again.';
document.getElementById('dmsg').innerHTML += '<br><br>Report: <b>' + focexec + '</b>';
if ( domain != '' )
document.getElementById('dmsg').innerHTML += ' In Domain: <b>' + domain + '</b>';
} else {
document.getElementById('dmsg').innerHTML = 'An error has happened with Report: <b>' + focexec + '</b>';
if ( domain != '' )
document.getElementById('dmsg').innerHTML += ' In Domain: <b>' + domain + '</b>';
document.getElementById('dmsg').innerHTML += '<br><br>Please contact support and provide the error message below.';
document.getElementById('emsg').style.visibility = 'visible';
}
}
</script>
<script for=window eventname="onload">window.onload = function() { window_onload(); }</script>
</Head>
<Body>
<div id='dmsg' class='msgstyle'>
<inserttext err_42_explain />
</div>
<br>
<div id='emsg' style='visibility: hidden;'>
<div id='ehead' class='msgerrorhead'>
Error Message:
</div>
<div id='femsg' class='msgerror'>
<pre id='fmsg'><insertvariable html_no_output_msg /></pre>
</div>
</div>
</Body>
</HTML> ]]>
</template>
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
May 01, 2012, 06:29 AM
Danny-SRL
Geri,
If all you want is that additional short message, then very simply, at the end of your report:
-RUN
-RPTEND
-IF &LINES GT 0 GOTO #OUT;
-TYPE if you see this message, please send the entire message to IT support for resolution
-#OUT
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
May 01, 2012, 08:57 AM
Geri
Thanks all, lots of great suggestions.
I prefer to edit the Default message since it is so bold and that is the first thing the user see and frequently all they see at the bottom of the screen. They do not always page down when they see the message. For now, I added a message based on 0 lines as suggested here.
As for the default message, I changed the message (per your suggestion) but the original message still appears. I might need to contact IBI on that issue.