×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

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!

*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

which one is efficient and faster

which one is efficient and faster

which one is efficient and faster

(OP)
          The reports i am working on uses five or six tables. The size of all these tables i mean the number of records is very big. Tell me which method is very
efficient and faster.
      1. Directly select all tables from crystal reports and code the selection formula in Report --> Edit selection formula --> Record to filter records.
      2. Make view which has all the tables involved and add the where conditions so that the records are filtered at server side.
  For eg create view like this
        select col1, col2, col3, col4........
        where table1.prikey = table2.forkey and
              table1.key1 = table3.key2 (+)......
        Now use this view in stored procedure and depending on the user input, records can be filtered by using the stored procedures parameters. The records returned by stored procedure can be used by crystal reports.
         I think the second method will be faster as records are filtered at server. In first method all the records are loaded......then the records are filtered by crystal reports. The difference is in first method records are filtered at crystal reports and in second method records are filtered at server. Help me if i am wrong.   

Thanks

Satya.

RE: which one is efficient and faster

Crystal will generate a SQL statement for the server, and some of the criteria will make it into the WHERE clause, but a view or Stored Procedure will usually be more efficient.  To see the SQL that Crystal is sending use "Database - Show SQL"

Ken Hamady
http://www.kenhamady.com/
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.

RE: which one is efficient and faster

(OP)
     It sends the SQL to the server before the data is being loaded or after loading, the data is filtered by crystal reports ?

Thanks


RE: which one is efficient and faster

The SQL that you see within CR is sent to the  server before CR sees the data, that is how the data is generated.  Check the WHERE clause to see what parts of your report criteria are making it to the server.

Ken Hamady
http://www.kenhamady.com/
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.

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