<?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>Question Re: Image shown issue in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621927#M4734232</link>
    <description>&lt;P&gt;Than you Williams, I don't know why I have to link  the image through a database field. But, the image shows if I set a dataset as data source in some reports. Is it a special way for  xml\xsd data source type? In my case, the image path is hard-coded in the graphic location and no need to calculate at all. &lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 02:15:58 GMT</pubDate>
    <dc:creator>huayuz</dc:creator>
    <dc:date>2022-09-27T02:15:58Z</dc:date>
    <item>
      <title>Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaq-p/12621922</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I set a report with .xsd file as schema of table. and I insert an OLE object with graphic location to load an image. &lt;/P&gt;
  &lt;P&gt;Here comes the strange thing. Image does not show when I set the data source and export pdf file, every filed shows correctly but image. However, Image shows if I don't set data source and export pdf.&lt;/P&gt;
  &lt;P&gt;below is how I set the datasource:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt; void SetXmlDataSource(ReportDocument report)
        {
            if(!Utils.CheckFileExists(_configuration.Schema))
            {
                throw new Exception($"File {_configuration.Schema} does not exist");
            }
            if(!Utils.CheckFileExists(_commandLine))
            {
                throw new Exception($"File {_commandLine} does not exist");
            }        
            var ds = new DataSet();
            ds.ReadXmlSchema(_configuration.Schema);
            ds.ReadXml(_commandLine);
            report.SetDataSource(ds);
        }&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Language: C# (.net4.5)&lt;/P&gt;
  &lt;P&gt;OS Platform: Windows Server 2016 (x64)&lt;/P&gt;
  &lt;P&gt;SDK: SP32&lt;/P&gt;
  &lt;P&gt;Crystal Reports Version: Crystal Report 2020&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 01:33:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaq-p/12621922</guid>
      <dc:creator>huayuz</dc:creator>
      <dc:date>2022-09-19T01:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621923#M4734228</link>
      <description>&lt;P&gt;You need to make sure that the image is in a location that the web application server software has acces to.  For example, if the image is somewhere on the network and you're running your app in Tomcat, Tomcat would have to be running under the credentials of a service account that has access to the network folder where the image is located.  The same holds true for IIS.  Web application server software, by default, is usually locked down security-wise because of the higher risk of attacks through the web.&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 13:33:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621923#M4734228</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2022-09-20T13:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621924#M4734229</link>
      <description>&lt;P&gt;Thanks for your reply. Yah, I am sure that the image is available for application. Because image shows if I comment out SetXmlDataSource codes. It might be a issue I think, could you guys take a look at it?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 01:30:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621924#M4734229</guid>
      <dc:creator>huayuz</dc:creator>
      <dc:date>2022-09-26T01:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621925#M4734230</link>
      <description>&lt;P&gt;I'm not an SAP employee, but  &lt;SPAN class="mention-scrubbed"&gt;don.williams&lt;/SPAN&gt; might be able to take a look at it.&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 13:48:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621925#M4734230</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2022-09-26T13:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621926#M4734231</link>
      <description>&lt;P&gt;You have to link the image through a database field, If not the image will only load once when the report is opened.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 21:31:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621926#M4734231</guid>
      <dc:creator>former_member11696</dc:creator>
      <dc:date>2022-09-26T21:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621927#M4734232</link>
      <description>&lt;P&gt;Than you Williams, I don't know why I have to link  the image through a database field. But, the image shows if I set a dataset as data source in some reports. Is it a special way for  xml\xsd data source type? In my case, the image path is hard-coded in the graphic location and no need to calculate at all. &lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 02:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621927#M4734232</guid>
      <dc:creator>huayuz</dc:creator>
      <dc:date>2022-09-27T02:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621928#M4734233</link>
      <description>&lt;P&gt;It has always been this way, if you insert an image into a report CR will only load the image when the Report is opened or loaded in an application.&lt;/P&gt;&lt;P&gt;The solution R&amp;amp;D came up with is to use a database field that points to the location of the image. It could be a field in the DB or a file located on the Harddrive.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 13:39:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621928#M4734233</guid>
      <dc:creator>former_member11696</dc:creator>
      <dc:date>2022-09-27T13:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621929#M4734234</link>
      <description>&lt;P&gt;Thanks for your kindly reply.  Here I want to put some screen shots to make my problem more clear.&lt;/P&gt;&lt;P&gt;1. choose a .xsd file as database ADO.NET(XML) &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" standalone="yes"?&amp;gt;
