ON FORMAT event - Detail Section

Daveyk01

Registered User.
Local time
Yesterday, 21:15
Joined
Jul 3, 2007
Messages
144
Question:
In my on-format event for the detail section of my large report, I have code that loads data in to number graphs in the report. This can be rather slow.

It seems to me that the on-format event occures for every page and not just when the report is first loaded.

So if Page 1 has a graph and page two doesn't, it looks to me that the code for page one runs when rendering page 2.

If this is true, this is very inefficient and I need to work out a work-around for this. Maybe put a flag field in the graph so it only is loaded with data one time (i.e., if not objDataSheet.Range("Z1").Value then....)
 
Davey,

The Detail OnFormat event will fire for each row in your report. You could
use the Report's OnOpen event and fire only once, BUT don't the numbers
for the graphs come from your Detail lines?

If so, then you're using the proper event.

Wayne
 

Users who are viewing this thread

Back
Top Bottom