Page 1 of 1
Loading Images from XML
Posted: Fri Dec 12, 2014 10:04 am
by anerling
Hello Community,
I have a question about loading images from a XML data. The images are encoded in base64. Is there any possibility loading that images by the reportgenerator ? The problem is the StiMvcMobileViewer.GetReportSnapshotResult raises an exception because it could not convert the base64 string into an System.Drawing.Image.
Do you have an idea solving that problem ?
Yours sincerely
ANerling
Re: Loading Images from XML
Posted: Fri Dec 12, 2014 1:09 pm
by HighAley
Hello, ANerling.
anerling wrote:I have a question about loading images from a XML data. The images are encoded in base64. Is there any possibility loading that images by the reportgenerator ? The problem is the StiMvcMobileViewer.GetReportSnapshotResult raises an exception because it could not convert the base64 string into an System.Drawing.Image.
Do you have an idea solving that problem ?
What type is used for this column?
Here is a description from the XML Scheme of our Demo XML data:
Code: Select all
<xs:element name="Picture" type="xs:base64Binary" minOccurs="0" />
Thank you.
Re: Loading Images from XML
Posted: Fri Dec 12, 2014 2:21 pm
by anerling
My XML Scheme contains base64 as string:
Code: Select all
<?xml version="1.0" standalone="yes"?>
<Report>
<ImageList Quantity="2">
<Image Content="/9j/4AAQSkZJRg"/>
<Image Content="/9j/4AAQSkZJRg"/>
</ImageList>
</Report>
Code: Select all
<xs:attribute name="image" type="xs:string" />
Re: Loading Images from XML
Posted: Mon Dec 15, 2014 11:33 am
by HighAley
Hello.
The type should be type="xs:base64Binary".
Our you should change the Type of the Column in Dictionary to byte[].
Thank you.
Re: Loading Images from XML
Posted: Mon Dec 15, 2014 1:28 pm
by anerling
I solved the problem.
I forgot to delete the path of the xsd in the template.
Thank you for your help.
Re: Loading Images from XML
Posted: Mon Dec 15, 2014 2:03 pm
by HighAley
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.