Focal Point
is there a !IBI for images?

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

June 29, 2008, 12:36 PM
susannah
is there a !IBI for images?
I've searched on !IBI.
I know about !IBI.FIL and !IBI.AMP
but is there a !IBI for images?
I'ld like to know a list of possible !IBI.things,
but i'm really in need of an IMG one..

my alternative is to set the BASEURL to the current edatemp
but i haven't been able to figure out the syntax to do that.
SET BASEURL=http://localhost:8080/ ...then what?
its not approot
its not ibi_html
both of those are down the wrong alley..
is it some variation of ibi_apps???
SET BASEURL=http://localhost:8080/ibi_apps/.../edatemp/ts000001/
(i know how to get the current agent dir name)
any ideas?

This message has been edited. Last edited by: susannah,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 29, 2008, 03:08 PM
Tony A
Susannah,

If you have ON TABLE HOLD AS filename FORMAT SVG you might (note: not WILL) be able to reference it as an !IBI.FIL but having never checked that I wouldn't be surprosed if you cannot. You would have to reference it within an image tag but see below.

Setting the BASEURL to the current EDATEMP will be futile, of course, as by the time the web page is rendered in the client browser, the image file will no longer be available unless you have SET TEMPERASE = ON.

The main difference between what .AMP and .FIL does and what you want to do is that both .AMP and .FIL as passed to the client browser as part of the text stream, not so with an image. It has to reside somewhere that the web server can access it.

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 
June 29, 2008, 03:48 PM
Alan B
If the image is a graph, which is what I suspect if it's in the edatemp directory, use
ON TABLE HOLD AS MYGRAPH FORMAT HTMTABLE
for the GRAPH. Then use

!IBI.FIL.MYGRAPH;
in the HTML.

As far as I know there is only .FIL, .AMP and .GLB for !IBIs'.


Alan.
WF 7.705/8.007
June 29, 2008, 05:19 PM
susannah
thanks Alan,
i had hoped i could avoid that..
i wanted to load the images w/o invoking java on the end-users' box.
yes, that may have to be the answer.
cheers.
s




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 29, 2008, 05:22 PM
susannah
T...
i'm hoping to grab the image at the same time i'm grabbing all the saved .htm tables.
-htmlform begin
<table><tr><td>
!IBI.FIL.TAB1;
<TD>
!IBI.???.MYPIC1;
...
-HTMLFORM END

so i don't think it would be futile...i think it would be contemporaneous...if i can just figure out how to grab it.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 29, 2008, 05:31 PM
Alan B
Susannah,

Java is not invoked at all. WF creates a .png file overlaid with map tags. It places the png file in the same place as a PDF file and uses GETBINARY to retrieve. Light on the browser as it is pure HTML.


Alan.
WF 7.705/8.007
June 29, 2008, 06:40 PM
susannah
i had hoped so...but when i invoke the html i get the orange java box...before the graf exhibits. i'll try setting graphedit somewhere else..




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 30, 2008, 03:03 AM
Alan B
Susannah

The ENABLE_SSG in the admin console is what determines this. If you are getting the graph as a java applet then ENABLE_SSG is probably set to applet instead of the standard YES.

Issue
SET GRAPPLETONLY=OFF
before the graph to get a server side graph with HTML in the browser instead of Java.

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
June 30, 2008, 09:20 AM
linus
I have code where I had to place the .svg as an image next to the report. I used dialogue manager to set my image name, then used the IMAGE tag within STYLESHEET:
  
TYPE=REPORT, IMAGE=&GIMG, POSITION=(5 1), SIZE=(3.25 2.25), $

Hope this helps...


WF 7.7.05
HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files
HTML, Excel, PDF
June 30, 2008, 12:27 PM
susannah
its set to YES




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 30, 2008, 12:45 PM
mgrackin
Susannah,

You did not mention how the image file is created in the first place. Is this an image file that already exists and you just want to include it in a report? OR are you creating the image/graph in the execution of the fex and then want to show it in the HTML output?


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
June 30, 2008, 02:31 PM
susannah
Mick, it wouldn't matter.
Just assume its a jpeg in the agent..
I want to be able to address it with ordinary html
so i need
either ... the BASEURL of that agent (i can find the agent name...that's not the prob)
which is what !IBI does under the covers,
or..
i need a !IBI syntax for an image.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 30, 2008, 03:11 PM
mgrackin
Susannah,

1) If I understand correctly, you want the image file to be "embedded" into the return results for HTML output? If this is the case then you need to know that you cannot do this. All images are retrieved from the Web Server after the HTML is passed back to the browser.

2) Let's assume there is a DM VAR called &EDATEMP that gives you the full directory name to where the WebFOCUS agent wrote the image file. There are two issues that will get in the way of getting the image.

2a) The full directory means nothing to the Web Server. It needs a virtual directory defined that points to that full directory in whihc the image file was created.

2b) The image file won't be there anymore unless you tell WebFOCUS NOT to clean up the temp file directory. It sounds like you are doing this already.

A SOLUTION:

Move the image file to a directory to which a Web Server Virtual directory is defined and then code that virtual directory into your image tag.

If I am totally clueless as to what you are trying to do, please let me know.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
June 30, 2008, 03:22 PM
mgrackin
Susannah,

This link might help you (or not). It explains what I do to allow access via the Web Server to stuff (images, PDF, etc.) created by the WebFOCUS Server.

https://forums.informationbuilders.com/eve/forums/a/tpc/...921013782#4921013782


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
July 02, 2008, 11:24 AM
Francis Mariani
Susannah,

Your question may have been better answered already, but this code may help - I assume that the web server and reporting server talk to each other.

-SET &ECHO=ALL;

-DEFAULT &IBIC_user = 'fmarian';

-SET &FILE_NM = 'g001_' || &IBIC_user || '_' || &YYMD || '_' || EDIT(&TOD,'99$99$99') || '.jpg';
-SET &IMGFILE = 'C:\ibi\apps\demo\' || &FILE_NM;
-SET &IMGSRC  = 'http://ocdt70124055.office.adroot.bmogc.net:8080/approot/demo/' || &FILE_NM;

FILEDEF G001 DISK &IMGFILE
-RUN

GRAPH FILE CAR
SUM SALES BY COUNTRY
ON GRAPH HOLD AS G001 FORMAT JPEG
END
-RUN

-HTMLFORM BEGIN
<div>Image file location: !IBI.AMP.IMGSRC;</div>
<IMG SRC="!IBI.AMP.IMGSRC;">
-HTMLFORM END



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
July 21, 2008, 03:01 AM
Alan B
Quick update.

Have just had the behaviour that Susannah described, getting java applet graphs when requesting server side. Same program run in 2 different ways, one gave htmtable with associated map and getbinary, as requested, run same fex indirectly gave java applet.

I have ENABLE_SSG set to YES and SET GRAPPLETONLY=OFF in focexec and it was being ignored!

Final answer was to use ON GRAPH SET GRAPPLETONLY OFF rather than plain SET. It appears that WF sees the GRAPH FILE and makes arbitrary decisions ignoring previous SET commands.


Alan.
WF 7.705/8.007
July 21, 2008, 10:21 AM
susannah
thanks Alan. hmmm.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID