Desktop productivity for business analysts and programmers

Reporting: Display .gif file outside EG 4.1 environment

Reply
N/A
Posts: 0

Reporting: Display .gif file outside EG 4.1 environment

Hi,

In EG 4.1 I have created a histogram using Summary statistics.

Then I use ods htmlpanel to save the output to a file location on the
server.

Rest of the reports can be viewed opening the html file outside the EG
environment.

But Histogram greated being a .gif image is not openning.

How can I deal with this.

Note the hiostogram is visible in EG environment.


Thanks,
Nachiket
SAS Super FREQ
Posts: 8,814

Re: Reporting: Display .gif file outside EG 4.1 environment

Hi:
Any HTML-based tagset is just using an <IMG> to point to the location of the graphics file that you created. Therefore, -inside- EG, EG knows where the location of the image is (generally in a working directory). This means that your HTML files will be up on the server someplace and your GIF images will be someplace in C:\Documents and Settings or in an EG working location. And this is all OK -inside- EG.

However, for -outside- of the EG environment, you have to be sure that you put the GIF images on the server with the HTML files -- otherwise, you will see a red X in the output where the images should be, as described in this Tech Support Note:
http://support.sas.com/techsup/unotes/SN/012/012119.html

If you open your HTML file with a web browser (NOT through EG), then select View --> Source (which should pop open a Notepad window, so you can review the underlying HTML code) and then, search for the string SRC=, you should see the WRONG URL as the value for SRC=. You need to 1) put the images in the right directory on the server and 2) get ODS to build the correct SRC= attribute for the <IMG> tag.

The fix is to explicitly provide a PATH:
[pre]
ods html file="file.html" path="q:\reptdir" (url=none);
ods htmlpanel file="file.html" path="q:\reptdir" (url=none);
[/pre]
Just note that this syntax will cause the HTML file(s) and the graphic images created in your steps to be put in the SAME directory (q:\reptdir). The URL=NONE suboption tells ODS not to use any part of the physical path when it builds the URL for the <IMG> tag.

If your server folks want the graphic images to be in a subdirectory that's underneath q:\reptdir then you may need to use the GPATH option as well:
[pre]
ods html file="file.html" path="q:\reptdir" (url=none)
gpath="q:\reptdir\graphs" (url="\graphs");
[/pre]

Now, your TABULAR results would be put in q:\reptdir on the server, but the graphic images would be put into q:\reptdir\graphs and the IMG tag would be a "relative" URL:
[pre]
<IMG SRC="\graphs\GCHART1.gif" />
[/pre]

If your server machine is a web server machine, then you may need to use an absolute URL for any internal URLs that ODS builds. You may need to consult with your webmaster because q:\reptdir may be the physical location that you write to, but the URL for that physical location may be something like: http://www.wombat.com/main/reptdir. In which case, your webmaster may prefer that you use an absolute URL
[pre]
<IMG SRC="http://www.wombat.com/main/reptdir/graphs/GCHART1.gif" />
[/pre]
Which you can create like this:
[pre]
ods html file="file.html" path="q:\reptdir" (url=none)
gpath="q:\reptdir\graphs" (url="http://www.wombat.com/main/reptdir/graphs/");
[/pre]

At any rate, you might have to go through a bit of trial and error until you discover the right combination for the URL= option when used with PATH= and GPATH=. The easiest thing is to put the graphics and the HTML files all in the same directory on the server and use URL=NONE, however, the folks who maintain the servers (especially if they're web servers) may have an opinion about where graphics should be stored on the server.

For more help with this problem, you might consider contacting Tech Support.
cynthia
N/A
Posts: 0

Re: Reporting: Display .gif file outside EG 4.1 environment

Hi Cynthia,

It worked fine!!


Thanks,
Nachi
Ask a Question
Discussion stats
  • 2 replies
  • 110 views
  • 0 likes
  • 2 in conversation