Use of Image Variables
Posted: Sun Apr 24, 2016 8:27 am
Hello,
I am attempting to place an image into a report that is generated dynamically within the local flex client (by another flex component).
Sti reports allows for the use of image type variables, so it seems that this the logical approach as it would allow the image data to be passed into the report directly.
To test the use of image variables I have setup a test that uses an encoded image string copied from another report:
1. Created a report (Report1) and added a static image to the report, then saved that report and grabbed the encoded image data from the <Image></Image> block in that report definition.
2. I've edited a blank report (Report2) and added an image type Variable called ImageVariable1 to the report.
3. I've then edited the Report2.mrt by hand, and added the base64 image string from Report1 to the ImageVariable1 image variable in Report2 (please see the resulting definition of this below).
4. I then re-opened Report2 in the designer, and added an image control to the report definition.
5. I then attempt to configure the 'Image/Image Data' property page of the image object by selecting the ImageVariable1 var from the 'Variables' list. This resulted in {ImageVariable1} appearing in the main configuration editing space.
6. When I save the Image property panel, back in design mode the image control shows 'Image Data: {ImageVariable1}' in the top left corner, but does not display the image (the light green background remains visible).
7. When I open the report in preview mode, nothing is shown in the location where the image is defined
If I could get this simple test working, I would then advance to using an image generated from the other component I mentioned earlier.
I'm wondering if I am using the correct approach, or if there is something else I should be doing instead?
Thank you,
Evan
<Variables count="1" isList="true">
<value>,ImageVariable1,ImageVariable1,System.Drawing.Image,iVBORw0KGgoAAAANSUhEUgAAAMEAAAAtCAIAAACYppgyAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAVISURBVHhe7ZnNax5VFMb9M9wIgks3gqv8BcGF
uyxFkICLbsxG0E0EXRQkFUEQ3oVCUYlUUdBsxAo2KqUtWgOKH61B+2ptTUys/aC+K5/Mc3K4OXPm
zkzuO8W3nh+XMucjd+4997l3Zt7eMwmCMkJDQSmhoaCU0FBQSmgoKCU0FJQSGgpKCQ0FpYSGglJC
Q0EpoaGglNBQUEpoKCglNBSUEhoKSgkNBaUcXkP3Hr/U1N7+8RoStnZvPPHy+iPPfdTU2E8w60xf
Q0dObTHh2ePnjGhMY1ow60xZQw+8Nf7j+m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XIMnX/ncCAiNoTooKEuDf1G7qsgj/X4xe53kC+FG607c
C4jRoADd9xgbRoIoVpoe8xsPoB99Vk+SAzCh+0w1E+COSEO+eox2EaVf7Cy9kl2G1dBr3/7F5Kdf
P2MEhMZQHTwysB6cmAFVM1uW5AvhRltrxyjSxN4Hi8dQCgaWnkxEYh5M6DVTPXUM6clEesmiV7LL
HTqHHjv2qREQGkNNoDS6xQkWz/0wAflCuNHW2jGKNLETsO91bHiOYGCuspngIhkV3WeKu+Bw0ucp
Tqy6cEEvWfRKdhlQQ/jC5/vQ2e+vGPWwsZ9WUDh3he4+ZnSmA2romdNSjqdGp4162BgNZp2hNPTQ
O/L70IdnfjbS0cZ+gllnEA3hKXb2973fqb/75c9Hn//YSEcb+wlmncNrKAhIaCgoJTQUlBIaCkoJ
DQWlhIaCUkJDQRmTyb+DOdQGxBcrRQAAAABJRU5ErkJggg==,False,False</value>
</Variables>
I am attempting to place an image into a report that is generated dynamically within the local flex client (by another flex component).
Sti reports allows for the use of image type variables, so it seems that this the logical approach as it would allow the image data to be passed into the report directly.
To test the use of image variables I have setup a test that uses an encoded image string copied from another report:
1. Created a report (Report1) and added a static image to the report, then saved that report and grabbed the encoded image data from the <Image></Image> block in that report definition.
2. I've edited a blank report (Report2) and added an image type Variable called ImageVariable1 to the report.
3. I've then edited the Report2.mrt by hand, and added the base64 image string from Report1 to the ImageVariable1 image variable in Report2 (please see the resulting definition of this below).
4. I then re-opened Report2 in the designer, and added an image control to the report definition.
5. I then attempt to configure the 'Image/Image Data' property page of the image object by selecting the ImageVariable1 var from the 'Variables' list. This resulted in {ImageVariable1} appearing in the main configuration editing space.
6. When I save the Image property panel, back in design mode the image control shows 'Image Data: {ImageVariable1}' in the top left corner, but does not display the image (the light green background remains visible).
7. When I open the report in preview mode, nothing is shown in the location where the image is defined
If I could get this simple test working, I would then advance to using an image generated from the other component I mentioned earlier.
I'm wondering if I am using the correct approach, or if there is something else I should be doing instead?
Thank you,
Evan
<Variables count="1" isList="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