471,321 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Report Losing Group Count

26 16bit
I have a report that loses it's group count. In the Group Header there are two TextBoxes, "txtMfg" which is bound to and shows the names of manufactures in the table named "tMfg", the second TextBox named "txtMfgCount1" counts the number of times "txtMfg' changes in the (Mfg Group), and it's property settings are "=1" in it's Control Source and the Running Sum set to "Over All". I have also set Running Sum to "Over Group" and got the same results.

In the Report Footer I have a TextBox "txtMCount1" with it's Control Source at "=[txtMfgCount1]" which shows the number of times "txtMfg" has changed in the Report.

When the Report is opened in Report View, the Report Footer, "txtMCount1" shows a number of "8" which is the right number.

The problem is when I go to Print Preview the textbox "txtMCount1" shows a number of "1" not the expected number of "8".

Has anyone ever had this happen, if so how did you fix it.
2 Weeks Ago #1
7 9436
NeoPa
32,405 Expert Mod 16PB
What happens if you print the report to the printer? I would hope it matches the Print Preview, but if it matches the Report view then you should be ok.
2 Weeks Ago #2
Curious27
26 16bit
Hi NeoPa

Report View shows "8" (Correct Answer)
Print Preview shows "1"
Print shows "1".
2 Weeks Ago #3
NeoPa
32,405 Expert Mod 16PB
:-(

Do you use the Detail Section at all? If not then you can redesign such that each group is a single detail record and then tally more reliably.

Good & clear response by the way :-)
2 Weeks Ago #4
Curious27
26 16bit
Thank you.

I use the detail section to show all the related items to each Mfg .
2 Weeks Ago #5
Curious27
26 16bit
I just put a TextBox "txtTItem" in the Report Footer to count the Detail Section "txtItems" and it returns the correct value "23".

Report View "23"
Print Preview "23"
Print "23" (Hard Copy)

This extra TextBox does not affect the Group total as expected.
2 Weeks Ago #6
NeoPa
32,405 Expert Mod 16PB
I was afraid that might be the case :-(

I'm really not sure how I'd go about fixing this if I'm honest. You could possibly capture the OnPrint or OnFormat event procedures and manage your own count, but as print previews can go backwards as well as forward that means subtracting from your count as necessary as well as adding.

Not sure what to suggest as far as the fundamental design goes though. Sorry.
2 Weeks Ago #7
Curious27
26 16bit
Thank you for looking at it.

This problem occurred one other time about a year ago, I did go through some notes but didn't find anything.
I'll go through all these DB's from that pass and research them, it's here somewhere and when I find the fix I'll share it with you.

Thanks again...
2 Weeks Ago #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by John | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.