locked
Where am doing mistake in crystal report 2012 webforms RRS feed

  • Question

  • User-1582720244 posted

    Am generating a simple crystal report for in my webpage using vs2010.

    The below are the steps which I followed , No data is displayed in my webapge.

    It is shlowing black page.

    step1: created an empty website

    step2: added a dataset 

    step3: dragged a table  into my dataset.

    step4: added crystal report and configured to generated dataset.

    step5: added a webform and palced a crystal reportviewer on it.

    step6: Added the follwing code in  my page load.

    SqlConnection con = new SqlConnection("User id=sa;password=sa@123;database=Testing;data source=localhost");
                SqlDataAdapter da = new SqlDataAdapter("select * from boys", con);
                DataSet1 ds = new DataSet1();
                da.Fill(ds, "boys");
                ReportDocument rdc = new ReportDocument();
                rdc.Load(Server.MapPath("CrystalReport1.rpt"));
                CrystalReportViewer1.Visible = true;
                rdc.SetDataSource(ds);
                CrystalReportViewer1.ReportSource = rdc;
                CrystalReportViewer1.DataBind();
    

    Neigther it prompts me error nor display any data on webpage.

    How to solve this?

    Monday, May 7, 2012 1:56 PM

All replies