Hi,
can I populate image on report via report variables?
Idea is to define var on the report and before rendering set values for those variables, so report to display them.
Is it possible ?
What type of variables should be (String, Image, ...) ?
How to set source for image field on the report ?
Thank you for great job, reports are awesome.
Images via variables
Re: Images via variables
Hello.
Yes, it;s possible.
You could use Image Data property.
Do you have any difficulties with it?
Thank you.
Yes, it;s possible.
You could use Image Data property.
Do you have any difficulties with it?
Thank you.
Re: Images via variables
Hi,
this question pop up again.
I need to use images on the report. I can not use url to image resource, because it called for every report page (no caching).
The only option I have is to create report variable and populate it before the actual report rendering.
My questions:
1. What type of variable on the report it should be? (String or Image) I am going to use this variable as a value for the "Image Data" of Image component.
2. How I can populate its content?
Currently I do the following (this is not exact code but idea of what I do):
Please advise what I do wrong. All described above does not work. Image is blank.
Best regards. Summer is coming (not for me wrong semisphere)
this question pop up again.
I need to use images on the report. I can not use url to image resource, because it called for every report page (no caching).
The only option I have is to create report variable and populate it before the actual report rendering.
My questions:
1. What type of variable on the report it should be? (String or Image) I am going to use this variable as a value for the "Image Data" of Image component.
2. How I can populate its content?
Currently I do the following (this is not exact code but idea of what I do):
Code: Select all
var content:String = StiTypeConverter.byteArrayToBase64(byteArrayContent);
....
stiReport.dictionary.variables[...].valueObject = content;
Best regards. Summer is coming (not for me wrong semisphere)
Re: Images via variables
Hello.
It's possible to use JPEG or PNG images only.
Here is your code with some corrections:
Thank you.
It's possible to use JPEG or PNG images only.
Here is your code with some corrections:
Code: Select all
var png: PNGEncoder = new PNGEncoder();
var bytes: ByteArray = png.encode(bitmapData); // byteArrayContent in your case, should be BitmapData
var content:String = StiTypeConverter.byteArrayToBase64(bytes);
....
stiReport.dictionary.variables[...].valueObject = content;