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     [SOLVED] Inserting images in PDF report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Inserting images in PDF report
 Login/Join
 
Gold member
posted
I have a column in my file which contains the "name of the image file" which I want to insert in my PDF report. I do have the base URL too.
I want the corresponding image to be displayed in the report based on the column value.
Eg-
my file has data as follows:

Fld name 1 Field name 2
A11111 attachment name 1
A11112 attachment name 2

Base URL is "\\XXXXXX\XX"

My report should look like as follows:
A11111 Image displayed for attachment name1


A11112 Image displayed for attachment name2


Can anybody help?

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


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report This Post
Virtuoso
posted Hide Post
Images in PDF can only be displayed as part of the heading if you wish to include it in the report request. The other possibility is to include them through a compound report. But I don't think you will want it that way.
You can have more than one image inserted in the heading, and you can position and size it. But it has to be in the heading of the report.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
I searched FocalPoint for "PDF IMAGE DATA" and one of the results was Image in row of a PDF report, a very clever technique by Darin Lee, PDF guru. So you CAN insert images in a data row of a PDF report! (I've tried it and it works beautifully).


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
Gold member
posted Hide Post
Francis,
I think I am real close but not getting the image displayed on the report.
Attaching the chunk of code I am using for this purpose:

-DEFAULT &FORMAT = 'PDF'
-DEFAULT &DISTRIBUTION = 'EMAIL'
-SET &BASEURL = '\\XXXXXX\XXXX\'


DEFINE FILE ABCD
IMAGE1 /A300 =
IF ATTACHMENT_LINK LIKE '%.JPG'
OR '%.jpg'
OR '%.PNG'
OR '%.png'
OR '%.GIF'
OR '%.gif'
THEN '&BASEURL' | ATTACHMENT_LINK
ELSE '' ;
END

TABLE FILE ABCD
PRINT
FLD1 AS 'FLD1'
ATTACHMENT_NAME AS 'ATTACHMENT NAME'
IMAGE1 AS 'ATTACHMENT'

BY BURST_VALUE NOPRINT
BY SOME OTHER FIELD NOPRINT
BY FLD1 NOPRINT
BY ATTACHMENT_LINK NOPRINT
ON ATTACHMENT_LINK SUBFOOT
" "
" "
WHEN ATTACHMENT_LINK LIKE '%.JPG' OR '%.jpg' OR '%.PNG' OR '%.png' OR
'%.GIF' OR '%.gif';
ON TABLE FOOTING
" "
" "
ON TABLE SET HTMLCSS ON
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
TYPE=REPORT,
TITLETEXT='MY REPORT',
SQUEEZE=ON,
WRAP=OFF,
FONT=ARIAL,
SIZE=10,
$
TYPE=TITLE,SIZE=10,FONT=ARIAL,
JUSTIFY=CENTER,
COLOR=NAVY,BACKCOLOR=NONE,STYLE=BOLD+UNDERLINE,
$
TYPE=DATA,COLUMN=N7,IMAGE=(IMAGE1),SIZE=(5.0 2.5),$
ENDSTYLE

ON TABLE PCHOLD FORMAT &FORMAT

END
-RUN

Please let me know if I am making any mistake in the code.


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report This Post
Expert
posted Hide Post
The image MUST be in an App folder that is in the APPPATH.


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
Gold member
posted Hide Post
I don't know anything about App folder or APPPATH. My requirement is to fetch the image from a network folder. Can I do so?


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report This Post
Gold member
posted Hide Post
Hi Francis,
Please let me a bit more about App folder and APPPATH.
Thanks!


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report This Post
Expert
posted Hide Post
How about searching IBI Documentation?

Creating Reports With WebFOCUS Language > Laying Out the Report Page > Adding an Image to a Report

Displaying the Current Search Path

Developing Reporting Applications > Creating and Working With Applications > Managing Applications and Paths in the Data Management Console


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
BASEURL is irrelevant when creating a PDF document. As Francis states, all the images that are used must be in your server path. You can get more info about that from the links he kindly posted.

Additionally, going from your profile which states you are using WF on z/OS, all references to locations must be made in context of the WF server. So a location of "\\XXXXXX\XXXX\" would be meaningless to a z/OS server. You're probably going to have to move your images to a location that can be referenced by your WF server to get what you want.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Gold member
posted Hide Post
Thanks Francis and Darin!!
I am looking into the links to find the solution.
But, I would like to state here that the code works for Excel report and the images gets inserted into the report!!


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report This Post
Virtuoso
posted Hide Post
Right. It will work for Excel and HTML output, but it will not work for PDF output. PDF output has its own rules.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report 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     [SOLVED] Inserting images in PDF report

Copyright © 1996-2020 Information Builders