Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     INCLUDE .GIF FROM TEMPORARY FOLDER.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
INCLUDE .GIF FROM TEMPORARY FOLDER.
 Login/Join
 
Platinum Member
posted
I am trying to include a .gif file in an excel report from a temporary folder named:

D:\ibi\srv76\wfs\edatemp\ts000046

I have tried several variations of the img src:

Excel

I have tried mapping the folder using app map.

I can make it work by using a physical directory hanging off approot.

Can this be referred to using dos format such as D:\ibi\srv76\wfs\edatemp\ts000046 ?

Bob
 
Posts: 103 | Location: ricmmond va | Registered: September 30, 2004Report This Post
Expert
posted Hide Post
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, 2003Report This Post
Platinum Member
posted Hide Post
Susannah:

I am creating a .gif file (on table hold format gif) , then including it in a heading on a report that also has 'on table hold format exl2k'.

This works when I use an app directory(create the gif file with app hold set). When I try to use the default temporary directory the red x appears.

I want to refer to the temp directory to get the gif.

Thank you for your response.

Bob
 
Posts: 103 | Location: ricmmond va | Registered: September 30, 2004Report This Post
Virtuoso
posted Hide Post
Secret,

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, 2003Report This Post
Virtuoso
posted Hide Post
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, 2003Report This Post
Platinum Member
posted Hide Post
Mickey:

Thank you , I was just trying to avoid using the app hold.

Bob
 
Posts: 103 | Location: ricmmond va | Registered: September 30, 2004Report This Post
Expert
posted Hide Post
Here's how to do it:

-* 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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Only if you are running the fex from the same machine as the server!

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, 2004Report This Post
Expert
posted Hide Post
Tony, I keep forgetting that! Almost all (but not all) environments I've worked on are configured this way.

Thanks for reminding me (again)!


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis,

Where did you get that TEMPPATH function?


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
eeeccchhhooo




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
There does not seem to be much documentation on the function, though it is mentioned here:

http://documentation.informationbuilders.com/masterinde..._spr_713/05stp16.htm


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
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 Frowner

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, 2004Report This Post
Virtuoso
posted Hide Post
Francis,

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, 2003Report This Post
Expert
posted Hide Post
Mickey,

SET TEMPERASE=OFF

should stop the cleanup.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
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, 2003Report This Post
Expert
posted Hide Post
Susannah,

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.

Here is some interesting reading:

http://techsupport.informationbuilders.com/sps/12502070.html
http://techsupport.informationbuilders.com/sps/51051006.html


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
granted; imho, the bgh has a headache.... killing a fly with an elephant gun.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     INCLUDE .GIF FROM TEMPORARY FOLDER.

Copyright © 1996-2020 Information Builders