Focal Point
[CLOSED] wf8 creating an URL for an existing PDF residinf in a MRE folder

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

August 03, 2013, 06:11 PM
Jay Potter
[CLOSED] wf8 creating an URL for an existing PDF residinf in a MRE folder
I want to drill to an existing PDF that was created outside of IB and placed within a MRE folder, for example, the Hidden Content folder.

Would it be something like? This obviously does work, but I think I am close.

http://servername:8080/WFC/Rep...port_Description.pdf

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
August 05, 2013, 11:10 AM
Doug
Jay, If that's where it resides, then it should work. Does it work if you use it directly?
August 05, 2013, 11:19 AM
Jay Potter
When I run my fex that calls the include from the application folder without a full path, it works. When I run it from the "Content/MRE" it does not. The application IS in the path.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
August 05, 2013, 04:22 PM
<MLerner>
Jay,

Based on your mentioning of the Hidden Content folder I assume you are on WebFOCUS 8. If so use the following code.

TYPE=DATA, COLUMN=N1, TARGET='_blank', FOCEXEC=IBFS:/WFC/Repository/bugs/mypdf.pdf, $

It is basically the same code as calling a report. If it was a HTML page you could even pass in variables.

Note: The UI does not support creation of this. I recommend you open a New Feature Request, but we are already on it.

Regards,
Matthew
August 05, 2013, 07:12 PM
Jay Potter
Thanks for the information. I will check it out.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
August 06, 2013, 07:29 AM
Jay Potter
I was able to get to the pdf document that way. But when it tries to open it, it says it is damaged and can not be repaired.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
August 06, 2013, 08:02 AM
<MLerner>
Jay,
According to my programming team we may have had a problem like this that has since been resolved. Can you open a case with support and provide them the PDF for us to try in house?

Thanks,
Matthew
August 06, 2013, 11:07 AM
j.gross
Am I missing something here? I was under the impression that, under release 8, IBI did away with storing MR objects in folders, and moved everything into a database.
August 07, 2013, 09:26 AM
<MLerner>
Jack,
It is in a database, but you still have a folder concept for organizing things. They are just not real folders.

Regards,
Matthew
September 25, 2013, 01:41 PM
Susan Trommer
quote:
=IBFS:/WFC/Repository/bugs/mypdf.pdf

First...I'll advise that there is a known problem (project 145944) open for WF8 with viewing PDF files (not created by WebFOCUS FORMAT PDF) uploaded to the WF8 repository. Only the TOC content of the PDF file (if there is a TOC) is displaying.

Next...Answer to your ? on the coding...
This takes a bit of detective work using Fiddler (or other Web debugger tool that traces URL calls) to see the URL that is sent from BIP to View the PDF that is uploaded. Once you have the URL that submitted the request the next step is to reference the Creating Reports with WebFOCUS Lang manual doc topic 'How to Link to a URL'.
The coding of the URL drilldown in Stylesheet code does not use the exact URL you obtained in Fiddler.
1. No HTML encoding
2. Parameters are specified separate from the URL

Syntax reference...
TYPE=type, [subtype], URL=url[(parameters ...)], [TARGET=frame,] [ALT ='description',] $

FEX example that you have to be signed on to WF8 and be authorized to run the FEX and view the PDF file referenced in the drilldown. The
PDF file used in example is the 8004 SNF Highlights doc.
TABLE FILE CAR
BY CAR.ORIGIN.COUNTRY
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=DATA, COLUMN=N1, TARGET='_blank', URL=/ibi_apps8004/views.bip? (BIP_REQUEST_TYPE='BIP_RUN' BIP_folder='IBFS:/WFC/Repository/Reports' BIP_item='8004snfhilit.pdf') , $
ENDSTYLE
END

As for -HTMLFORM... the HTML report could just be sent to HOLD HTMTABLE file and displayed. Again...you have to be signed on to WF8 and be authorized to run the FEX and view the PDF file referenced in the drilldown.
TABLE FILE CAR
BY CAR.ORIGIN.COUNTRY
ON TABLE HOLD AS DRILLPDF FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=DATA, COLUMN=N1, TARGET='_blank', URL=/ibi_apps8004/views.bip? (BIP_REQUEST_TYPE='BIP_RUN' BIP_folder='IBFS:/WFC/Repository/Reports' BIP_item='8004snfhilit.pdf' ) , $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN

!IBI.FIL.DRILLPDF;

-HTMLFORM END


Susan Trommer
Information Builders
September 25, 2013, 01:52 PM
Jay Potter
Thank you for your reply. I solved my problem by storing the external PDFs on a shared folder on my network. In your example you were showing a drilldown PDF. The PDFs that I was trying to use were not created by IB. They were created externaly for documentation and called from within the IB portal. I was hoping to save them within the IB environment. Storing them in a shared folder has satisfied my requirement.

Thank You again.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
September 25, 2013, 03:25 PM
Susan Trommer
Glad your all set.
I've been advised the URL to use should be a call to WFServlet. So here is revised examples and I also included the FOCEXEC= drilldown coding also on 2nd column in report.

TABLE FILE CAR
SUM RCOST
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=DATA, COLUMN=N1, TARGET='_blank', URL=/ibi_apps/WFServlet? (IBFS1_action='runItem' IBFS_path='IBFS:/WFC/Repository/Reports/8004snfhilit.pdf'), $
TYPE=DATA, COLUMN=N2, FOCEXEC=IBFS:/WFC/Repository/Reports/8004snfhilit.pdf, $
ENDSTYLE
END

-HTMLFORM example with same change:
TABLE FILE CAR
SUM RCOST
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=DATA, COLUMN=N1, TARGET='_blank', URL=/ibi_apps/WFServlet? (IBFS1_action='runItem' IBFS_path='IBFS:/WFC/Repository/Reports/8004snfhilit.pdf'), $
TYPE=DATA, COLUMN=N2, FOCEXEC=IBFS:/WFC/Repository/Reports/8004snfhilit.pdf, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN

!IBI.FIL.DRILLPDF;

-HTMLFORM END


Susan Trommer
Information Builders