cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to display Base 64 PNG images from a database

Hello,

 

I have created a Power App which has a signature field. I want to be able to bring the signature image into the Report Builder.

 

The image is in Base64 format stored on Sharepoint. I have created a Power BI report and used this as my datasource for report builder. I successfully displayed the signature image in a Power BI table in this format but cannot bring it into the Report Builder. Here is an example of the binary image.

 

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV4AAACWCAYAAACW5+B3AAAEyklEQVR4Xu3UwQkAAAgDMbv/0m ...

 

Settings used when inserting the image:

 

I have selected the image source as -  'Database'

 

Use this field -  '=First(Fields!Delivery_Signature.Value, "DataSet")' 

 

Use this MIME type - 'image/png.'

 

When I run the report the image is only shown as a red 'x' in the top left hand corner.

 

Any help would be greatly appreciated. Thank you

1 ACCEPTED SOLUTION

I have double check with my data. Actually you don't need to convert it. What I realized is this portion "data:image/png;base64," or similar definition is not exist in my data. May be removing this part from data will solve your problem.

 

=Replace(First(Fields!Delivery_Signature.Value, "DataSet"),"data:image/png;base64,","")

View solution in original post

5 REPLIES 5
Markzolotoy
Impactful Individual
Impactful Individual

Can you please provide detail about the data source you are using in your paginated report?

saglamtimur
Resolver II
Resolver II

Try converting it like;

 

=Convert.FromBase64String(Fields!Delivery_Signature.Value)

 

Anonymous
Not applicable

I used the suggested formula with an aggregate function but the image is not displaying. Is there something wrong with the formula I used?

 

=First(Convert.FromBase64String(Fields!Delivery_Signature.Value),"DataSet")

 

Francis4268_1-1592989033442.png

 

 

I have double check with my data. Actually you don't need to convert it. What I realized is this portion "data:image/png;base64," or similar definition is not exist in my data. May be removing this part from data will solve your problem.

 

=Replace(First(Fields!Delivery_Signature.Value, "DataSet"),"data:image/png;base64,","")

Anonymous
Not applicable

I removed the prefix 'data:image/png;base64,' from the Power BI Datasource and it is working.

 

I presume the option choose 'MIME type' reomves the need for the prefix in the binary image where Power BI will automatically select the image type.

 

Thanks for the help.

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors