Running Sum vs OutputTo

K

k0zaw

Hi all,

Case-1
Noticed that all my runningsum fields tend to show just 1 when I
insert some code in on format event of report. I have insert codes
like follows in On Format event.

Private Sub GroupHeader_QuickRefContent_Format(Cancel As Integer,
FormatCount As Integer)
'QuickRefContent_Short and QuickRefContent_Extended,
'have different control sources, different control widths. Only one is
visible at print.
Me.QuickRefContent_Short.Visible = IIf([txt_GroupCount] < 2, True,
False)
Me.QuickRefContent_Extended.Visible = Not
Me.QuickRefContent_Short.Visible
Exit Sub

Print Preview do OK with above code. But, when I use Docmd.OutputTo or
DoCmd.SendObject for PDF or RTF output, RunningSum fields are showing
only 1. The workaround is goto print preview and then click output
from ribbon menu. But I want to do these output by code.

Case-2
So, In design view, this time I changed the control sources of above
controls to following.
for QuickRefContent_Short =IIf([txt_GroupCount]<2,
[QuickRefContent],"")
for QuickRefContent_Extended = IIf([txt_GroupCount]<2,"",
[QuickRefContent])
QuickRefContent is hiding somewhere on that groupheader section.
And discarded the above GroupHeader_QuickRefContent_Format code.

Result is the same with Case-1.
Is it a bug of OutputTo Code when using with RunningSum?
A2k7 Sp1 + SaveAsPDFandXPS.exe

Thanks
 

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