<?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 Reports keeps asking for database credentials in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/crystal-reports-keeps-asking-for-database-credentials/qaa-p/9173523#M3255443</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&amp;nbsp; Using the Crystal Reports Guide to ADO.NET helped me resolve the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Nov 2012 16:02:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-11-09T16:02:45Z</dc:date>
    <item>
      <title>Crystal Reports keeps asking for database credentials</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-reports-keeps-asking-for-database-credentials/qaq-p/9173521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a Crystal Report using VS 2010 (CRforVS_13_0_4.exe was used to install CR for VS).&amp;nbsp; I have a class that I use for data access.&amp;nbsp; This class loads the data into variables that are public members of the class.&amp;nbsp; When I created the report using the Database Expert, I chose My Connections and selected the class I defined (CVLData) as the Table.&amp;nbsp; I then selected all the fields from the class that I need on the report.&amp;nbsp; When the user clicks a button to load the report, the data is loaded into the class for the report.&amp;nbsp; When the report is displayed I get an error: Database logon failed.&amp;nbsp; When I set EnableDatabaseLogonPrompt to True I get a prompt for database credentials.&amp;nbsp; Since the data is already loaded into the class I don't know why I am being prompted for database credentials.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/154393" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a DataSet with the tables that I need for the report and used that as my DataSource.&amp;nbsp; I still am prompted for credentials.&amp;nbsp; I added the following code to set the credentials and I still have the problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;protected void VerifyCVL_Click(object sender, EventArgs e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReportDocument cryRpt = new ReportDocument();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cryRpt.Load(Server.MapPath("test.rpt"));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConnectionInfo connectionInfo = new ConnectionInfo();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connectionInfo.ServerName = "my server";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connectionInfo.DatabaseName = "my db";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connectionInfo.UserID = "userid";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connectionInfo.Password = "password";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetDBLogonForReport(connectionInfo, cryRpt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CrystalReportViewer1.ReportSource = cryRpt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CrystalReportViewer1.RefreshReport();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tables tables = reportDocument.Database.Tables;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableLogOnInfo tableLogonInfo = table.LogOnInfo;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableLogonInfo.ConnectionInfo = connectionInfo;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table.ApplyLogOnInfo(tableLogonInfo);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use a report that contains text and no data fields, the report displays fine without any prompt for credentials.&amp;nbsp; Can someone please tell me what I am doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2012 19:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-reports-keeps-asking-for-database-credentials/qaq-p/9173521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-11-07T19:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Reports keeps asking for database credentials</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-reports-keeps-asking-for-database-credentials/qaa-p/9173522#M3255442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The most likely reason for the database prompts / errors is that the dataset is not what the report is expecting. &lt;/P&gt;&lt;P&gt;The connectionInfo code will never work as for a dataset there are no credentials...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd recommend having a look at the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/401c4455-a31d-2b10-ae96-fa57af5aec20"&gt;Crystal Reports Guide To ADO.NET&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23"&gt;Crystal Reports for Visual Studio 2005 Walkthroughs&lt;/A&gt; (this will apply to any version of CR)&lt;/P&gt;&lt;P&gt;Sample app csharp_win_adodotnet.zip here: &lt;A href="http://wiki.sdn.sap.com/wiki/x/JQBmBQ"&gt;http://wiki.sdn.sap.com/wiki/x/JQBmBQ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And for troubleshooting tips, see the blog &lt;A _jive_internal="true" href="https://answers.sap.com/community/crystal-reports-for-visual-studio/blog/2009/03/02/troubleshooting-issues-with-vs-net-datasets-and-crystal-reports"&gt;Troubleshooting Issues with VS .NET Datasets and Crystal Reports&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The developer help files may also help:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_api_2010_en.zip"&gt;SAP Crystal Reports .NET API Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip"&gt;SAP Crystal Reports .NET SDK Developer Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_dg_en.zip"&gt;Report Application Server .NET SDK Developer Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_api_en.zip"&gt;Report Application Server .NET API Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ludek&lt;/P&gt;&lt;P&gt;Follow us on &lt;A href="https://twitter.com/#!/SAPCRNetSup"&gt;Twitter&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Got Enhancement ideas? Try the &lt;A href="https://cw.sdn.sap.com/cw/community/ideas"&gt;SAP Idea Place&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/docs/DOC-18841"&gt;Share Your Knowledge in SCN Topic Spaces&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 18:52:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-reports-keeps-asking-for-database-credentials/qaa-p/9173522#M3255442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-11-08T18:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Crystal Reports keeps asking for database credentials</title>
      <link>https://community.sap.com/t5/technology-q-a/crystal-reports-keeps-asking-for-database-credentials/qaa-p/9173523#M3255443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&amp;nbsp; Using the Crystal Reports Guide to ADO.NET helped me resolve the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 16:02:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/crystal-reports-keeps-asking-for-database-credentials/qaa-p/9173523#M3255443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-11-09T16:02:45Z</dc:date>
    </item>
  </channel>
</rss>