&amp;lt;xs:schema id="data" 
xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&amp;gt;
  &amp;lt;xs:element name="data" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"&amp;gt;
    &amp;lt;xs:complexType&amp;gt;
      &amp;lt;xs:choice minOccurs="0" maxOccurs="unbounded"&amp;gt;
        &amp;lt;xs:element name="docid"&amp;gt;
          &amp;lt;xs:complexType&amp;gt;
            &amp;lt;xs:sequence&amp;gt;
              &amp;lt;xs:element name="RptDate" type="xs:string" minOccurs="0" msdata:Ordinal="0" /&amp;gt;
              &amp;lt;xs:element name="PolNo" type="xs:string" minOccurs="0" msdata:Ordinal="1" /&amp;gt;
              &amp;lt;xs:element name="PolicyName" type="xs:string" minOccurs="0" msdata:Ordinal="2" /&amp;gt;
              &amp;lt;xs:element name="NextAnni" type="xs:string" minOccurs="0" msdata:Ordinal="3" /&amp;gt;
              &amp;lt;xs:element name="Address1" type="xs:string" minOccurs="0" msdata:Ordinal="4" /&amp;gt;
              &amp;lt;xs:element name="Address2" type="xs:string" minOccurs="0" msdata:Ordinal="5" /&amp;gt;
              &amp;lt;xs:element name="Address3" type="xs:string" minOccurs="0" msdata:Ordinal="6" /&amp;gt;
              &amp;lt;xs:element name="Address4" type="xs:string" minOccurs="0" msdata:Ordinal="7" /&amp;gt;
              &amp;lt;xs:element name="State" type="xs:string" minOccurs="0" msdata:Ordinal="8" /&amp;gt;
              &amp;lt;xs:element name="CONTPERSON" type="xs:string" minOccurs="0" msdata:Ordinal="9" /&amp;gt;
              &amp;lt;xs:element name="AgentName" type="xs:string" minOccurs="0" msdata:Ordinal="10" /&amp;gt;
              &amp;lt;xs:element name="AGYNAME" type="xs:string" minOccurs="0" msdata:Ordinal="11" /&amp;gt;
              &amp;lt;xs:element name="CommDisclsInd" type="xs:string" minOccurs="0" msdata:Ordinal="12" /&amp;gt;
              &amp;lt;xs:element name="company_code" type="xs:integer" minOccurs="0" msdata:Ordinal="13" /&amp;gt;
              &amp;lt;xs:element name="company_short_name_e" type="xs:string" minOccurs="0" msdata:Ordinal="14" /&amp;gt;
              &amp;lt;xs:element name="company_short_name_c" type="xs:string" minOccurs="0" msdata:Ordinal="15" /&amp;gt;
              &amp;lt;xs:element name="company_full_name_e" type="xs:string" minOccurs="0" msdata:Ordinal="16" /&amp;gt;
              &amp;lt;xs:element name="company_full_name_c" type="xs:string" minOccurs="0" msdata:Ordinal="17" /&amp;gt;
              &amp;lt;xs:element name="fax_number" type="xs:string" minOccurs="0" msdata:Ordinal="18" /&amp;gt;
              &amp;lt;xs:element name="csc_phone" type="xs:string" minOccurs="0" msdata:Ordinal="19" /&amp;gt;
              &amp;lt;xs:element name="print_date" type="xs:string" minOccurs="0" msdata:Ordinal="20" /&amp;gt;
			  &amp;lt;xs:element name="logo" type="xs:string" minOccurs="0" msdata:Ordinal="21" /&amp;gt;
            &amp;lt;/xs:sequence&amp;gt;
            &amp;lt;xs:attribute name="letterdoc"&amp;gt;
			  &amp;lt;xs:simpleType&amp;gt;
				&amp;lt;xs:restriction base="xs:string"&amp;gt;
				  &amp;lt;xs:pattern value="GRNV005R01|GRNV005R02|GRNV005R03|GRNV005R04"/&amp;gt;
				&amp;lt;/xs:restriction&amp;gt;
			  &amp;lt;/xs:simpleType&amp;gt;
			&amp;lt;/xs:attribute&amp;gt;
          &amp;lt;/xs:complexType&amp;gt;
        &amp;lt;/xs:element&amp;gt;
      &amp;lt;/xs:choice&amp;gt;
    &amp;lt;/xs:complexType&amp;gt;
  &amp;lt;/xs:element&amp;gt;
