Please help: Reports based on stored procedure very slow

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

Im working on an ADP where all my reports have the a recordsource similar to
"exec sp_StoredProcedure 'value1', 'value2', intValue3

The problem I am encountering is that the reports are extremely slow. Even
if i open a report in design mode, it takes over a minute to load and
periodically locks up for a min or two before I can work with it again. I
have found that if i remove the recordsource, this problem goes away.

Any suggestions on how to fix this?
Thanks in advance!
 
I can't help with the running of the report, but you try and assign the
record source of the report with On open event of the report

Me.RecordSource = "Your record source"

And delete the record source, so when you open the report in design view,
you wont have to wait for a minute
 
Ofer

Is this a common problem? I dont understand why it would have to query the
record source evin in design mode.

Your solution does work to speed it up while the report does it's initial
load, thank you.

Ben
 
Yes, it is common.
When you open a query that is based on another query that run a SP, the SP
actually run, so it can return the fields list.

So every time you open the report, even in design view, the SP needs to run,
so it will return the desired field that you want to base your report on.
 
Back
Top