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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Image working for html but not for pdf

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Image working for html but not for pdf
 Login/Join
 
Silver Member
posted
TABLE FILE CAR
PRINT
'CAR.ORIGIN.COUNTRY'
'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL' NOPRINT
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
LINES-PER-PAGE=20,
$
TYPE=REPORT,
IMAGE=app/alogo.gif,
POSITION=(+0.000000 +0.000000),
SIZE=(2.000000 0.500000),
$
ENDSTYLE
END


The above code is generationg output for the format HTML ..But if i change the format to "PDF" it giving me this error :
(FOC3251) IMAGE FILE UNREADABLE OR INVALID: alogo.gif

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


7.7.02, sql server
Windows
all output (Excel, HTML, PDF)
 
Posts: 38 | Registered: April 26, 2010Report This Post
Expert
posted Hide Post
The image must be in an Application Folder for PDF reports. And leave out the '/app'.


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
Expert
posted Hide Post
Francis is right, for an HTML report, the image must be available to the Webserver, but with PDF must be available to the WebFOCUS server.

When the HTML report is generated, a link to the image is created, and put in the HTML.

For the PDF report, WebFOCUS needs to include the image in the PDF document, therefore the image must be available in the path specified.

APP SHOWPATH will show you the path currently set.

WHENCE will show you if a file is in the current path.

e.g.WHENCE myimage GIF|JPEG


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Waz, thanks for taking the time to explain.


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
Expert
posted Hide Post
I think that it is important to understand why it has to be done this way.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Yeah, good one Waz!

I think the product documentation might do a better job at explaining the difference as its examples assume that both the Web Server and Reporting Server run in the same box and therefore any of them have access to the same image files. Reality check happens when both components live in different boxes and then is when the difference in access methods can be appreciated. Summarising what Waz previously explained:

HTML -> Produces a tag with a URL pointing to the image location which must be accessible to the webserver via HTTP (could indeed be a file hosted anywhere in the internet as long as the web server can see it).

PDF -> Document is "built" by the Reporting Server and later sent to the client, therefore image files must be available in an APP PATH visible to the reporting server because it is there where the PDF document is "assembled" including the image(s).

Prasad, if you want to use the very same physical file for HTML and PDF reports even when the web server and reporting server live in different boxes, you can attempt do the following although I am not suggesting that you use this technique in your Production environment; it could just be something you'd want to play with to better understand the concept:

Create an application directory in the reporting server where you'll keep your images and add it to your APP PATH. This way you can produce PDF documents with embedded images. Let's assume you call that directory "app_images" and that you want to include my_image.gif image file in a PDF report. Your stylesheet would look like:

APP PATH APPEND app_images  <- This is just to remind you that app_images must be "visible"
TABLE FILE blah
...
ON TABLE PCHOLD FORMAT PDF
...
TYPE=..., IMAGE=my_image.gif, $  <- This file is visible to the rpt. server via APP PATH


When it comes to HTML documents, you can still use a URL to reference the image located in "app_images" by using the Reporting Server's HTTP listener as follows:

TABLE FILE blah
...
ON TABLE PCHOLD FORMAT HTML
...
TYPE=.., IMAGE=http://rep_server_host:8120/approot/app_images/my_image.gif,$  <- URL to the image file in the rpt. server


The example above assumes that EDASERVE (or whatever name your node uses) is installed in the "rep_server_host" box and is listening on port 8120.

This is just an example and does not elaborate on specific security restrictions/best practices you may have implemented in you site.

- Neftali.

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
Thats well explained Neftali!!!!


WebFocus7.6.2, WebFocus 7.1.1,Windows
HTML, PDF and Excel
 
Posts: 71 | Registered: June 30, 2009Report This Post
Silver Member
posted Hide Post
Thank You vey much... It really solved my problem...


7.7.02, sql server
Windows
all output (Excel, HTML, PDF)
 
Posts: 38 | Registered: April 26, 2010Report This Post
Expert
posted Hide Post
Rated


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
quote:
WHENCE will show you if a file is in the current path.


Nice! I did not know about that command Waz. It would have helped me a lot before when I was dealing with certain issues we had in an environment with multiple profiles and disparate application paths. Well, it's never too late and I will certainly find opportunities to use it from now on so I guess it's time to go back to the "playground".

Thanks much Waz Smiler



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
It was thanks to this forum that I found out about it.

I think it was Tony A. Good One


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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] Image working for html but not for pdf

Copyright © 1996-2020 Information Builders