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!
5 6734
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.
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.
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......
zmbd 5,501
Expert Mod 4TB
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
zmbd 5,501
Expert Mod 4TB
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
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Pat |
last post by:
I would like to send the Print Preview of a MS Access form to a
Snapshot file. The form contains an OLE graph.
BACKGROUND
A snapshot of a report is possible. If I could I would use a report to...
|
by: Richard Hollenbeck |
last post by:
I noticed I can't push a value into a text box by saying something like,
"txtThisTextBox = intSomeVariable * 0.5"
because I get an run-time error saying I can't assign a value to this
object....
|
by: Dean Slindee |
last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports
already written and stored in an Access 2002 database; or 2) execute the
print of a report stored in an Access 2002...
|
by: Brad Pears |
last post by:
I have a vb.net 2005 application and am using the print preview screen. This screen has a printer icon on it that the user can use to print the document currently being viewed. It uses the default...
|
by: rewindspline |
last post by:
hello,
i have a simple MS Access 2003 database for producing reports from multiple tables.
this morning i made a slight change to some text boxes in the report and now i can't open the report....
|
by: mailjaneen |
last post by:
Hello, can someone help me.
I want to display some fields on a report in print preview (i.e.
instructions), that I don't want to print to the printer or export to
file. I can't seem to find any...
|
by: n8kindt |
last post by:
i have a thread posted elsewhere but it got long and messy. this is all that needs to be seen:
http://i3.photobucket.com/albums/y72/n8kindt/verticalerror2-1.jpg
the report looks great until i...
|
by: Gord |
last post by:
When I open a certain report, it runs some code that generates the records
that will be displayed in that report. This works fine. When I go to print
preview the report it appears that the code...
|
by: scubasteve |
last post by:
I've developed a product pricing application for a client in AC2007.
They enter all the data on the one main form, then click a button to open a printable report in Print Preview.
My problem...
|
by: Scorp Scorp |
last post by:
Dear All,
I designed a report, and bound with some data, the retreived data is 7 coloumns.
I set a buttong to open the report in print preview, also to show display the page in landscape.
Now on...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |