<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot display image in report builder from byte array or hex string in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1930520#M19944</link>
    <description>&lt;P&gt;Thank you for your reply.&amp;nbsp; but my byte array is saved as varchar(max) in database, it is a string with byte array value. is it still ok for report builder to visualize it?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jun 2021 10:18:33 GMT</pubDate>
    <dc:creator>Tengmin123</dc:creator>
    <dc:date>2021-06-30T10:18:33Z</dc:date>
    <item>
      <title>Cannot display image in report builder from byte array or hex string</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1919489#M19863</link>
      <description>&lt;P&gt;Hi, all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a byte array (image) in json format in sql db. I extract the image out and also in json format. my query is:&lt;/P&gt;&lt;P&gt;SELECT thumbNail&amp;nbsp;FROM Table&lt;BR /&gt;cross apply openjson(CMD_LIST,'$.queueMessagePages')&lt;BR /&gt;with&lt;BR /&gt;(pageNo Int '$.pageNo',&lt;BR /&gt;[thumbNail] nvarchar(max) as JSON&lt;BR /&gt;) as jsonsvalues where ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then I get the thumbnail in nvarchar(max).&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the report builder, I customize a function to convert the byte array into hex string. the function is like:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Function ToHexString(ByVal bytes() As Integer) As String&lt;BR /&gt;Dim strB As New System.Text.StringBuilder&lt;BR /&gt;Dim ints(bytes.Length) As Integer&lt;BR /&gt;Dim N as long&lt;BR /&gt;For N = 0 To bytes.Length - 1&lt;BR /&gt;If bytes(N) &amp;lt; 0 Then&lt;BR /&gt;ints(N) = bytes(N) + 256&lt;BR /&gt;Else&lt;BR /&gt;ints(N) = bytes(N)&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;For N = 0 To ints.Length - 1&lt;BR /&gt;If ints(N) &amp;lt; 16 Then&lt;BR /&gt;strB.Append("0" &amp;amp; Hex$(ints(N)))&lt;BR /&gt;Else&lt;BR /&gt;strB.Append(Hex$(ints(N)))&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;ToHexString ="0x" &amp;amp; Replace(strB.ToString().ToUpper(), " ", "")&lt;BR /&gt;Return ToHexString&lt;BR /&gt;End&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to run this function in vb,net can get the hex string correctly. but cannot get the image in report builder.&lt;/P&gt;&lt;P&gt;Please help to visualize the image in report builder if you have any experience. Thank you!&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="259995" data-lia-user-login="v-janeyg-msft" class="lia-mention lia-mention-user"&gt;v-janeyg-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 08:16:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1919489#M19863</guid>
      <dc:creator>Tengmin123</dc:creator>
      <dc:date>2021-06-24T08:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot display image in report builder from byte array or hex string</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1924815#M19891</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="288334" data-lia-user-login="Tengmin123" class="lia-mention lia-mention-user"&gt;Tengmin123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After my search, I'm afraid that vb language is not supported .&lt;/P&gt;
&lt;P&gt;Sorry, I have no experience in this area. I only used the following method to add images to the desktop. You can reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlshack.com/upload-multiple-images-sql-server/" target="_blank"&gt;How to upload multiple images to SQL Server (sqlshack.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Janey Guo&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 06:56:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1924815#M19891</guid>
      <dc:creator>v-janeyg-msft</dc:creator>
      <dc:date>2021-06-28T06:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot display image in report builder from byte array or hex string</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1930502#M19942</link>
      <description>&lt;P&gt;The rdl supports Byte Array so you do not need to convert to hex! We have been converting the hex to bytearray if at all! Try to put this on a Dataset field and bind that to the image control. Also just to make sure the image mime is as of the original one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 10:12:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1930502#M19942</guid>
      <dc:creator>AbhiSSRS</dc:creator>
      <dc:date>2021-06-30T10:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot display image in report builder from byte array or hex string</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1930520#M19944</link>
      <description>&lt;P&gt;Thank you for your reply.&amp;nbsp; but my byte array is saved as varchar(max) in database, it is a string with byte array value. is it still ok for report builder to visualize it?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 10:18:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1930520#M19944</guid>
      <dc:creator>Tengmin123</dc:creator>
      <dc:date>2021-06-30T10:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot display image in report builder from byte array or hex string</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1930585#M19946</link>
      <description>&lt;P&gt;Yeah it should work! try adding this convert&amp;nbsp;&lt;/P&gt;&lt;P&gt;Convert.FromBase64String&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 10:49:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1930585#M19946</guid>
      <dc:creator>AbhiSSRS</dc:creator>
      <dc:date>2021-06-30T10:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot display image in report builder from byte array or hex string</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1931934#M19957</link>
      <description>&lt;P&gt;I tried add the convert and not add, but both not work for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 01:57:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1931934#M19957</guid>
      <dc:creator>Tengmin123</dc:creator>
      <dc:date>2021-07-01T01:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot display image in report builder from byte array or hex string</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1931935#M19958</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 01:58:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Cannot-display-image-in-report-builder-from-byte-array-or-hex/m-p/1931935#M19958</guid>
      <dc:creator>Tengmin123</dc:creator>
      <dc:date>2021-07-01T01:58:17Z</dc:date>
    </item>
  </channel>
</rss>

