Focal Point
Display of HTML Graphs in Reportcaster's ReportLibrary

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

November 09, 2006, 06:38 AM
hammo1j
Display of HTML Graphs in Reportcaster's ReportLibrary
Hi

I have a procedure that works fine generating a html web page as output.

Here are the on graph commands

ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRWIDTH 0
ON GRAPH PCHOLD FORMAT PNG

Yet when I move this into reportcaster with output options as HTML held in reportlibrary the report appears as HTML with place markers where the graphs should be.

Once you view the source you see that you get an applet with a set of parameters that would allow the graph to be reconstructed by the APPLET.

APPLET id="graph" name=graph codebase=/ibi_html/javaassist archive=IBITDGChartApplet.jar code=ServerSidePngGraph.class width=760 height=400 alt=""

However I do not have GRAPHEDIT=OFF or ON coded in my procedure and it seems as if the action of running under RCASTER has put the setting to GRAPHEDIT=OFF where a "Java Rendered Graph" is returned.

Does anyone out there have any suggestions.

Regards

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
November 09, 2006, 07:05 AM
Tony A
John,

When you get an HTML report from Report Caster the file references are localised to where you open it from. e.g. they could be referencing your "temporary internet files" folder on the recipient's local machine.

The important bit here is the "codebase" parameter in the APPLET object. If you were to amend this to contain the full path to where the IBITDGChartApplet.jar resides, save it and reopen the saved version, it would probably work OK.

I would always recommend sending graphical output from Report Caster in PDF format because all graphical elements (logos, graphs etc.) are included in the PDF stream before it is sent to the email recipient.

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 
November 09, 2006, 07:12 AM
Tony A
Oops, forgot to mention the one exception to the PDF streaming of graphics.

When you output an active report (which is HTML) the images contained within it are "bit streamed" within the Scripting. So, as these exist within the file there are no problems seeing them in the output as they require no external references.

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 
November 09, 2006, 08:35 AM
hammo1j
Tony

First of all Thank you for your help.

The URL I use to reference the reportcaster output is:

http://chaos/rcaster/library/report?id=R11r66ur4t3&version=4

Using the codebase url

/ibi_html/javaassist

Since a relative URL that begins with / (a slash) always replaces the entire pathname of the base URL the equivalent absolute URL is given by

http://chaos/ibi_html/javaassist

Now in the client settings I get:

IBI_HTML_DIR = &IBI_DOCUMENT_ROOT/ibi_html
IBI_DOCUMENT_ROOT = C:/ibi/WebFOCUS71

This suggests that IIS will convert the URL to
directory

C:/ibi/WebFOCUS71 + /ibi_html + /javaassist

And I checked this does contain the referenced .JAR.

I did try saving the page as you say changing the rel URL to the full spec, but that did not work presumably for this reason.

Hope you've got another avenue up your sleeve.

Regards

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
November 09, 2006, 08:48 AM
hammo1j
Tony

Tried putting

SET GRAPPLETONLY=ON
ON GRAPH SET GRAPHEDIT OFF

Now it works and it changed the URL for the applet.

APPLET id="graph" name=graph codebase=/ibi_html/javaassist archive=IBINewTDGChartApplet.jar,threed.jar,ibi_log4j_1.2.8.jar code=IBINewTDGChartApplet.class width=760 height=400

Anyone out there with a good explanation?

John

PS It also mulches the caption on the X axis when I do this but that's the least of my worries.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
November 09, 2006, 08:51 AM
Tony A
Hi John,

The first thing I notice is that the URL references report library, is that right?
If so then I'm afraid I have no answer for you as I have not used Report Library and therefore am not sure how it functions.

I suppose one possibility is to try playing with the GRAPHSERVURL setting? I think that there is also a setting for using the OLD or NEW graphing engine but cannot find reference to that at the moment. I'm sure someone will have it to hand though.

Good luck

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 
November 09, 2006, 08:58 AM
Tony A
John,

It would appear that we were responding at the same time, although your response is good news!!

The archive value has changed to using the NEW engine (see my last suggestion) instead of the OLD and that is probably the important thing.

As for munching your titles etc. then I would advise the use of the java set syntax instead of letting WF do it for you. To get a good start, run the report as is and grab the java code from the source. Add it into your existing code between ON GRAPH SET GRAPHSTYLE * and ENDSTYLE, then look out the Graphing Manual for your release. Invaluable to have by your side or else ask the Forums graphing wizard JG.Wink

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 
November 09, 2006, 09:14 AM
hammo1j
Thanks Tony again

I'm guessing report library forces client side graphics in HTML so that it does not have to keep track of the server generated png files.

Strangely the mulching of my titles has disappeared once the initial download of Java applet has occurred! I think it might have been trying some too clever async processing during the download.

Great stuff!



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo