Focal Point
[SOLVED] Embed images from a network drive version 8105

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

November 27, 2017, 06:07 PM
Joe Beydoun
[SOLVED] Embed images from a network drive version 8105
I had a procedure that used to work on v7703 now it does not.
This just embeds images from our network drive into a PDF/HTML output report.
Here's some sample code, I placed the image on the C: drive of the server, it displays the picture name with an APP QUERY command, but the image is not shown.

Thanks for the help.

APP MAP IMAGES C:\Users\wfadmin\pictures\
APP MAP IMAGES2 '\\networkdrive\Pictures\'

APP PREPENDPATH IMAGES
APP PREPENDPATH IMAGES2

APP QUERY IMAGES


DEFINE FILE CAR
IMAGEG/A20 = 'IMG_6083.jpg';
END
TABLE FILE CAR
SUM
IMAGEG AS '' NOPRINT
BY TYPE
WHERE TYPE EQ 'SEDAN';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
$
TYPE=HEADING, PRESERVERATIO=ON,
IMAGE=(IMAGEG),
POSITION=(6.200000 2.550000),
SIZE=(2.000000 1.000000),
$
ENDSTYLE
END

This message has been edited. Last edited by: Joe Beydoun,


version 8202M
Reporting Server on
Windows Server using DB2 Connect to access data from iseries.
November 28, 2017, 02:59 AM
Frans
What do you want to accomplish, just a image in the header / footer, or something that's related to data (TYPE in your example)?


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
November 28, 2017, 08:26 AM
BabakNYC
Is this report on the reporting server or in the WebFOCUS repository?


WebFOCUS 8206, Unix, Windows
November 28, 2017, 09:24 AM
Joe Beydoun
Sorry, I don't understand the difference between the reporting server and the WebFOCUS repository, I believe it's in the repository.

I'm just trying to get an image in the Header, the actual code reads an item number, concatenates a .jpg and dynamically attaches the image belonging to the query. I can't get an image to display through the style sheet.


version 8202M
Reporting Server on
Windows Server using DB2 Connect to access data from iseries.
November 28, 2017, 09:28 AM
BabakNYC
Does the image show in any other format? As a test could you see if the image displays in FORMAT HTML?


WebFOCUS 8206, Unix, Windows
November 28, 2017, 09:34 AM
Joe Beydoun
It does not display in HTML format.


version 8202M
Reporting Server on
Windows Server using DB2 Connect to access data from iseries.
November 28, 2017, 09:36 AM
Joe Beydoun
I have a feeling that the way the path is defined has changed from version 7703 to 8105.


version 8202M
Reporting Server on
Windows Server using DB2 Connect to access data from iseries.
November 28, 2017, 10:22 AM
BabakNYC
What if the image is in app path? For instance if you put the image in baseapp, will it show up?


WebFOCUS 8206, Unix, Windows
November 28, 2017, 10:42 AM
dbeagan
This works for me for PDF in 8.1.05. I had to add a HEADING to get it to work though.

APP MAP IMAGES C:\ibi\WebFOCUS81\ibi_html\javaassist\
APP PREPENDPATH images
APP QUERY images
 
DEFINE FILE CAR
IMAGEG/A20 = 'mrlogo.jpg';
END
TABLE FILE CAR
HEADING
" "
SUM
IMAGEG AS '' NOPRINT
BY TYPE
WHERE TYPE EQ 'SEDAN';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
$
TYPE=HEADING, PRESERVERATIO=ON,
IMAGE=(IMAGEG),
POSITION=(6.200000 2.550000),
SIZE=(2.000000 1.000000),
$
ENDSTYLE
END
  


It does not work for me when I change PDF to HTML in 8.1.05.


WebFOCUS 8.2.06
November 28, 2017, 12:49 PM
Hallway
ThE code below works for me in 8201M. It puts images in the heading, subheadings and the data fields.

You can read more here: http://infocenter.ibi.com/wf81...2Fsource%2FIMAGE.htm

APP MAP IMAGE D:\ibi\WebFOCUS81\webapps\webfocus\tools\portal\resources\images\
APP PREPENDPATH image
APP QUERY image

DEFINE FILE CAR
TRUCK/A50V='distribution_list_16.png';
FLAG/A50V = DECODE COUNTRY ( 'ENGLAND' 'language_english_uk_16.png' 'ITALY' 'language_italian_16.png' 
	'FRANCE' 'language_frenchstandard_16.png' 'JAPAN' 'language_japanese_16.png' 'W GERMANY' 'language_german_16.png' );
END

TABLE FILE CAR
PRINT TRUCK NOPRINT AND MODEL AS ''
BY COUNTRY NOPRINT AS '' 
BY FLAG AS ''
BY CAR AS ''
ON COUNTRY UNDER-LINE
ON COUNTRY SUBHEAD
"Cars produced in <ST.COUNTRY"
HEADING
"        <+0>Car Manufacturer Report"
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY ON
-**************************
-* Lines between asterisk lines required for BLOB image support 
-* for HTML and DHTML formats.
ON TABLE SET HTMLEMBEDIMG AUTO
-* Required to support IE8 with images larger than 32K
ON TABLE SET HTMLARCHIVE ON
-*Required for image positioning in subheads in HTML reports
ON TABLE SET HTMLCSS ON 
-**************************
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, FONT='CALIBRI', GRID=OFF, $
TYPE=HEADING, IMAGE=(TRUCK), $
TYPE=HEADING, SIZE = 16, STYLE = BOLD, $
TYPE=SUBHEAD, IMAGE=(FLAG), SIZE=(.50 .20), POSITION=(+2.5 +0), PRESERVERATIO=ON, $
TYPE=SUBHEAD, SIZE=14, STYLE=BOLD, $
TYPE=DATA, COLUMN=FLAG, IMAGE=(FLAG), SIZE=(.12 .12), PRESERVERATIO=ON, $
ENDSTYLE
END

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


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
November 28, 2017, 01:52 PM
Joe Beydoun
Thanks everyone.

My original code was missing parenthesis around the IMAGE in the style sheet and it was not kicking off an error until I used some of the code you supplied to simplify everything.

I think this used to work with the error in 7703 but not in 8105, but I don't have an old version to confirm.


version 8202M
Reporting Server on
Windows Server using DB2 Connect to access data from iseries.
November 28, 2017, 06:36 PM
Hallway
quote:
Originally posted by Joe Beydoun:

I think this used to work with the error in 7703 but not in 8105, but I don't have an old version to confirm.


That is one thing that you will notice is that there has been a lot of "code tightening" in WF8+


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs: