Hi
I have a combination of images/pdf that I need to display in a cards template of a classic report. I followed Joel R Kallmans 'Lets Wreck it together' blog (does not let me post links) and everything is working fine if all pics are either an image or a pdf but when its a combination, it breaks. I am displaying the picture in the html expression of CARD_TEXT
For images-
<img src="f?p=&APP_ID.:0:&SESSION.:APPLICATION_PROCESS=get_image_source:NO::G_ID:#ID#:" width="100%" height="10%"></img>
for pdfs:
<embed src="f?p=&APP_ID.:0:&SESSION.:APPLICATION_PROCESS=get_image_source:NO::G_ID:#ID#:" width="100%" height="10%">
To be able to do this I tweeked the select of the report as follows-
select apex_util.prepare_url('"f?p=&APP_ID.:0:&SESSION.:APPLICATION_PROCESS=get_image_source:NO::G_ID:"'||&P10_ID.||':')card_text
, null card_link
, null card_title
, null card_subtext
, mime_type
, decode(mime_type, 'application/pdf', '<embed src=', '<img src=' ) tag1
, decode(mime_type, 'application/pdf','width="400" height="300" type="application/pdf">','width="50%" alt="click to download"></img>')tag2
from <table>
And in the html expression I say #TAG1##CARD_TEXT##TAG2# and escape special characters selected to YES.
However it just displays the html expression as is in the card region as shown in pic. Atleast the rendering looks correct in that I have 2 images and 1 pdf and it assigns the img and embed tag appropriately but shows the expression as is instead of the actual image. How can do conditional rendering for images/pdfs and be able to display picture?
Appreciate your help!
Thanks