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

MS Access Reports Printing #Size! in summary text box

P: 8
I have a report that has six sub-reports. I am totaling each sub-report, and then totaling those totals in the main report.

When I generate the report in "Report View" everything looks good. But when I "Print" or "Print Preview" the report the summary text box on the main report shows: #Size!.

Here is the code I have in the summary text box:

Expand|Select|Wrap|Line Numbers
  1. =Val([txCost])
  2. +Val([txProces$])
  3. +Val(Nz([rptBur].[Report]![txTot]))
  4. +Val(Nz([rptBulSau].[Report]![txTot]))
  5. +Val(Nz([rptStuf].[Report]![txTot]))
  6. +Val(Nz([rptBol].[Report]![txTot]))
  7. +Val(Nz([rptHunt].[Report]![txTot]))
  8. +Val(Nz([rptJer].[Report]![txTot]))
  9. -[txDep]
Some of the sub-reports might not have any data in them. What I'm also finding is that if there is a sub-report that doesn't contain data, the sub-report is not showing on the printed main report.

Any ideas?
Oct 23 '18 #1
Share this Question
Share on Google+
6 Replies

Expert Mod 2.5K+
P: 3,283

Welcome to Bytes!

As an initial observation, I would ask why you use the Val() function for your text boxes, since you are working with numbers. If your text boxes are number, then there is no need to use Val(). If your numbers are not numbers, but are strings, then that is where I would start--making sure any numbers that I am adding are numerical values and not strings the string "8.14" can be recognized as a numerical value by access, but you should always make sure you are adding numerical values, and not something that could be misinterpreted by the system.

Without major changes to your current report structure, there are two approaches that I can think of, initially.

First, I would try to calclate the totals of the other reports via a query (or a Union Query) and then use that value.

Second, you say that if there is no data in a sub-report that it doesn't show up. This can also be dangerous, as you should never refer to something that "might not" be there all the time. You might have a restructure your subreports (or the queries behind them), so that no data produces a report with one record with a value of 0 for its total. That might be more involved. However, let's say we have your report that lists sales for my six salespeople. I want to see the names of my six salespeople, even if they don't have any sales to report. Make sense?

Hope this hepps!
Oct 24 '18 #2

P: 8

Thanks for the response.

I removed the VAL functions and still got the same #Size! in the printed report. By manually selecting "Report View" everything works well. I have noticed that if there is data in every subreport, the print and print preview work correctly.

I use queries to generate the data for the subreports. The individual queries are generating the correct data. I have the subreports in the main section of the master report. The summary text box is in the Report Footer. Could that be the problem?

I am concerned about subreports not showing when there is no data. I'm at a loss of how to troubleshoot that. I have the properties of each subreport set to: Can Grow-Yes, Can Shrink-No. There is the possibility that there can be multiple entries in each subreport.

What is especially confusing to me is that Report View works just fine. It's only in the printed report that the problem arises.

Thanks in advance.
Oct 24 '18 #3

Expert Mod 2.5K+
P: 3,283
Again, I would work toward making sure the Report had "some" data--just so that it is displayed no matter what. Or, calculate the totals separately in a query that feeds to the main report.

Since I don't have the queries in from of me, it's difficult to easily describe how to do that. It depends on the nature of the queries/reports.

The key, again, is to never refer to something that "might not" exist at the time. Why it works in report view but not when printed is beyond my understanding and expertise. MS Access often has a mind of its own.
Oct 24 '18 #4

P: 8
I have determined the issue. The subreports are not showing in print because there is no data. The underlying queries will not even display any data.

There seem to be linked fields in the tables that require some data in them. When I enter some type of data, even choosing "None" from a combobox, it works just fine.

Now I need to figure out how to populate those fields with "None" as the forms load on a new record. Any ideas on that?
Oct 24 '18 #5

Expert Mod 2.5K+
P: 3,283
1. Sounds rather like a question for a new thread, rather than piggy-backing on this one.

That beind said, this would be very difficult, not knowing anything about your reports. Again, I think the solution should focus on querying the totals or, in the case of no records, still displaying the subreport.

Not knowing the datasets behind your reports, I can't recommend any other solutions. I would think the "easy" way is to design a query that adds everything together. That is where I would start.
Oct 24 '18 #6

Expert Mod 15k+
P: 31,489
For any more help on that second question Ed you'll need to post it in a separate thread as advised.
Oct 24 '18 #7

Post your reply

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