Nick
Nick

Reputation: 500

How do you modify SQL Server report embedded image file

I have a SQL Server 2008 R2 report that has an embedded image file. When I open the .rdl, part of the XML looks like this:

<ReportSections>
<ReportSection>
  <Body>
    <ReportItems>
      <Image Name="Image1">
        <Source>Embedded</Source>
        <Value>LetterHead4</Value>
        <Sizing>FitProportional</Sizing>
        <Height>1.57292in</Height>
        <Width>7.47918in</Width>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
        </Style>
      </Image>

My DBA's have left and I don't know how to find this file to modify and replace. Googled it but doesn't say how to retrieve and put back the file. Is this file on a server? How do I find the physical file? How do I replace after modification? Any suggestions much appreciated.

Thanks community

Nick

Upvotes: 0

Views: 2012

Answers (1)

Ross Bush
Ross Bush

Reputation: 15175

An embedded image will be included in the .rdl file as a binary resource and you can usually see this at the very bottom of your .rdl file when you view source. You should be able to load the report in the ide and view the image.

The ImageData in the Embedded image is base64 of the image. So you would need to convert from base64 string to the proper format. See this link for an tool this guy made to do just that. The link in at the top of the article.

Upvotes: 1

Related Questions