Focal Point
[SOLVED] Drilling or Linking to do a PDF Document

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

June 22, 2006, 08:47 PM
Nailzz
[SOLVED] Drilling or Linking to do a PDF Document
I have create a report that I want to drill down or link to a PDF document. I have save the document in a netshared location and want the user to be able to click on the heading or a column an it open a PDF document. Can anyone help me? I have done this using a URL with a html format, but it does not work the same for a pdf document.

Appreciate any help.

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


WebFOCUS 7.1.3 on Win 2000
June 23, 2006, 12:56 AM
venu
Well we have also faced the same problem and it is very annoying because it always seems to take the relative URL for file links and more over back slashes seems to vanish when we look at the short cut generated in PDF.
I assume that your link field reads some thing like
\\servername\folder1\folder2\file.pdf

After lots of trail and error found that if we specify URL on a fileURL field which reads
file:////servername/folder1/folder2/file.ext it works for PDF O/P. Looks weird but it did the trick for us! Here is the sample code we used. Good luck!

TABLE FILE TABLEX
PRINT
URL_FIELD
COMPUTE PDF_URL/A262='file://' | STRREP(255,URL_FIELD,1,'\',1,'/',255,'A255'); NOPRINT
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
GRID = OFF,
PAGESIZE='A4',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=DATA,
COLUMN=N1,
URL=(N2),
$
ENDSTYLE
END
June 23, 2006, 08:06 AM
Nailzz
Thanks, Venu I will give this a try and let you know.


WebFOCUS 7.1.3 on Win 2000
June 23, 2006, 09:29 AM
Nailzz
Thanks Venu, at first this didn't work. I used instead of the url_field, just the URL and instead of HTTP:\\ substituted for file:\\, now it works like a charm. Thanks for responding.


WebFOCUS 7.1.3 on Win 2000
November 28, 2008, 01:16 PM
Hua
I know this is an old post, but I still want to thank you(Venu) for this helpful tip.

Does anyone know why the backslashes gets dropped?


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
November 28, 2008, 01:45 PM
FortuneCookie
I think the first slash let's the system know there's a special character coming hence if you need

1 slash //
2 slashes ////