report with repeat section very slow


G

Guest

If you have a header with repeatsection=true and the header visible property
is false it takes forever to print. if the visible is true it prints fine.
The reason this is a problem is I have options on a form for this report that
defines if I need this header. I'm using 2000 lastest update.

Thanks in advance
Martin
 
Ad

Advertisements

A

Allen Browne

When are you setting this value? Set it once, in the Open event of the
Report, not every time (in the Format event of the section).

If that does not solve the problem, are there other sections that are being
shown/hidden or that CanGrow/CanShrink? The interaction of these factors can
cause Access to do a great deal of calculation to try to find the optimum
solution. Can you simplify this design?

If posssible avoid code in the Format event of the sections. For example, it
is more efficient to use Conditional Formatting than to use code in the
Format event to achieve the same thing.

HTH
 
G

Guest

This is the code I'm trying to use

Private Sub Report_Open(cancel As Integer)
On Error GoTo roerr
....
If Forms![zform25]![Sortby1] = 1 Then
....
Me.GroupHeader1.RepeatSection = False
Me.GroupFooter1.Visible = False
....
End Sub

Repeatsection=false gives errors so i commented it out and if you keep it
true in the report and try visible=false it ends up getting stuck in
formatting page. There is no format event code in this report. I do change
grouplevel.controlsourse in the onopen event in the if above. I would like to
get 1 of lines working if possible otherwise I will have to make a second
copy of the report for the option that needs repeatsection. Which would be
sad.

Thanks
Martin
 
Ad

Advertisements

A

Allen Browne

Hi Martin.

Yes, it does appear that the RepeatSection property is read-only at runtime
(i.e. unless you open the report in design view).

I'm not seeing the performance problem with toggling the Visible property of
the section in Report_Open, though I did not try changing the ControlSource
of the GroupLevel as well.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

martin said:
This is the code I'm trying to use

Private Sub Report_Open(cancel As Integer)
On Error GoTo roerr
...
If Forms![zform25]![Sortby1] = 1 Then
...
Me.GroupHeader1.RepeatSection = False
Me.GroupFooter1.Visible = False
...
End Sub

Repeatsection=false gives errors so i commented it out and if you keep it
true in the report and try visible=false it ends up getting stuck in
formatting page. There is no format event code in this report. I do change
grouplevel.controlsourse in the onopen event in the if above. I would like
to
get 1 of lines working if possible otherwise I will have to make a second
copy of the report for the option that needs repeatsection. Which would be
sad.

Thanks
Martin

Allen Browne said:
When are you setting this value? Set it once, in the Open event of the
Report, not every time (in the Format event of the section).

If that does not solve the problem, are there other sections that are
being
shown/hidden or that CanGrow/CanShrink? The interaction of these factors
can
cause Access to do a great deal of calculation to try to find the optimum
solution. Can you simplify this design?

If posssible avoid code in the Format event of the sections. For example,
it
is more efficient to use Conditional Formatting than to use code in the
Format event to achieve the same thing.

HTH
 

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

Similar Threads

Repeat on Report section. 1
Repeat detail section of report 2
Repeat Section 1
Repeat Section 1
Report With Sub Reports VERY SLOW 11
Report Design Very Slow 4
Report Writer very slow 0
Report Running Very Slow 1

Top