<?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: Crystal Report template not refresh the data from Excel source (using VB code) in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674583#M4755361</link>
    <description>&lt;P&gt;Hi Sylvian,&lt;/P&gt;&lt;P&gt;What CR for VS SP are you using?&lt;/P&gt;&lt;P&gt;Get SP 33 from here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads" target="test_blank"&gt;https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note there is an installer for VS 2010-&amp;gt;2019 and a new one for VS 2022.&lt;/P&gt;&lt;P&gt;Error typically means CR runtime can't find the database client.&lt;/P&gt;&lt;P&gt;CR 2020 is 64 bit so it's using Windows 64 bit Client.&lt;/P&gt;&lt;P&gt;In your Project be sure to set it to x64 and not AnyCPU, CR runtime is for your project platform and not the OS.&lt;/P&gt;&lt;P&gt;Don&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2023 13:18:30 GMT</pubDate>
    <dc:creator>DonWilliams</dc:creator>
    <dc:date>2023-02-15T13:18:30Z</dc:date>
    <item>
      <title>Crystal Report template not refresh the data from Excel source (using VB code)</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaq-p/12674582</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I am using Crystal Report 2020. I have an Excel file as the data source. &lt;/P&gt;
  &lt;P&gt;I create my CR report base on this document&lt;/P&gt;
  &lt;P&gt; &lt;A href="https://www.sap.com/documents/2020/11/a046b61d-bd7d-0010-87a3-c30de2ffd8ff.html" target="test_blank"&gt;https://www.sap.com/documents/2020/11/a046b61d-bd7d-0010-87a3-c30de2ffd8ff.html&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;I connect data source through : &lt;/P&gt;
  &lt;P&gt; OLE DB (ADO) --&amp;gt; Microsoft Office 12.0 Access Database Engine OLE DB Provider&lt;/P&gt;
  &lt;P&gt;I input information as follows : &lt;/P&gt;
  &lt;P&gt; Data Source: C:\DataQuery\Database\MonthlyBalance.xlsx&lt;/P&gt;
  &lt;P&gt; Office Database Type: Excel&lt;/P&gt;
  &lt;P&gt; User ID: Admin&lt;/P&gt;
  &lt;P&gt; Password: &amp;lt;NIL&amp;gt;&lt;/P&gt;
  &lt;P&gt; Jet System Database: &amp;lt;NIL&amp;gt;&lt;/P&gt;
  &lt;P&gt; Jet System Password: &amp;lt;NIL&amp;gt;&lt;/P&gt;
  &lt;P&gt;The CR report template is tested and running fine. The CR report template can extract data from Excel correctly.&lt;/P&gt;
  &lt;P&gt;I then write my vb code to automate the prcoess(To load the CR template and then export result to PDF format. I do not need to use the CR smart viewer). &lt;/P&gt;
  &lt;P&gt;When I check the output PDF file. It is strange that the CR only load the saved data(saved in the CR template) but not refresh the actual data from the Excel source.&lt;/P&gt;
  &lt;P&gt;I try the add the code .DiscardSavedData as below : &lt;/P&gt;
  &lt;P&gt; .DiscardSavedData&lt;/P&gt;
  &lt;P&gt; .....&lt;/P&gt;
  &lt;P&gt; .ReadRecords&lt;/P&gt;
  &lt;P&gt;When the code run to .ReadRecords. It shows error "Login failed. Details: [Database Vendor Code -69141536]".&lt;/P&gt;
  &lt;P&gt;(If I remove the line .DiscardSavedData, it can pass through .ReadRecords. Then the output PDF will only load the saved data in CR but not getting the actual data from Excel)&lt;/P&gt;
  &lt;P&gt;I then add the code .LogOnServer as below : &lt;/P&gt;
  &lt;P&gt; .DiscardSavedData&lt;/P&gt;
  &lt;P&gt; .LogOnServer "crdb_ado.dll", "C:\DataQuery\Database\MonthlyBalance.xlsx", "", "Admin", ""&lt;/P&gt;
  &lt;P&gt; .ReadRecords&lt;/P&gt;
  &lt;P&gt;When the code run to .LogOnServer. It shows error "Run-time error '-2147189176 (80047e48). Login failed."&lt;/P&gt;
  &lt;P&gt;I tried all combination as below. Also show ""Run-time error '-2147189176 (80047e48). Login failed."&lt;/P&gt;
  &lt;P&gt; .LogOnServer "crdb_ado.dll", "C:\DataQuery\Database\MonthlyBalance.xlsx", "", "Admin", ""&lt;/P&gt;
  &lt;P&gt; .LogOnServer "crdb_ado.dll", "C:\DataQuery\Database\MonthlyBalance.xlsx", "MonthlyBalance.xlsx", "Admin", ""&lt;/P&gt;
  &lt;P&gt; .LogOnServer "crdb_ado.dll", "C:\DataQuery\Database\MonthlyBalance.xlsx", "", "", ""&lt;/P&gt;
  &lt;P&gt; .LogOnServer "crdb_ado.dll", "C:\DataQuery\Database\MonthlyBalance.xlsx", "MonthlyBalance.xlsx", "", ""&lt;/P&gt;
  &lt;P&gt; ......&lt;/P&gt;
  &lt;P&gt;I checked some document saying that the LogOnServer function may need you to provide a password.(means password should not be blank)&lt;/P&gt;
  &lt;P&gt;I then try again to connect CR data source with password provide: &lt;/P&gt;
  &lt;P&gt; OLE DB (ADO) --&amp;gt; Microsoft Office 12.0 Access Database Engine OLE DB Provider&lt;/P&gt;
  &lt;P&gt;I input information and re-assign password as follows : &lt;/P&gt;
  &lt;P&gt; Data Source: C:\DataQuery\Database\MonthlyBalance.xlsx&lt;/P&gt;
  &lt;P&gt; Office Database Type: Excel&lt;/P&gt;
  &lt;P&gt; User ID: Admin&lt;/P&gt;
  &lt;P&gt; Password: Admin&lt;/P&gt;
  &lt;P&gt;It shows error message :&lt;/P&gt;
  &lt;P&gt; Logon failed. &lt;/P&gt;
  &lt;P&gt; Details ADO Error Code: 0x80040e4d&lt;/P&gt;
  &lt;P&gt; Source: Microsoft Access Database Engine&lt;/P&gt;
  &lt;P&gt; .....&lt;/P&gt;
  &lt;P&gt; SQL State: 3028&lt;/P&gt;
  &lt;P&gt; Native Error: -124520301 [Database Vendor Code: -124520301]&lt;/P&gt;
  &lt;P&gt;It seems I cannot assign new password under the OLE DB (ADO) datasource setup.&lt;/P&gt;
  &lt;P&gt;Would be appreciate if someone could assist for the case.&lt;/P&gt;
  &lt;P&gt;Thanks. &lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 08:36:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaq-p/12674582</guid>
      <dc:creator>sylvianbca</dc:creator>
      <dc:date>2023-02-15T08:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report template not refresh the data from Excel source (using VB code)</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674583#M4755361</link>
      <description>&lt;P&gt;Hi Sylvian,&lt;/P&gt;&lt;P&gt;What CR for VS SP are you using?&lt;/P&gt;&lt;P&gt;Get SP 33 from here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads" target="test_blank"&gt;https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note there is an installer for VS 2010-&amp;gt;2019 and a new one for VS 2022.&lt;/P&gt;&lt;P&gt;Error typically means CR runtime can't find the database client.&lt;/P&gt;&lt;P&gt;CR 2020 is 64 bit so it's using Windows 64 bit Client.&lt;/P&gt;&lt;P&gt;In your Project be sure to set it to x64 and not AnyCPU, CR runtime is for your project platform and not the OS.&lt;/P&gt;&lt;P&gt;Don&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 13:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674583#M4755361</guid>
      <dc:creator>DonWilliams</dc:creator>
      <dc:date>2023-02-15T13:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report template not refresh the data from Excel source (using VB code)</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674584#M4755362</link>
      <description>&lt;P&gt;In addition to what Don said, I &lt;EM&gt;highly &lt;/EM&gt;recommend turning OFF "Save data with report".  When it's turned on the size of the .rpt file is larger than when it's off and you have to discard the data.  If it's off, you don't have to go through the steps of discarding the data, so it makes you code simpler.  In over 25 years of working with Crystal, I have &lt;EM&gt;never&lt;/EM&gt; had a circumstance where it made sense to save data with the report in a production environment.  The only use I see for it is here in the forum when I want to help someone diagnose an issue with a report.&lt;/P&gt;&lt;P&gt;-Dell&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 15:52:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674584#M4755362</guid>
      <dc:creator>DellSC</dc:creator>
      <dc:date>2023-02-15T15:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report template not refresh the data from Excel source (using VB code)</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674585#M4755363</link>
      <description>&lt;P&gt;Same as this post:&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/questions/13825758/cr-data-source-connection-to-the-excel-by-vb-net.html" target="test_blank"&gt;https://answers.sap.com/questions/13825758/cr-data-source-connection-to-the-excel-by-vb-net.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please don't post the same question multiple times&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2023 20:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674585#M4755363</guid>
      <dc:creator>DonWilliams</dc:creator>
      <dc:date>2023-02-26T20:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Report template not refresh the data from Excel source (using VB code)</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674586#M4755364</link>
      <description>&lt;P&gt;Hi Don,&lt;/P&gt;&lt;P&gt;The project code works after changing to x64 in VS. Thanks for your advice.&lt;/P&gt;&lt;P&gt;Sylvian&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 02:21:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-report-template-not-refresh-the-data-from-excel-source-using-vb/qaa-p/12674586#M4755364</guid>
      <dc:creator>sylvianbca</dc:creator>
      <dc:date>2023-03-17T02:21:35Z</dc:date>
    </item>
  </channel>
</rss>

