on 07-23-2014 2:38 PM
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
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:
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.