December 04, 2007, 01:17 PM
Joan Williamson-KellyChange MR message "No Html Output!"
Does anyone know if there is a way to cause a report that returns no records, run from a Reporting Object in Managed Reporting, to display a customized message instead of "No HTML Output!" plus all the code executed for the request?
The "No HTML Outupt!" message and all of the code below it is confusing to users.
December 04, 2007, 02:45 PM
TravYou can do a
SET EMPTYREPORT = ON
and that will make a blank report come up.
You could also check your rowcount before you present your results and then go to a "canned" message that says no results or something spiffy like that.
TABLE FILE CAR
PRINT MODEL NOPRINT
WHERE RECORDLIMIT EQ 1
HEADING
"There are no changes that meet your parameters."
"please revise your selections and re run the report"
END
December 04, 2007, 02:51 PM
Joan Williamson-KellyWhere would I add this in the Reporting Object?
December 04, 2007, 03:36 PM
Joan Williamson-KellyOK,
I found how to use the EMPTYREPORT command in an MR Reporting Object.
Open the Reporting Object in the Reporting Object Tool through Dev Studio.
Edit the "Other" item.
Type the command in the editor:
SET EMPTYREPORT = ON
Close and save the "Other" editor and the reporting object.
Now, when a report runs and returns no lines, the headings display with no data, instead of the "No HTML Output!" and all of the code.
That will do!
December 05, 2007, 09:49 AM
AnatessHi Joan,
Just another idea...
I normally do this at the end of my table requests:
-IF &FOCERRNUM NE 0 GOTO DBERR;
-IF &RECORDS NE 0 GOTO ENDFEX;
-HTMLFORM NO_RECORDS
-GOTO ENDFEX
-DBERR
-HTMLFORM REPORTERR
-ENDFEX
Then I have NO_RECORDS.htm that contains the empty report message. The cool thing about this is if an empty report is not ideal, then you can add links/instructions on what to do next. Same for REPORTERR.htm. It usually links to the tech support contact page.
December 05, 2007, 11:01 AM
Francis MarianiAnatess,
How does one stick that code in a Reporting Object - that is the question.
I don't know if this has changed for versions post 5.3.2, but there is an HTML file that contains all or most of the client response messages at this location: Drive:\ibi\client53\home\etc\xxib00e.html where xx is the language your software is set to - English: enib003e.html.
Look for the text "No HTML Output" - 'error' 00042. Each 'error' has its' own HTML section - you can replace the existing HTML with whatever you want (probably within limits - I wouldn't do crazy JavaScript, DHTML, ASP stuff). Make a backup of the file before modifying it!
Cheers.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 05, 2007, 12:39 PM
susannahoh my..
FrankieMartini you've just opened up a gigantic box of play toys...we can change the error messages to say whatever we want them to say?...
Oh i'm going to have fun for the rest of the day...
joan, you can also put that in your edasprof..i find it so uniformly useful that i put things like that in my edasprof, then my users can be independent in building their own reporting objects and have consistent results.
December 05, 2007, 01:54 PM
Francis MarianiSusannah,
I've customized the error messages for these errors:
00042 – No HTML Output
32033 – Unrecognized User ID
32034 – Invalid Password
32035 – Password has expired
32063 – User ID access has been revoked
32076 – WebFOCUS session has expired
We're laughing...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 05, 2007, 01:56 PM
Prarie | In Focus since 1993. WebFOCUS 7.7.03 Win 2003 |
December 05, 2007, 02:19 PM
susannahbut what did you customize them
to?
00042 – you have to pay extra for this.
32033 – who the sam hill are you?
32034 – no, gimme the password for your bank account.
32035 – that one is so last millenium!
32063 – fat chance!
32076 – I'm napping now.
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
December 05, 2007, 02:56 PM
Francis Mariani Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 05, 2007, 03:02 PM
Joan Williamson-KellyWow! I had no idea what I had started.
So to summarize:
I can change the message/behavior for all of MR on the server in:
1) drive:\ibi\srv76\home\etc\enib00e.html
(Our environment is in WF 7.6.1)
2) edasprof
SET EMPTYREPORT=ON
I'll experiment with these.
December 05, 2007, 05:38 PM
Tony Aquote:
I'll experiment with these.
... after taking a backup of course
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |
December 06, 2007, 10:39 AM
AnatessHey Francis, Tony,
Does that also control the EDASERVE crash error? I ran a fex yesterday where I forgot to put COMPUTE... like this:
TABLE FILE whatever
SUM NEWFIELD/D12.2=FIELD1 + FIELD2; AS 'TITLE'
...
And I got that EDASERVE crash message. Took me forever to find the problem with several calls to wf admin who must now think i deprived a village of their idiot.
WF 8.1.05 Windows
December 06, 2007, 11:19 AM
GlendaJoan,
I have a lot of user that think the report is "broke" if they get a report that says "No HTML Output".
We use the following code to generate a message stating "No records found that match your parameters." and they quit reporting "broke" reports.
TABLE FILE CAR
PRINT COUNTRY
CAR
MODEL
DEALER_COST
RETAIL_COST
WHERE COUNTRY EQ 'GERMANY'
ON TABLE HOLD AS FDATA
END
-*******************************************************************************
-* TEST FOR EMPTY DATASET
-IF &LINES EQ 0 THEN GOTO BLANKER ELSE GOTO CONT;
-*******************************************************************************
-CONT
TABLE FILE FDATA
PRINT COUNTRY
CAR
MODEL
DEALER_COST
RETAIL_COST
END
-EXIT
-BLANKER
DEFINE FILE CAR
NOREC/A50='No records found that match your parameters.';
END
TABLE FILE CAR
PRINT NOREC AS ''
BY COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1
END
-EXIT
Sometimes users can be a headache!
Glenda
In FOCUS Since 1990
Production 8.2 Windows
December 06, 2007, 11:24 AM
Francis MarianiAnatess, I'm not sure. If the EDASERVE crash message is one of the ones in the enib003e.html file, then you could change it.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 07, 2007, 12:55 PM
Joan Williamson-KellyGlenda,
Thanks for the additional idea for a way to handle zero record results sets in a fex. I'll try that in my fexes.
Joan
December 07, 2007, 03:40 PM
Darin Leewe use Glenda's technique frequently to help users overcome the ID10T error (they put in bad parameter values and expect to get valid results.)
A note on editing the HTM file containing error messages - remember that this is a system file and any patches or updates to your software will overwrite your changes. That being said, we still do things like this - just need to have them documented as part of any software updates so we remember what and where the custom modifications were made.
Regards,
Darin
In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
September 16, 2008, 12:32 PM
JaywillFor some reason, modifying enib00e.html did not work at our site.
Instead, I had to change C:\ibi\WebFOCUS761\client\wfc\etc\ENwebfoc_strings.lng
WF 8.0.08 ... Windows Server 2008
September 16, 2008, 01:49 PM
RSquaredYou can also add the attached code as a .fex that you include at the end of your focexec.
"/-RUN
-IF &FOCERRNUM NE 0 GOTO FOCERROR;
-IF &LINES EQ 0 GOTO NODATA;
-EXIT
-FOCERROR
-HTMLFORM BEGIN
A FOCERROR of &FOCERRNUM was returned by your program.
Please contact the Help Desk (7-8227) immediately.
-HTMLFORM END
-EXIT
-NODATA
-HTMLFORM ZeroRecords
END
-EXIT
/"
You also have t oinclude an html page so that you can send back a nice error page.
WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
September 16, 2008, 05:24 PM
dhagenJaywill,
That didn't work for you in 761 because it no longer exists in 761 (sorry Francis, all that beautiful work is going to have to change when you upgrade). The way these messages are generated in 76 has changed to a couple of language specific files. One for the message, and one for the complete html that is generated. It makes a lot more sense now ... to me anyway. You can edit the complete html code block for the no data message.
Look into ENtemplate.xml and ENwebfoc_strings.lng in your client/wfs/etc directory.
Make backups
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
September 17, 2008, 05:46 PM
WazSometimes the best way is the hard way.
We always check &LINES to see of there are no records at appropriate points in the fex to show either a nice error message or a -HTMLFORM.
We also always check &FOCERRNUM after every TABLE FILE to handle errors.
Its more coding but is safer in the long run, in particular with upgrades.
Waz...Prod: | WebFOCUS 7.6.10/8.1.04 | Upgrade: | WebFOCUS 8.2.07 | OS: | Linux |
Outputs: | HTML, PDF, Excel, PPT |
In Focus since 1984 |
Pity the lost knowledge of an old programmer! |