Grand Total - No value returned

macherie

Registered User.
Local time
Today, 15:45
Joined
Nov 5, 2003
Messages
13
I have 3 different sale subreports within a main sale report. I want a grand Total of all 3. I use the following code for each of the subreport totals. The totals reside within the individual subreports.

=IIf(Sum([TotalUnitSale]) Is Null,0,Sum([TotalUnitSale]))
(I have called this txt box TotalUnitSale)

I have subtotal'd each of the subreports within the detail section of my main Sale report and the code for that subtotal is:

=IIf(IsError([SubReportName].[Report]![TotalUnitSale]),0,[SubReportName].[Report]!TotalUnitSale])
(I have called this txtbox TotalSale, it's objective is to total all the sales for that particular invoice)

Now I want to place a GrandTotal in my report footer. When I do this, I receive no value. I am using the following code:

=sum([TotalSale])
The objective of this grand total is to sum all the invoices for the final grand total of sales.

The GrandTotal value never displays (my visible is on).

Can someone help me please.
Thank you for your time.
Dawn.
 
You should use the HasData method, and then repeat the calculation.
 
Hi Rich,

Thank you for your response. I'm a true newbie to MSAccess.
I looked up in the Help section for HasData and the following code is what was suggested:

Me!SubReportControl.Visible = Me!SubReportControl.Report.HasData

This is fine, but I'm not sure this is what I need. The help indicated that "You can use this property to determine whether to hide a subreport that has no data. For example, the following expression hides the subreport control when its report has no data."

I don't want to hide the subreport if it has no data. I want it to show always. Would it be easier if I zipped my db and explained that way? Being new, I'm probably not explaining at your level. I can copy out the tables/queries and reports that are required to resolve my problem.

Thank you for any assistance you can give.
Dawn.
 
Yes, the HasData method is preferable to the IsError method you used.
=IIf([SubReportName].[Report].[HasData],[SubReportName].[Report]![TextBox],0) + IIf([SubReportName2].[Report].[HasData],[SubReportName2].[Report]![TextBox],0) etc,
 
Hello again Rich,

Ok...I did what you suggested and I still get no return. Here is the code that I entered into the txt box (TotalSale) (which is the txt box that subtotals the 3 different subreports:

=IIf([rsubModemSale].[Report].[HasData],[rsubModemSale].[Report]![TotalModemSale],0)+IIf[rsubUnitSale].[Report].[HasData],[rsubUnitSale].[Report]![TotalUnitSale],0)+IIf[rsubCommunicationSale].[Report].[HasData],[rsubCommunicationSale].[Report]![AnnualCost],0)

When I go from design view to print preview the "Enter Parameter Value" - TotalSale window pops up (and always has). I then have to press enter, click ok or cancel. When I click ok, the grand total value is empty. Hmmmm

Dawn.
 
Pardon my ignorance Rich...what is a 97 ver? 97 Version of my db?
Dawn.
 
Yes, that's the only version I have. I believe you have the option to save a copy of your db to a previous version
 
Ok. Actually I have to convert it using the db utility. I've tried this before and it didn't seem to work, but I will try again.

Dawn.
 
Rich,

My DB after zipping is 156Kb and I'm only allowed to send 102kb. Can I e-mail this to you?

Dawn.
 

Users who are viewing this thread

Back
Top Bottom