cancel
Showing results for 
Search instead for 
Did you mean: 

vs 2013 dataset -- failed to logon to database on iis

Former Member
0 Kudos

vs 2013 dataset -- failed to logon to database on iis


  SqlConnection connection = new SqlConnection("Server=SHAKIRA\\SQLEXPRESS;uid=sa;pwd=case;Database=FRW_Base;");

                //SqlConnection connection = new SqlConnection(connectionString);

                SqlCommand command = new SqlCommand("Select top 10 * From FRWClients", connection);

                SqlDataAdapter adapter = new SqlDataAdapter(command);

                //Customer _Customer = new Customer();

                DataSet dataset = new DataSet();

                adapter.Fill(dataset, "FRWClients");

                ReportDocument CustomerReport = new ReportDocument();

//E:\PORLANDE\projprolandev1\projprolande\PRLManager\Reports\CrystalReport7Clientes.rpt

                string fullReportPath = Server.MapPath("\\Reports\\CrystalReport7Clientes.rpt");

                Response.Write(fullReportPath);

                CustomerReport.Load(fullReportPath);

                CustomerReport.SetDataSource(dataset.Tables["FRWClients"]);

                CrystalReportViewer1.ReportSource = CustomerReport;

                CrystalReportViewer1.DataBind();

on the

<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
    <Report FileName="Reports\CrystalReport7Clientes.rpt">
    </Report>
</CR:CrystalReportSource>
       

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True" ReportSourceID="CrystalReportSource1" ToolPanelView="None" EnableDatabaseLogonPrompt="false" />

debuging does not show the report on vs2013, that i read somewhere that does not work

when i deployed to my local webserver iis i get this message

Error  Falha de logon no banco de dados.

or in english

Failed to logon on the database


i am using a dataset


thanks

pedro

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Pedro

When you get this error with datasets, the report engine is trying to tell you that the dataset you passed to it was not in the format it expected. So as a next step, it tried to connect to the database that the report was originally created off of.

To troubleshoot the issue see this wiki:

Troubleshooting Issues with VS .NET Datasets and Crystal Reports - Business Intelligence (BusinessOb...

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Answers (0)