Hello,
I have Apex 3.1 application showing an image in a report.
The images are held as files on the web server and filename and description held in a database table
I can use SQL to retrieve the data into report columns and then HTML expression to display the image as a fixed size as shown below. This works fine for landscape pictures but obviously distorts portrait ones.
I wanted to check the orientation of the image and adjust width and height if portrait. I was considering using javascript to get image.height and image.width but am not sure how to reference the column and feed back into the HTML expression.
Is this this the best approach and any help how to reference the column would be appreciated
Many thanks
Colin
The Report Region Source is -
select "PHOTOFILE"."FNAME" as "FNAME" ,
"PHOTOFILE"."ID" as "ID",
"PHOTOFILE"."DESCRIPTION" as "DESCRIPTION",
"PHOTOFILE"."FNAME" as "IMG2"
from "PHOTOFILE" "PHOTOFILE"
where id=:P4_IMAGE_ID
Column Attributes IMG2
Column Formatting
HTML Expression
<B><I><U><font face="verdana size="16"><center> #DESCRIPTION# </I></U>
<font face="verdana size="20">&P4_DESCRIPTION.
</B></center></font>
<br/>
<img src="#IMG2#" width=600 height=400 >