** MAJOR PROBLEM ** with Dynamic images

I am try to develop a report to render TIF documents I have stored on disk. The approach I am trying is to write a class library that with a method that take a file path argument to a TIF file and page frame number, and will return base64 encoded JPG binary data for the report to render.

My RDL looks like:

<Image Name="image2">

<Sizing>AutoSize</Sizing>

<Left>2.125in</Left>

<MIMEType>image/jpeg</MIMEType>

<Top>2.625in</Top>

<ZIndex>1</ZIndex>

<Width>0.875in</Width>

<Source>Database</Source>

<Style />

<Height>0.75in</Height>

<Value>=MyImageHandler.ReportImageHandler.GetBase64JPEG()</Value>

</Image>

Unfortunately, it fails with error:

[rsInvalidExpressionDataType] The Value expression used in image ‘image2’ returned a data type that is not valid.

[rsInvalidDatabaseImage] The Value expression for the image ‘image2’ did not evaluate to an image.

I verified that my method is returning the proper string. Does SSRS support such an approach to rendering dynamic images Should I be doing it differently

Thanks!




Answer this question

** MAJOR PROBLEM ** with Dynamic images

  • Kamii47

    How did you verify that your custom code is indeed called correctly and you get the image payload back If you drop a textbox on that that report and set it to =MyImageHandler.ReportImageHandler.GetBase64JPEG() what does it show



  • BiBi MeiMei

    Yes. To clarify, I checked my custom code by rendering the base64 encoded string in a textbox and comparing it to the string in the RDL xml when I embed the image using the Report Designer. The strings are identical.



  • krymium

    I have a similar sample that you may want to have a look at (http://prologika.com/CS/files/folders/presentations/entry966.aspx).

  • Keith Vasilakes

    Check BOL for configuring the unattended account (http://msdn2.microsoft.com/en-us/library/ms156302.aspx).

  • sandyJ

    It looks like your solution uses an external web service to return the image. I tried that, but it didn't work due to permissions issues. Another post indicated that there is an IIS permissions bug, which prevents that solution from working for me. (I can't find the link to info about the bug now.)

    Do you have a solution based on class library loaded by the Report Server

    Thanks.



  • ** MAJOR PROBLEM ** with Dynamic images