As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
well, you can't do it from the agent. but you CAN do it from a static server loc. excel uses a web reference to pull an image (different from the way pdf works) and once the excel file gets made, the temp agent directory dies. so you have to be referencing a location on a server in order for excel to see the image. The images are not EMBEDed..we've asked and asked for WF to enable us to EMBED images... Then no server ref would be needed.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
You cannot use the agents temp directory because WebFOCUS deletes the contents of the temp directory once it completes the request and sends the answer set back to the browser. Once Excel tries to look back to the web server to retrieve the gif, the file is gone. Either do the APP HOLD to an application directory or create a different temp directory which the web server can get to. Copy the gif to this temp directory or APP HOLD to the temp directory. Add the new temp directory as a virtual directory to the web server and then reference that directory in the excel file. This must sound confusing.
Basically you cannot use the agents temp directory because it deletes all files once its done with the request. Therefore you need to come up with another way.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
If you are worried about user requests overwriting each other, use the user's IP address in the gif file name or use a random number in the gif file name. I use the WebFOCUS random number generator to create a random name for the gif files I create. The chances of colliding requests are very rare. To top things off, there is a TEMP directory "c:\ibi\webfocus71\temp" which WF uses for this very thing when you create a gif image to use in HTML output. I just added this directory to the web server as a virtual directory and then copy the image files to this directory at the end of my request and reference it in the HTML. The advantage of this directory is that WF cleans up this directory on a regular basis. It looks for files older than a certain amount of time and then deletes then. This keeps stuff from hanging around too long but long enough for the user to view the image.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
-* excel graph and report
-SET &ECHO=ALL;
SET PAGE-NUM=OFF
SET TEMPERASE=OFF
-RUN
-SET &TEMPDIR = TEMPPATH(80,'A80');
-SET &GIFFILE = &TEMPDIR || 'G1.GIF';
GRAPH FILE CAR
SUM SALES
BY COUNTRY
ON TABLE HOLD AS G1 FORMAT GIF
END
-RUN
DEFINE FILE CAR
IMG1/A100 WITH CAR='<img src="&GIFFILE">';
END
-RUN
TABLE FILE CAR
HEADING
"Sales Report"
" "
FOOTING
"<IMG1"
SUM SALES BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Sales', $
ENDSTYLE
END
-RUN
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
I first hit the TEMPPATH function from a post by Susannah wayyyyyyyyy back (Thanks S!!), and very useful it is too. I even have a fex called temppath with the code so that I don't forget it!! Well, at my age you have to have these aide memoires
Now what was I doing?
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
The TEMPPATH function gives the directory path of the agent process. This does not seem to help because this directory will be cleaned up at the end of the processing by the agent. This gives you the red X for the image in the Excel Sheet.
Does this give you the image when you run it? Maybe your WF Server is setup NOT to clean up the agent directory immediately.
Curious.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
eeeeeeeeek , imho, SETting TEMPERASE OFF is risky to handle, it can save everything on gods green earth and eat your server like necrotizing fasciitis. there's an image. just park the gif on some shared network dir , available to all users, give it some nice unique name. failing that, an extranet site that is available to all users.(that's what we do) PDF embeds, Excel doesnt (should, does in other languages, but doesn't). Excel is gonna pull a .gif via a url the way any html page does.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Of course, SET TEMPERASE=OFF is not a good idea if the temp directories on the server (e.g. C:\ibi\srv53\wfs\edatemp\ts000014\) never get cleaned up.
But if a subsequent request runs with SET TEMPERASE=ON (the default), the temp directory it's running in will get cleaned up.
Since the temp directories are limited to the number of agents, wouldn't the temporary files get cleaned up in all the temp directories eventually? As well, SET TEMPERASE=OFF could be used prudently only when necessary.