Reports using Stored Procedures
I am creating reports using the usual viual link expert with parameters and this works fine with VB.Net even passing parameter values at runtime.
My collegues are arguing that this will work for a few records but will be very slow when large data is involved, instead they are suggesting using stored procedure on the SQL serve and returning tables.
We tried this and it works from Crystal Reports designer but the same report will fail with Query engine error if it is called through VB.Net.
Is it true that usual crystal reports will upload all tables then do the selection locally.
Secondly can anybody guide me on the issue of using stored procedures as report source data and using vb.net.
Re: Reports using Stored Procedures
I exclusively use stored procedures to create the data to return to my crystal reports. My experience is that I could not rely on crystal to create a decent sql statement when I used a selection formula or expert. If you use the selection expert, crystal builds the sql statement to get the data it needs, and may pull as much as all the data down from your tables before applying your selection criteria. Yes, this can slow things down alot. In crystal your can go to the show sql query menu item and see just what it is sending to your database, anything missing from your selection criteria is done locally.
Using stored procedures crystal only gets the data it needs on the report, no more and you get the power to optimize your stored procedures on the database. So my opinion would agree with your collegues, if you have the opportunity to use stored procedures, do it. I do not use crystal with vb.net, so not sure on those actual problems your having though, maybe others can help.