×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

whats the fastest way to get data..

whats the fastest way to get data..

whats the fastest way to get data..

(OP)
I have designed several reports using crystal reports. But i want to know what is the fastest way of getting the report data to get displayed. Bcz when there are lets say a million records in the Database and u have to print some of them then Crystal reports takes ages to get it displayed. I use selection formula method for filtering the records. I am also using SQL Server Database and my application is designed in Visual Basic.


RE: whats the fastest way to get data..

This is probably not the fastest way, but perhaps you can use some of it:

1) Don't use ODBC if you can avoid it. It's really slooow.
2) Use SP/RCP and do most (if possible all) calculations on server; only return data you have use of (the server is usually more powerful and less data is transmitted reducing bottle-necks).
3) Use SQL statements that are not logged (i.e. Select, Select Into, Bulk Copy).
4) Use multi-threading in your application if possible - let larger operations work in the back-ground with low priority so users can continue work.
5) If you use multi-threading, do not use long loops without calls to 'sleep' or 'wait' command as this will block user interaction.

If you have 1 million posts, there is no fast way to select into Crystal Report - my experience is that CR is a slow turtle only effective for smaller report presentations.

RE: whats the fastest way to get data..

A few additional tips:

1. Don't use "Page M of N" or any other function that requires late-time computation.

2. If you're running through a million records on the back end and you want output to show up quickly, you'd best do as little grouping as possible (even with grouping on the server side).

3. In general, if you've got that big a data source on the back side, the only way you'll get something to show up quickly on the front side is by removing all grouping and sorting from the report so it's a straight data pull.  Otherwise, the time requirements for sorting and/or grouping will be demonstrably noticeable to the viewer.

4. Outside of those notes, I heartily concur with the previous poster.  Stored procedures on the back side are the way to go; they make most efficient use of the server capabilities and minimize the amount of work required at the client side before Crystal can show the first page.

Richard A. Polunsky
Houston, Texas


RE: whats the fastest way to get data..

One of the enhancements added in CR8.5 is "Report Streaming" - that is the page server (the server component that executes on-demand reports) will start to return data to the viewer as soon as it is ready. Ie. basic DB fields can be returned as they are read in pass 1, while Page N of M or % or total calculations are returned during/after pass 2. If a page needs data that is not available, holder frames will be displayed with "Data not ready" or some such message.

I think this only works in the ActiveX viewer. I'm not sure about Java and pretty sure it's not supported in DHTML.

To see this behaviour, run the World Sales Report (one of the supplied sample reports) in on-demand mode in the ActiveX smart-viewer. Note the pie chart is not initially displayed, but drawn in later - but you'll have to be quick to see it

Cheers,

Alan Eldridge
Melbourne, Australia

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close