Click here to Skip to main content
15,073,911 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to crystal report. I want to bind crystal report viewer to the datatable fetched from the database through store procedure by passing the parameter through text box. Bt m getting the error database logon failed , code behid coding is: 


C#
oSubmitReportBLL.PostedOn = txtDate1.Text.Trim();
        DataTable  dt= new DataTable();
        dt = oSubmitReportBLL.SelectRecievedReports();

      
        ReportDocument r = new ReportDocument();
        string reportpath = Server.MapPath("~/CrystalReport.rpt");
        r.Load(reportpath);
        DataSet DataSet1 = new DataSet();
        DataSet1.Tables.Add(dt);
        r.SetDataSource(DataSet1);
        CrystalReportViewer1.ReportSource = r;

plaese help me out...
Posted
Updated 7-Nov-12 22:30pm
v3

1 solution

there may be problem in connection,or at userid and password,check them again
   
v2
Comments
[no name] 8-Nov-12 4:31am
   
no valid report source is available error is occuring..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900