We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

rdlc image source from database didn't show up

Thread ID:

Created:

Updated:

Platform:

Replies:

128870 Feb 13,2017 12:51 PM Feb 15,2017 04:44 AM ASP.NET MVC 4
loading
Tags: ReportViewer
Edwin Kurniawan
Asked On February 13, 2017 12:51 PM

I'm using essential studio ver 14.4.0.15 and i'm having a rough time to show image from database in a rdlc report
Image was retrieve from database as byte[] and in rdlc report designer, the image's source is already set to database, value has been set to corresponding field, mimetype is set to image/png

When i preview the report, the image url is showing [400] bad request
(e.g.: "/api/ReportApi/GetResource/?key=2327C707-BFBD-DB37-BC99-70A616AA88FA^viewer_Signature_f8456b12-2e13-498b-8e02-0009f414e8b4&resourcetype=sfimg&isPrint=null").
Because the [isPrint] parameter has null value, i tried to change the value to false with developer tool, not getting [400] bad request anymore, but it showing white blank image instead

Working fine when i'm using an image as embedded resource (but it can't solve my prob)

Please help.


Best regard,


Edwin

Edwin Kurniawan
Replied On February 13, 2017 10:32 PM

Other sample that showing image from database on rdlc ejreportviewer that i've downloaded was using syncfusion ver 13.xx which are working fine.
Can't really figure out what is wrong other than miscode in the dll ver 14.4.0.15

Yuvaraj Devarajan [Syncfusion]
Replied On February 14, 2017 01:58 AM

Hi Edwin, 

Thanks for contacting Syncfusion support.  

We were unable to reproduce the mentioned issue at our end. We have checked the report RDLC file by loading the image from dataset with 14.4.0.15 build assembly version and it working properly at our end. The mentioned issue might occurred when the image source is specified as embedded image in property window while passing the image value from datasource. So we request you to ensure that the image source, Field value and MIME type are specified correctly in image property when passing the image value from datasource field as shown in below screenshot, 

 

For your reference, we have prepared a sample and it can be downloaded from,  

If the issue still persists, then share the issue reproducible RDLC file and image byte value to validate the mentioned issue at our end. 

Regards,  
Yuvaraj D.   


Edwin Kurniawan
Replied On February 14, 2017 05:18 AM

I figure it out, my datasource's image datatype is byte[],
but in the sample, the datasource's image data type is string.

I have tried to convert from byte[] to base64 string -> Convert.ToBase64String(byte[] ...) before too,
but in the rdlc image field value, i converted it back base on this stackoverflow answer
=System.Convert.FromBase64String(Parameters!<sparamname>.Value)and it didn't work.

Then i look again at your sample, it appear that there was no need to do convert back from the base64string for the rdlc image field value and finally got it works
I can't find any information about this before though.

Thanks Yuvaraj Devarajan.

Oh and one more issue that i've found, some image are having isPrint=null property in the image src.
Apparently, only happened to image with parent tablix inside tablix


Best Regard,

Edwin.

Yuvaraj Devarajan [Syncfusion]
Replied On February 15, 2017 04:44 AM

Hi Edwin, 

We were unable to reproduce the mentioned issue at our end. We have tested the Report by placing the image report item inside the Tablix report item and in image URL “isPrint” value is rendered as false as in below screenshot.  

 

For your reference, we have prepared a sample and it can be downloaded from, 

If the issue still persists, then revert the sample with issue reproducible procedure to validate the mentioned issue at our end. 

Regards, 
Yuvaraj D. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;