Displaying picture with base64 string input

Posted by: korbif on 2 May 2023, 7:24 pm EST

    • Post Options:
    • Link

    Posted 2 May 2023, 7:24 pm EST

    Hello together,

    we want to display a picture in the reports based on base64 string data.

    As far as i know, it is only supported to integrate a picture by using a relative path to the file location on the harddrive or an Expression.

    None of the currently available options is suitable for us.

    Is it possible to embed the base64 string in the XML? In the previous report version it was possible to use it.

    Thank you very much in advance

    Korbinian

  • Posted 3 May 2023, 8:42 pm EST

    Hi Korbinian,

    You can add a base64 image string to the tag inside the tag of an tag the Field section of your flexreport’s xml code.

    To add a base64-encoded image to your flexreport, you can use the following code structure:

    <ImageField>
    			<Name>demoImg</Name>
    			<Section>Detail</Section>
    			<Left>576</Left>
    			<Top>190</Top>
    			<Width>3000</Width>
    			<Height>4000</Height>
    			<PictureAlign>CenterTop</PictureAlign>
    			<Picture>
    				<Image> <!--Base64 string--></Image>
    			</Picture>
    		</ImageField>

    To add your own image, simply replace the inside the Image tag with your own base64-encoded image string. This will embed the image directly in your flexreport.

    We have created sample applications for you using the latest .NET Framework and .NET6 APIs of the Flexreport control for your reference. Please check:

    Please let us know if you have any further concerns.

    Thanks & Regards,

    Aastha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels