I’m pretty new to Jasper ReportStudio and am creating numerous reports using this fabulous tool.
Right now I’m in the process of creating a report that will include images imported from a web server via HTTP
The image ID is in the format of an integer and is stored on a MySQL server combined with its date
eg
ID DATE
136347339 2016-06-11 09:19:05
The url is created using the following function in ASP.NET
function getAutoGeneratedImageFile(sightingid, seperator)
dim f, n, p
f = “”
for n = 0 to 7 'Eight bytes in a long int (each byte will be used as a folder name)
p = cdbl(sightingid) mod 256 'Due to the possible large scale of the uid, we have to use these functions
f = seperator & p & f
sightingid = sightingid \ 256
next
f = f & “.jpg”
getAutoGeneratedImageFile = f
end function
URL generated ends up in the form
HTTP://Imageserver/images/0/0/0/0/8/32/126/203.jpg
Can anyone help me out with adding a function in Jasper to create the URL and insert the image?
Regards,
John