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.
mahesh waghelaPosted Oct 14, 2011, 12:25 PM
Javeed M ShaikhPosted Oct 12, 2011, 11:58 AM
mahesh waghelaPosted Oct 12, 2011, 11:53 AM
mahesh waghelaPosted Oct 12, 2011, 11:51 AM
mahesh waghelaPosted Oct 12, 2011, 11:48 AM
Suthish NairPosted Oct 11, 2011, 1:54 PM
Prabhu RajaPosted Oct 10, 2011, 3:34 AM
I don't think my thread would be genuine answer for your post.
But i have experience in crystal Report. I think Its all about execution.
First Your Query Execution in Sql server ,
Second return data's into application and copy from dataadapter into dataset.
third, Do the same work in Crystal Report plus placing data in Correct position in Crystal Report.
So many transaction , will result in delay. More then that, using Crystal Report with database will involve in credentials check.
You may try crystal Report directly with XML. you Will feel the difference because XML do not need credentials check.
Javeed M ShaikhPosted Oct 9, 2011, 9:41 PM
Please do not forget to mark "Accepted Answer".