Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: SQL <--------------> Crystal Post Reply Post New Topic
Author Message
mikebird
Groupie
Groupie
Avatar

Joined: 04 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 70
Quote mikebird Replybullet Topic: SQL <--------------> Crystal
     Posted: 04 Nov 2008 at 1:56pm
Where on the scale is the best balance?

1. Do everything in views / stored procedures? Perform all grouping on server?

OR

2. Do everything by joining tables, creating formulae and aggregating in Crystal?


I'd say always 1. as long as you have constant connection but a slow one, as the aggregation will get the network activity lessened.

Crystal does things SQL CAN'T DO - eg. cross-tabs, and makes the result nicer than a load of courier font listing. Good to save data with it and make it portable.

I have a fully functional Dashboard Report with 12 Gauges on it. Boss is asking me to rewrite it with a stored procedure behind it, where it WAS just a view with 10 columns into the report, many formulae producing between 3 to 15 needles per gauge... This is a lovely way for me to develop. Is it too demanding to do it this way? The server has been crashing.

Should the level at which you develop be kept an eye on?
Life = luck (+/-) and effort (+/-). If you have no luck & make no effort, then you are dead
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Nov 2008 at 6:40am
I don't know.  I don't like 2, stored procs can do so much more than Crystal.  Personally, I do a combination.  All my data collection is in stored procs and much of my calculations, but since users can change the order and grouping of my reports, I have Crystal do the grouping and sorting. I create plenty of formulae, mostly for displaying calculations as the users can choose one of several, and depending on grouping the grouping totals need to be recalculated.  I also end up using a good deal of suppression of rows and columns based on user input.
 
I could probably sort on the server in my proc, but isn't Crystal just going to try and sort anyways?  In some cases, the grouping criteria has been developed over time in Crystal and, personnally, I don't want to try and do it in the stored proc...afraid I will get it wrong.
 
Currently, I don't join to the database from Crystal anymore.  My app creates a dataset (XML) that I pass into the report
 
Well, there's my two cents
 
Hope it helps
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 07 Nov 2008 at 8:27am
I doubt if your server crashing has anything to do with your report's current design because you are already using views to pull the data. On the client side, you are using Crystal to calculate formulas for each gauge, but this doesn't have any effect on the server. If you were doing filtering in the report, then yes you could decrease server load by performing it on the server side. But I don't see that happening and thus you server will still crash.
 
Plus, where is the benefit of going from a view to a stored procedure? A view and SP are both just SQL being run on the server. Of course, you can do more with an SP, but in this case it doesn't sound like it's going to effect the server load at all. So I don't see the point (other than change for the sake of change). You need to look at the server and see how to fix it so that it can handle larger loads.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Nov 2008 at 9:04am
No, I hadn't thought about that way, and you're right, both the view and proc are SQL and I wasn't addressing the server crashing...I think that I was stating that doing it all in Crystal is not the most desirable/versatile way to create a report, but that doing it all in SQL doesn't work for me.
 
Sorry missed the point of the post which is how to get the report out and not crash the server.
IP IP Logged
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