&amp;lt;/xs:schema&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;3.I set a report as below&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2100697-image.png" /&gt;&lt;/P&gt;&lt;P&gt;2.preview in designer. As you can see, hard code graphic location image shows correctly&lt;/P&gt;&lt;P&gt;3. call method SetXmlDataSource to load xsd file and xml file. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;data&amp;gt;
&amp;lt;docid letterdoc="GRNV005R01"&amp;gt;
&amp;lt;RptDate&amp;gt;08/12/2022 10:24:50&amp;lt;/RptDate&amp;gt;
&amp;lt;PolNo&amp;gt;0000012345&amp;lt;/PolNo&amp;gt;
&amp;lt;PolicyName&amp;gt;Howard &amp;amp; Ping&amp;lt;/PolicyName&amp;gt;
&amp;lt;NextAnni&amp;gt;09/30/2022 00:00:00&amp;lt;/NextAnni&amp;gt;
&amp;lt;Address1&amp;gt;SUITE AA&amp;lt;/Address1&amp;gt;
&amp;lt;Address2&amp;gt;CMA BUILDING&amp;lt;/Address2&amp;gt;
&amp;lt;Address3&amp;gt;20 CONNAUGHT ROAD CENTRAL&amp;lt;/Address3&amp;gt;
&amp;lt;Address4&amp;gt;&amp;lt;/Address4&amp;gt;
&amp;lt;State&amp;gt;HONG KONG&amp;lt;/State&amp;gt;
&amp;lt;CONTPERSON&amp;gt;MS. ELIZABETH LAW&amp;lt;/CONTPERSON&amp;gt;
&amp;lt;AgentName&amp;gt;&amp;lt;/AgentName&amp;gt;
&amp;lt;AGYNAME&amp;gt;&amp;lt;/AGYNAME&amp;gt;
&amp;lt;CommDisclsInd&amp;gt;N&amp;lt;/CommDisclsInd&amp;gt;
&amp;lt;company_code&amp;gt;41&amp;lt;/company_code&amp;gt;
&amp;lt;company_short_name_e&amp;gt;Apple&amp;lt;/company_short_name_e&amp;gt;
&amp;lt;company_short_name_c&amp;gt;Apple&amp;lt;/company_short_name_c&amp;gt;
&amp;lt;company_full_name_e&amp;gt;Apple&amp;lt;/company_full_name_e&amp;gt;
&amp;lt;company_full_name_c&amp;gt;苹果&amp;lt;/company_full_name_c&amp;gt;
&amp;lt;fax_number&amp;gt;1234 9011&amp;lt;/fax_number&amp;gt;
&amp;lt;csc_phone&amp;gt;2234 9999&amp;lt;/csc_phone&amp;gt;
&amp;lt;print_date&amp;gt;08/11/2022 00:00:00&amp;lt;/print_date&amp;gt;
&amp;lt;logo&amp;gt;.\Header_Portrait_Logo.bmp&amp;lt;/logo&amp;gt;
&amp;lt;/docid&amp;gt;
&amp;lt;/data&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;4. call ExportToDisk method to export pdf ( you can see both image are blank and logo field has correct value)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2100704-image.png" /&gt;&lt;/P&gt;&lt;P&gt;5. exe application and report and image are all in debug folder.&lt;/P&gt;&lt;P&gt;Plase help me, thank you &lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 03:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621929#M4734234</guid>
      <dc:creator>huayuz</dc:creator>
      <dc:date>2022-09-29T03:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621930#M4734235</link>
      <description>&lt;P&gt;If you export the report using the Viewers Export button does that work?&lt;/P&gt;&lt;P&gt;As I said, the image is only loaded once when the report is opened. Refreshing won't show a new image&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 13:56:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621930#M4734235</guid>
      <dc:creator>former_member11696</dc:creator>
      <dc:date>2022-09-29T13:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621931#M4734236</link>
      <description>&lt;P&gt;Yes. the image shows if I using the Viewers Export button. Dear Williams, We always use graphic to show the local image in reports and it works well. It only being blank when I set xsd file schema and xml data file as datasource. &lt;/P&gt;&lt;P&gt;If I comment out SetDataSource line as below, the image shows in the exported pdf( but no data because no data source set). &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2100001-image.png" /&gt;&lt;/P&gt;&lt;P&gt;I've set dataset as data source before, of which records are from sql server and everything woks well. the difference here is just read xml as data source I dont know why. Just as you said, the image loaded once when report is opened. it should be opened after data source loaded. And the hardcoded graphic image should be shown, right?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 01:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621931#M4734236</guid>
      <dc:creator>huayuz</dc:creator>
      <dc:date>2022-10-06T01:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621932#M4734237</link>
      <description>&lt;P&gt;Wrong, as I said the image is ONLY loaded on Report.load. Refreshing the data DOES NOT reload the image.&lt;/P&gt;&lt;P&gt;To get this to work you must use a formula which points to a database field that redirects to the location of the image, either a hard drive location of another field, you can't load the image directly from a DB field.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 13:02:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621932#M4734237</guid>
      <dc:creator>former_member11696</dc:creator>
      <dc:date>2022-10-06T13:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Image shown issue</title>
      <link>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621933#M4734238</link>
      <description>&lt;P&gt;Thanks for your kind reply Williams. I finally work it out with your help.&lt;/P&gt;&lt;P&gt;1. Load report with full file name.&lt;/P&gt;&lt;P&gt;2.using formula  Left(Filename,length(filename) - Length(Mid (Filename ,InstrRev (Filename,"\") + 1) )) + "Logo.bmp" to load image.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 08:51:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/image-shown-issue/qaa-p/12621933#M4734238</guid>
      <dc:creator>huayuz</dc:creator>
      <dc:date>2022-10-07T08:51:42Z</dc:date>
    </item>
  </channel>
</rss>

