Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: (untagged)
hi good evening to all I have a problem record is not fastly retrieve in database through crystal report. visual Studion 2010 sap crystal report. have you any Idea to retrieve fastly data from DB. I have more then 100000 record in a employee table. Please help me. as soon as possible.

and my code is :----------

try
{
SqlDataAdapter da = new SqlDataAdapter("SP_Employee_Details", con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
Employee_DataSet13 ds = new Employee_DataSet13();
da.Fill(ds);
Employee_Report rpt = new Employee_Report();
rpt.SetDataSource(ds.Tables[1]);
crystalReportViewer1.ReportSource = rpt;
crystalReportViewer1.Refresh();
}
catch { }

thanks in advence.
regards
Er. Hem Raj Thakur
Posted
Comments
Mattias Högström 7-Feb-14 6:55am    
How much time is a long time?
100,000 rows is quite a lot for a single report. Cant you implement some form of preview.
Retrieve 200 for displaying first and retrieve the full data report in the background? Or implement some kind of paging where you retrieve data on demand.
Hem Raj Thakur 7-Feb-14 7:28am    
it will take 35-40 seconds. after creating index it will take 20 to 25 seconds only.

1 solution

Millions of records at a time? why? that's not a good way.

Use paging/filtering while displaying the data. Here an article about how to get less data using paging technique.
SQL Server 2005 Paging Results[^]

Sameway, using Selection Formula[^] you could filter data. Filter criteria depends on your requirement. Like displaying particular customer details or between two details, etc.,

Before proceeding reports section, you should consider optimize your database. Check this series for database optimization
Top 10 steps to optimize data access in SQL Server: Part I (use indexing)[^]
Top 10 steps to optimize data access in SQL Server: Part II (Re-factor TSQL and apply best practices)[^]
Top 10 steps to optimize data access in SQL Server: Part III (Apply advanced indexing and denormalization)[^]
Top 10 steps to optimize data access in SQL Server: Part IV (Diagnose database performance problems)[^]
Top 10 steps to optimize data access in SQL Server: Part V (Optimize database files and apply partitioning)[^]

Check these posts/discussions regarding large data handling in Crystal reports
Handling Large Data Sets in ASP.NET and Crystal Reports[^]
Crystal Reports Fails to load while trying to view from CMC and Infoview[^]
Tips to Improving Report Processing Speed In Crystal Reports 5.0[^](Old one but still you could find some useful details here)
How to increase the performance of a Crystal Report so it will run faster[^]
Crystal Reports 2011 running some reports slowly[^]
Crystal Runtime exception: Invalid pointer[^]
Crystal Reports 2011: Give'em what they want![^]

Check these for crystal reports optimization
Optimizing Report Performance[^]
Optimizing Crystal Reports[^]
Crystal Reports: 5 Tests for Top Performance[^]
Crystal Reports 2008 -> Performance Improvement Techniques[^]
CrystalReports Performance Tips[^]
Load Testing Crystal Reports Caching Features[^]
Load Testing Crystal Reports with High Shareability Caching[^]

That's all I have ....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900