Focal Point
[Solved]How do you change the default no results message

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

April 30, 2012, 08:33 AM
Geri
[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,




Prod: WebFOCUS 7.7.05 OS:Linux; Upgrading to: WebFOCUS 8.1.05 OS:Windows; Outputs: HTML, PDF, Excel; Adapters: SAP, MySQL, Oracle incl Report Caster
April 30, 2012, 09:16 AM
SriAravind
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
April 30, 2012, 09:37 AM
Mary Watermann
Found this with some research:

 

http://documentation.informati.../wf77sec/wf77sec.pdf
 


Start on page 336.

In the file look for "err_42" message. There are several messages in the file mentioned.


WF 7.6.10, Windows, PDF, Excel
April 30, 2012, 10:06 AM
SriAravind
quote:
Originally posted by Mary Watermann:
Found this with some research:

 

http://documentation.informati.../wf77sec/wf77sec.pdf
 


Start on page 336.

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.




Prod: WebFOCUS 7.7.05 OS:Linux; Upgrading to: WebFOCUS 8.1.05 OS:Windows; Outputs: HTML, PDF, Excel; Adapters: SAP, MySQL, Oracle incl Report Caster
May 01, 2012, 11:27 PM
dhagen
Make sure you change the correct file:

ibi/WebFOCUS77/client/wfc/etc/ENtemplate.xml

Then restart the web application.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
May 02, 2012, 12:40 AM
Danny-SRL
The messages, in English, are in file \ibi\WebFOCUS77\client\wfc\etc\ENwebfoc_strings.lng
lines 99 to 103

You'll have to remember to update this file after an update...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

May 07, 2012, 09:14 AM
Geri
Re-starting the client forced the changes to the default message to take.

Thank you all for the suggestions.




Prod: WebFOCUS 7.7.05 OS:Linux; Upgrading to: WebFOCUS 8.1.05 OS:Windows; Outputs: HTML, PDF, Excel; Adapters: SAP, MySQL, Oracle incl Report Caster
June 20, 2014, 02:15 PM
ddornan
Thanks for the html code for the error_42 template Daryl

We are on 8.0.0.4 and needed to change the the reference to element id 'fmsg to emsg

SO we change this line

if (document.getElementById('fmsg').innerHTML.indexOf('0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0') != -1)

to

if (document.getElementById('emsg').innerHTML.indexOf('0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0') != -1)


Webfocus 8.0
HTML