By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,494 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Different Values Displayed in Report Layout View & Print Preview

P: 10
I have a report with several fields/text boxes that are used to determine the values of various report/field totals. Everything is calculating and populating the fields correctly when I view the report in Layout View. However, when I view the report in Print Preview, one of the fields suddenly has a value of 0.00. This field is used in a calculation and acts as the denominator of an equation, so naturally, I get a "division by zero" (#Div0!) error in the dependent field.

I don't understand why it's working in layout view, but not print preview.

Any help would be great!
Aug 20 '12 #1
Share this Question
Share on Google+
5 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,032
jcrist30,

First, an example of your report, or the fields behind it would help.

My recommendation would be to try to calculate that field before it gets to the report (i.e. if the report's record source is a query, calculate the fields you need beforehand.

Why it would give you different values between layout and print view is beyond me, but stranger things have happened in Access.
Aug 20 '12 #2

P: 10
Twinnyfo,

Everything that can be calculated in the query has been. I figured that might have had something to do with an issue I was having earlier, and I was correct. Unfortunately, the fields/controls giving me issues now are only calculated on a combination of certain records, not all records, so I can't use the query and simply pull the fields into the report.
Aug 20 '12 #3

twinnyfo
Expert Mod 2.5K+
P: 3,032
Ahhhh, so is this in a header or footer in the report? A copy of the db/report/queries would be helpful to troubleshoot.

I have found that sometimes the layout view does not completely calculate all tihngs properly, as this view is (typically) for properly rearranging your controls......
Aug 20 '12 #4

zmbd
Expert Mod 5K+
P: 5,285
I have had this happen a few times in V2010; however, what I found when I ran the underlying query was that the records returned had nulls/zeros as results in several of the fields.

Now, I just avoid the layout view as it really doesn’t seem to help me… one of those bells/whistles that I don’t think MS asked anyone about … IMHO.

As you have not told us which section the fields are in, I will take my best guess that they are in the "details" section.

Not to state the obvious, but I will :) : If this were my database, the very first thing I would do would be to open the underlying query and make sure that it is actually pulling the records you think it is. You’d be surprised how many times this is the issue… and the plug being pulled out of the socket by the cat is the #2 issue with electronics not powering up too! The query is the basic plug for most reports so let’s make sure we’re getting power. :)
I also agree with TwinnyFo so far in that if the calculations are being made at the record level then having the calculations performed in the query is my preference; however, if in a summary field in the header/footer then you may very well be stuck doing them at runtime for the report.
Please let us know if this helps…
-z
Aug 20 '12 #5

zmbd
Expert Mod 5K+
P: 5,285
jcrist30
We're going to have to have something more specfic than you've given us.

In this case we're going to have to have the actual sql feeding the report and then the controls datasources.

-z
Aug 20 '12 #6

Post your reply

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