Main Report Textbox Displays Correct Value in Report View, But Displays Zero in Print Preview (1 Viewer)

scotty113

New member
Local time
Today, 15:49
Joined
May 3, 2021
Messages
4
Hi All, first post here so hopefully I give enough information.

I have a report for generating an invoice that contains a sub-report which shows the invoice details. In the sub-report I have a textbox control for CurrentBilling which shows the billing for each item/row in the sub-report. I then used a separate textbox with Running Sum property set to Over All to get the total CurrentBilling for the invoice. I then created a textbox in the sub-report footer and set it equal to the running sum text box. The main report sub-total refers to the textbox in the footer of the sub-report.

When I view the report in Report View, everything looks good and the values are correct. When I change the view to Print Preview, the subtotal value shows 0. This happens for four text boxes on the main report (all of which have their control source set to textboxes in the footer of the sub report). I've found lots of posts on textboxes disappearing when changing views but nothing relating to the value of the textbox going to zero.

Anyone else have this happen to them before? Any help would be much appreciated!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:49
Joined
May 7, 2009
Messages
13,775
can you create a query and sum the bills there.
Use the calculated column in your report.
 

scotty113

New member
Local time
Today, 15:49
Joined
May 3, 2021
Messages
4
The short answer is no. The sub-report is based on a query where I pull all the fields I need to generate the invoice details, but the calculations are done at the report level. This was because I needed to pull multiple values from previous records to use for the new records (ie. the CompletedToDate field is used as the PreviouslyCompleted on the next invoice). The invoice details can be more than one row and I was having difficulty using DLookup to pull multiple values from one field at the query level. I opted to do it at the report level and then use a running sum because I had compounding calculated controls that weren't working with the sum function in textbox controls in the footer (I learned you can't sum a calculated control directly and need to copy the expression into the sum function... which didn't work with my DLookup becuase I was using parameters (not field names) in the function's criteria).

Everything works great in Report view, I probably wouldn't have even noticed it had I not tried to print the invoice to see how it looked after it printed.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:49
Joined
May 7, 2009
Messages
13,775
how to you Reference the control on the subReport?

=[SubReportName].[Report]![textboxnameOnReportFooter]
 

scotty113

New member
Local time
Today, 15:49
Joined
May 3, 2021
Messages
4
sorry, it hit enter before I could put the reference:
=[subrptInvoiceBillingSummaryPercentage].[Report]![txtSumOfCurrentBilling]
 

Users who are viewing this thread

Top Bottom