Focal Point
JavaScript with Report Caster

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

July 09, 2004, 02:24 PM
<Bandi>
JavaScript with Report Caster
I am scheduling a Report in which I insert some details generated from the JavaScript code I have in the head section.

The JavaScript seems to be working fine when I run the Report seperately but when it is emailed through a schedule from Report Caster, the output which is generated from JavaScript is not seen on the Report.

Can anybody give me a clue why?

Thanks!
July 09, 2004, 03:49 PM
susannah
well, the simplest reason is that Outlook isn't a browser. and javascript is executed client-side, by the browser. Of course, bill gates will probably fix that! Big Grin
July 13, 2004, 10:14 AM
Tony A
Babitha, Susannah,

Not all caster jobs use the instream HTML for viewing via Outlook or any other email Client but use the "Send as attachment" option which will use a web browser client for HTML attachments (if the target machine is set up that way of course!).

A lot of "problems" when using Report Caster are due to way RC actually runs the fex, in that it parses the code stripping out certain items.

Next time you run a fex with Javascript that works when run via a client or SSA, set &ECHO to ALL and compare the HTML source with that produced when run via Caster and you'll see what I mean.
July 13, 2004, 01:48 PM
susannah
Tony, Caster doesn't show the Echo. That's one thing we've been NFRing. We'ld like to have a way to save the echo to a file somewhere.
July 13, 2004, 02:05 PM
Tony A
Susannah,

That's one difference that I meant! Altough, if I had mentioned that fact then many readers probably would have accepted it and not checked it! I had hoped people would try it for themselves (if they use Caster) and get used to checking outputs for debugging purposes.

You'll also notice that the usual Javascript entry is not present. Alledgedly it's due to security considerations according to Tony Li. Reasoning that I can appreciate even though I do not necessarily agree with it (entirely). I believe that the security implications should be left to the WebFOCUS installation.
July 13, 2004, 04:23 PM
<Joe Treliin>
Thanks for the input and insights. They are truly appreciated. I was reading through this thread and thought I perhaps could add a couple of pieces of information.

&ECHO and -TYPE in logs will be supported in ReportCaster 5.3.

Also, as per my last conversation with development, ReportCaster doesn't strip out anything from a FEX. It actually might add a necessary command or two, as well as a few reserverd informational &variables (these are listed in the best practices guide), and then it hands the FEX off to the Reporting Server for processing. The only parsing it will do is to look for markers on burst reports.

There are, however, differences in the way ReportCaster will pre-process a job as opposed to MR. MR *will* parse and process a FEX prior to submission. This might be the discrepancy you are seeing and why it appears as if ReportCaster is 'parsing and removing certain items.'

Bottom line, JavaScript should work with ReportCaster and display properly if the report is rendered in a JavaScript friendly environment.


Joe Trelin
-Senior Product Manager, ReportCaster
July 19, 2004, 08:39 PM
<mhuber>
While we're on the subject of things that don't work with Caster...

FOC_NONE doesn't seem to work. It's been a pet peeve, and we've had to use Dialogue Manager to work around the issue.

Hopefully this will be fixed in 5.3 also.

-Michael