<?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: Programmatic editing of sql in Crystal Report .rpt file in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/programmatic-editing-of-sql-in-crystal-report-rpt-file/qaa-p/13765346#M4837523</link>
    <description>&lt;P&gt;Any (non-ancient) Crystal for Visual Studio provides the RAS (RCD) API. No need for Crystal server.&lt;BR /&gt;&lt;BR /&gt;What aspect of the SQL do you need to change? If it's just record filtering, there is a simpler way.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2024 01:39:22 GMT</pubDate>
    <dc:creator>ido_millet</dc:creator>
    <dc:date>2024-07-19T01:39:22Z</dc:date>
    <item>
      <title>Programmatic editing of sql in Crystal Report .rpt file</title>
      <link>https://community.sap.com/t5/technology-q-a/programmatic-editing-of-sql-in-crystal-report-rpt-file/qaq-p/13765248</link>
      <description>&lt;P&gt;What development tools do I need to be able to read and modify the SQL in Crystal Report 2020 .rpt files.&amp;nbsp; I've looked at a variety of api's. SAP Crystal Reports JavaScript API, Business Intelligence Platform Java SDK, SAP Crystal Reports for Visual .NET SDK ... From my understanding, I need to use the ReportClientDocument Object Model which only comes with report server in the Crystal Reports for Visual Studio .NET SDK. "You install and gain direct access to the ReportClientDocument model only with an upgraded license to the unmanaged RAS server." I don't mind getting report server if that is what I need, just want to make sure that is my only "SAP" sanctioned options. Thanks for any help.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 22:03:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/programmatic-editing-of-sql-in-crystal-report-rpt-file/qaq-p/13765248</guid>
      <dc:creator>peggyshupp</dc:creator>
      <dc:date>2024-07-18T22:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatic editing of sql in Crystal Report .rpt file</title>
      <link>https://community.sap.com/t5/technology-q-a/programmatic-editing-of-sql-in-crystal-report-rpt-file/qaa-p/13765346#M4837523</link>
      <description>&lt;P&gt;Any (non-ancient) Crystal for Visual Studio provides the RAS (RCD) API. No need for Crystal server.&lt;BR /&gt;&lt;BR /&gt;What aspect of the SQL do you need to change? If it's just record filtering, there is a simpler way.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 01:39:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/programmatic-editing-of-sql-in-crystal-report-rpt-file/qaa-p/13765346#M4837523</guid>
      <dc:creator>ido_millet</dc:creator>
      <dc:date>2024-07-19T01:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatic editing of sql in Crystal Report .rpt file</title>
      <link>https://community.sap.com/t5/technology-q-a/programmatic-editing-of-sql-in-crystal-report-rpt-file/qaa-p/13765414#M4837532</link>
      <description>&lt;P&gt;Hi Peggy,&lt;/P&gt;&lt;P&gt;You cannot modify the SQL in the Report or subreport, CR hasn't be able to do this for quite some time, it used to be able to but it caused all sorts of problems so the function was removed. To many objects to make changes to for complex reports with complex data structures. So what Product did was add the Command Object, basically add your own SQL and then you can edit it as required, as long as it didn't break the report.&lt;/P&gt;&lt;P&gt;And before you ask there is no way to change the data source from tables to a command object, well maybe bit to complex, someone may be able to describe how to, without your data source it's too much to explain.&lt;/P&gt;&lt;P&gt;Here's the link for CR for VS:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html" target="_blank" rel="noopener"&gt;https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;On that page is a test app, Parameter one, I created to get more info from the report like the SQL used, note you need to log onto the DB first because CR dynamically generates the SQL based on the DB connection.&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2022/03/31/how-to-use-the-new-cr-2020-export-to-microsoft-excelxlxs-in-visual-studio-.net-code/" target="_blank" rel="noopener noreferrer"&gt;&lt;STRONG&gt;How to use the new CR 2020 export to Microsoft Excel(XLXS) in Visual Studio .NET code&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&amp;nbsp;(new)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2016/02/17/how-to-parameters-in-crystal-reports-for-visual-studio-net/" target="_blank" rel="noopener noreferrer"&gt;&lt;STRONG&gt;how-to-parameters-in-crystal-reports-for-visual-studio-net&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2015/08/19/printing-crystal-reports-in-net/" target="_blank" rel="noopener noreferrer"&gt;&lt;STRONG&gt;Printing Crystal Reports in .NET&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As Ido indicated depending on what you need to change you can used the Record Selection formula to alter the filtering in the WHERE clause but you cannot change Tables or other parts.&lt;/P&gt;&lt;P&gt;To change your report from direct table connection to a Command Object Open 2 instances of CR Designer, open the original report and log in and click on Database... Show SQL Query and copy it.&lt;/P&gt;&lt;P&gt;In the second instance of CRD create a new report, log into your DB and select Command, paste in your SQL from the original.&lt;/P&gt;&lt;P&gt;Now you can drop the fields onto the report and depending on the formulae and other objects you may be able to copy and paste then onto the new report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 04:00:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/programmatic-editing-of-sql-in-crystal-report-rpt-file/qaa-p/13765414#M4837532</guid>
      <dc:creator>DonWilliams</dc:creator>
      <dc:date>2024-07-19T04:00:15Z</dc:date>
    </item>
  </channel>
</rss>

