Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

Crystal report loading very slow

$
0
0

My report is loadnig very slow every time i try to load the report i am using below code to load the report from only one table 

protected void Page_Load(object sender, EventArgs e)
    {

        string query;

            string q = Request.QueryString["q"];
            con.Open();
            query = "select * from Tech_data where id ='" + q + "'";
            cmd = new SqlCommand(query, con);
            da = new SqlDataAdapter(cmd);
            dt.Clear();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {

                ReportDocument Report = new ReportDocument();
                Report.Load(Server.MapPath("~/CrystalReport.rpt"));
                Report.SetDataSource(dt);
                Report.SetDatabaseLogon("sa", "admin@ksmc1","TESTWINSERVER8", "Technical_sup");
                CrystalReportViewer1.ReportSource = Report;
                CrystalReportViewer1.DataBind();
            }
       con.Close();




Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>