Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Data Connectivity
Message Icon Topic: Connecting Database Tables and Database Views Post Reply Post New Topic
Author Message
AlexanderAPWM
Newbie
Newbie
Avatar

Joined: 21 Mar 2012
Online Status: Offline
Posts: 4
Quote AlexanderAPWM Replybullet Topic: Connecting Database Tables and Database Views
    Posted: 30 Apr 2012 at 10:09am
Hello, I have an issue with my refresh speed for a report.

In making this report i had to add the certain database tables and also database views. As soon as i dropped a field from the Views into my report the refresh goes 10 records at a time.  Since i have linked two sources i believe it has slowed my refresh speed to a crawl. Is there a way to speed the refresh rate up? Are the linking and joins the issue?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 01 May 2012 at 3:03pm
The issue is probably the view itself.  A view is a SQL statement that can be used like a table.  The database runs the SQL in the view at the time of the refresh.  Generally, views are not indexed so when you link to them from a table, there is no index available to speed up the processing.  I would look at a couple of things:
 
1.  Make sure that the SQL in the view is optimized so that it runs fast.
 
2.  If that doesn't work, think about creating a view or command that includes the tables that your using in your report - so you have a single SQL statement that uses all tables and doesn't connect to the view.
 
Also, make sure that you  have the following options turned on for your report:
 
Use indexes or server for speed
Perform Grouping on server
 
These setting will  push the processing to the database server which is usually much faster than having Crystal download all of the data and to the processing in memory.
 
-Dell
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 May 2012 at 3:57am
This may not be applicable but just in case...
be aware that in crystal when you join tables (or views) the join is not automatically enforced so your data set is not necesarily complete (or what you would expect based on the join).
The join will become enforced (altering the data set) if you:
- manually enforced it inside the join properties
- or as soon as you use at least one field from both tables in the join. (It can be used in any way in the report not just for displayed on the canvas)
 
A symptom/result of the second type of enforcement can be described as, in the preview mode, when a user adds a field to the table the report size either explodes or shrinks and summary values jump all over the place.
IP IP Logged
AlexanderAPWM
Newbie
Newbie
Avatar

Joined: 21 Mar 2012
Online Status: Offline
Posts: 4
Quote AlexanderAPWM Replybullet Posted: 03 May 2012 at 11:20am
Hello,

So after reading your suggestions I moved the Views around in the database expert and linked it to a different Table and the report refreshed in 10 minutes as opposed to 30 minutes. Then i gave one of the Views linked fields a left outer join and now it refreshes in 17 seconds. I am still confused as to why that worked, but I am not complaining. I did go into the options and check-marked "Perform Grouping on Server" but I haven't noticed a difference yet.

Thanks for the help,

Much appreciated!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.