I have a Crystal Reports Loading issue
in C#-2005 and I have google for it and found in most of case that to initialized a Crystal Reports it takes times for creation their assemblies and object.
I have not found any genuine solution for it.
My reports take a minute to load the reports
and it's not good sign for my project.
Is there a mistake in mechanism of Crystal Reports?. Or any solution available for it?.
The Details of My Reports
I have prepare a reports by Crystal ReportViewer is as Follow:
string connstr = "server=.;initial catalog=maa;uid=mah;pwd=mah";
SqlConnection con = new SqlConnection(connstr);
con.Open();
string view = @"select opbalDR,opbalCR,transID,companyID,date,name,particulars,debit," +
" credit,narrat,exporter,address,add1,add2,add3,add4,add5,periodfrom,periodto" +
" from LedgerView where companyID=@companyID" +
" and name between @name1 and @name2";
SqlCommand cmd = new SqlCommand(view, con);
cmd.Parameters.AddWithValue("name1", textBox1.Text);
cmd.Parameters.AddWithValue("name2", textBox2.Text);
cmd.Parameters.AddWithValue("companyID", label1.Text);
SqlDataAdapter dap = new SqlDataAdapter();
dap.SelectCommand = cmd;
DataSet7 d7 = new DataSet7();
dap.Fill(d7, "LedgerView");
CrystalMultiLdgerReports cmr = new CrystalMultiLdgerReports();
cmr.SetDataSource(d7);
crystalReportViewer1.ReportSource = cmr;
The above is works fine but problem is that it's take a time. Which is genuine reason and it is being asked here.