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     Imbedded Graphics in a PDF.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Imbedded Graphics in a PDF.
 Login/Join
 
Member
posted
I am creating some KPI reports (From Existing Reports) that we currently create in HTML and EXL2k. When I try and save the report as a PDF I loose the graphics due to how they are inserted. Is there a way to get around this?

You can see here that I am imbedding the graphics by doing some HTML in the code.

TABLE FILE EXK0005B
PRINT
KPIDESCRIPTION AS 'KPI'
YRMTH AS 'As Of'
FAAB NOPRINT
FACUSTOMER AS 'Customer'
KPIGOAL/D6.2% AS 'Goal'
COMPUTE MAPE/D6.2% = ( 1 - ( FADIFF / FAACTQTY ) ) * 100;
COMPUTE WMAPE/D6.2% = ( 1 - ( DIFFCOST / ACTQTYCST ) ) * 100;
COMPUTE IMG/A180 = IF WMAPE GE MIN.KPIGOAL THEN '<img border="0" src="/approot/kpi/g1.gif">'
ELSE '<img border="0" src="/approot/kpi/r1.gif">';AS ' '
END


PROD: WF 7.1.3 on Win 2003/IIS 6/Self-Serve & MRE
TEST: We dont need no Stinking Test Server!
 
Posts: 16 | Registered: February 10, 2006Report This Post
Platinum Member
posted Hide Post
Hi Wilky,
Change src="/approot/kpi/g1.gif">
to
src="http://computer/approot/kpi/gl.gif"
See if that works for you.
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
 
Posts: 173 | Registered: November 16, 2005Report This Post
Expert
posted Hide Post
You cannot embed images in a PDF report using HTML - PDF and HTML are mutually exclusive. You have to use the WebFOCUS style-sheet to embed images in a PDF report.

Here is an example:
DEFINE FILE CAR
CIMG_ID/A20 = DECODE COUNTRY ('ENGLAND' 'excel_logo', 'FRANCE' 'graph_logo' 'JAPAN' 'html_logo' ELSE 'pdf_logo');
CIMG/A200   = CIMG_ID || '.gif';
END

TABLE FILE CAR
SUM
CIMG NOPRINT
SALES
BY COUNTRY NOPRINT
ON COUNTRY SUBHEAD
"<COUNTRY"

ON TABLE PCHOLD FORMAT PDF

ON TABLE SET STYLESHEET *
TYPE= SUBHEAD, IMAGE=(CIMG), SIZE=(0.2 0.2), $
END


The images have to be in an application folder 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
Member
posted Hide Post
The problem is that the graphic is being changed depending on the results of a calculation in the table command, and not simply based on a value in the table!

COMPUTE IMG/A180 =
IF WMAPE GE MIN.KPIGOAL THEN
'<img border="0" src="/approot/kpi/g1.gif">'
ELSE
'<img border="0" src="/approot/kpi/r1.gif">';AS ' '


PROD: WF 7.1.3 on Win 2003/IIS 6/Self-Serve & MRE
TEST: We dont need no Stinking Test Server!
 
Posts: 16 | Registered: February 10, 2006Report This Post
Platinum Member
posted Hide Post
Francis is right. Not sure how I didn't realize it was PDF sice it says PDF in heading AND content :-)


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
 
Posts: 173 | Registered: November 16, 2005Report This Post
Virtuoso
posted Hide Post
Wilky,

Currently you cannot dynamically place an image in a DATA column on a report. The technique, which is demonstrated by Marcy Miller Tate in her Dashboard Razzle Dazzle presentation, uses the NOPRINT command on all columns and then includes all columns in a SUBFOOT/SUBHEAD. You can then place an image dynamiclly in the SUBFOOT/SUBHEAD.

Here's and example using the CAR FILE:

I COMPUTE a blank field the does not have the NOPRINT so I can shrink the space between SUBFOOT lines.

There should be 3 spaces before <MSGTXT> in the SUBFOOT.

TABLE FILE CAR
SUM RCOST NOPRINT DCOST NOPRINT
COMPUTE BLANK/A1=''; AS ''
COMPUTE MSGTXT/A20=
IF (RCOST LT 10000) THEN 'This is a Cheap Car!'
ELSE 'This Costs Too Much!'; NOPRINT
BY COUNTRY NOPRINT
BY CAR NOPRINT
ON CAR SUBFOOT
"<COUNTRY><CAR><RCOST><DCOST> <MSGTXT>"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, BORDER=OFF,$
TYPE=DATA, SIZE=1, TOPGAP=0.01, BOTTOMGAP=0.01,$
TYPE=SUBFOOT, TOPGAP=0.01, BOTTOMGAP=0.02,$
TYPE=SUBFOOT, IMAGE=&APPROOT/IBINCCEN/IMAGES/Y_ARROW.GIF,
POSITION=(4.90 0.075), SIZE=(0.10 0.10), WHEN=RCOST LT 10000,$
TYPE=SUBFOOT, IMAGE=&APPROOT/IBINCCEN/IMAGES/R_ARROW.GIF,
POSITION=(4.90 0.075), SIZE=(0.10 0.10), WHEN=RCOST GE 10000,$
END


Thanks!

Mickey

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

Just to clarify the examples that you have been given, using the WHEN clause in the STYLESHEET on the COMPUTE field will allow you to change the image in the SUBHEAD/SUBFOOT dynamically. The samples posted by myself and Francis do not show using a COMPUTE field but you can use the COMPUTE field as the condition in the WHEN clause.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
you can definitely put images as data items in rows of a pdf report.
there's a better way, i just can't find it at the moment. but in this one way, the '.GIF' is optional, if you leave it out, it looks for an 'england.GIF'
If you want to change it to .JPG, you can.

DEFINE FILE CAR
FLAG/A100=DECODE COUNTRY('ENGLAND' '\\localhost\images\england.GIF'
'FRANCE' '\\localhost\images\france.GIF'
'W GERMANY' '\\localhost\images\germany.GIF'
'ITALY' '\\localhost\images\italy.GIF'
'JAPAN' '\\localhost\images\japan.GIF');

END
-RUN
TABLE FILE CAR
SUM RCOST
DCOST
BY COUNTRY BY FLAG
BY CAR
BY MODEL
HEADING
"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *

TYPE=REPORT, IMAGE=c:\ibi\apps\ibisamp\IWCPOWER.GIF, POSITION=(0 0), $
type=data, column=flag, image=(flag), size=(.5 .25), preserveratio=on,$
ENDSTYLE
END
oh, and this 'size=' can't take a wild card for one of the measures, go figure. so the 'preserve ratio' thing is important.
Youll have to go to google images and look up some country maps and save them, but you knew that, right?

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




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     Imbedded Graphics in a PDF.

Copyright © 1996-2020 Information Builders