Hi Tim
The image can be show in preview for added below code on the image on create with dynamic image and just only input '' in the dynamic image expression
importPackage(Packages.java.io);
importPackage(Packages.java.lang);
var file = new File(row["urlname"] );
var ist = new FileInputStream(file);
var lengthi = file.length();
bytesa = new ByteArrayOutputStream( lengthi);
var c;
while((c=ist.read()) != -1){
bytesa.write(c);
}
ist.close();
this.data = bytesa.toByteArray();
Regards,
Jason
------------------------------
Jason Pun
Technical Consulant
Lexco
(852) 2332 3262
------------------------------
Original Message:
Sent: Mon May 08, 2023 11:44 AM
From: Tim Ferrill
Subject: Birt Report with secured attachment
Daniel,
One simple option is to reference the local file path (from the context of the server) rather than the URL (using docinfo.urlname
). The major limitation to this option is that it doesn't support the browser view, only the PDF version of the report.
If this report is something that is run via Direct Print or scheduled this is probably your quickest path to success.
------------------------------
Tim Ferrill
Solutions Consultant
Intelligent Technology Solutions
tferrill@webuildits.com
www.webuildits.com
@tferrill/@webuildits
Original Message:
Sent: Sat May 06, 2023 12:24 AM
From: Daniel Leung
Subject: Birt Report with secured attachment
Hello Everyone,
I need to create a custom Birt report for the work order. The attachment (photos) is required to display in the specific section in the report and secured attachment is enabled. Is there any way to get the secured attachment url? Or how could I display it in the report?
Thanks in advance.
------------------------------
Daniel Leung
------------------------------