Please help: Reports based on stored procedure very slow

B

Ben

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!
 
O

Ofer

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
 
B

Ben

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
 
O

Ofer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top