Reputation: 11
I have a problem in loading of Crystal Report in VS2010. Please see the code below:
report_sched cr = new report_sched();
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
Tables CrTables;
crConnectionInfo.ServerName = "serverName";
crConnectionInfo.DatabaseName = "MyDataBase";
crConnectionInfo.UserID = "User";
crConnectionInfo.Password = "Password";
CrTables = cr.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
{
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = crConnectionInfo;
CrTable.ApplyLogOnInfo(crtableLogoninfo);
}
I already try the "No Printer" set-up as they said.
What is the best way to less the loading of Crystal Report?
Upvotes: 1
Views: 701
Reputation: 5798
To resolve slow loading in crystal report, remove all tables and good to use a single stored procedure which only get the data which you want to show.
In procedure, you can use where, joins etc. as condition to filter data and after that you use procedure in crystal report same as table you are using right now.
This strategy will give you faster result, the reason is crystal report have only work to show data.
Right now at crystal report, there is first fetch all tables data, then join the condition if you given in selection formula, then filter the data if you given a parameter and finally show the data.
There is so many link you find for this approach. These are some of those:
http://www.pdssoftware.com/newsletter/mar07/page6.htm
http://www.codeproject.com/Articles/10173/Loading-Crystal-Report-reports-which-use-Stored-Pr
Upvotes: 1