Hello-
I just managed to get the total from my subreport to sum with my main
report total. I am able to get the correct display if I do not have any
total in my subreport. BUT, what if I don't have a total in my main
report? Below is the control source for my main report's total textbox.
=Sum([ExtPrice])+IIf(srptSOPItems.Report.HasData,srptSOPItems.Rep ort.SOPTotal,0)
Again, if there is only a total from the sub, and not the main report,
how would you rewrite this equation to reflect that?
Thanks-
Scott 6 3452
Use Nz() to specify zero for null:
=Nz(Sum([ExtPrice]),0) +
IIf(srptSOPItems.Report.HasData,Nz(srptSOPItems.Re port.SOPTotal,0),0)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Scott" <ss***@henryschein.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com... I just managed to get the total from my subreport to sum with my main report total. I am able to get the correct display if I do not have any total in my subreport. BUT, what if I don't have a total in my main report? Below is the control source for my main report's total textbox.
=Sum([ExtPrice])+IIf(srptSOPItems.Report.HasData,srptSOPItems.Rep ort.SOPTotal,0)
Again, if there is only a total from the sub, and not the main report, how would you rewrite this equation to reflect that?
Allen Browne wrote: Use Nz() to specify zero for null:
=Nz(Sum([ExtPrice]),0) + IIf(srptSOPItems.Report.HasData,Nz(srptSOPItems.Re port.SOPTotal,0),0)
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Scott" <ss***@henryschein.com> wrote in message news:11**********************@f14g2000cwb.googlegr oups.com... I just managed to get the total from my subreport to sum with my
main report total. I am able to get the correct display if I do not have
any total in my subreport. BUT, what if I don't have a total in my main report? Below is the control source for my main report's total
textbox.
=Sum([ExtPrice])+IIf(srptSOPItems.Report.HasData,srptSOPItems.Rep ort.SOPTotal,0) Again, if there is only a total from the sub, and not the main
report, how would you rewrite this equation to reflect that?
This just returned #ERROR......Any ideas?
If there are no records in the main report, you will need to test its
HasData property as well.
If there are records, split the expression into 2 text boxes until you get
it working correctly. Once you have it solved, you can put it back together
again.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Scott" <ss***@henryschein.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com... Allen Browne wrote: Use Nz() to specify zero for null:
=Nz(Sum([ExtPrice]),0) + IIf(srptSOPItems.Report.HasData,Nz(srptSOPItems.Re port.SOPTotal,0),0)
"Scott" <ss***@henryschein.com> wrote in message news:11**********************@f14g2000cwb.googlegr oups.com... > > I just managed to get the total from my subreport to sum with my main > report total. I am able to get the correct display if I do not have any > total in my subreport. BUT, what if I don't have a total in my main > report? Below is the control source for my main report's total textbox. > > =Sum([ExtPrice])+IIf(srptSOPItems.Report.HasData,srptSOPItems.Rep ort.SOPTotal,0) > > Again, if there is only a total from the sub, and not the main report, > how would you rewrite this equation to reflect that?
This just returned #ERROR......Any ideas?
Allen-
Thanks for the help on this. It would be when the main report has no
records, but the sub report does. How would you test the HasData
property?
*** Sent via Developersdex http://www.developersdex.com ***
=IIf([Report].[HasData], Nz(Sum([ExtPrice]),0), 0) +
IIf(srptSOPItems.Report.HasData,Nz(srptSOPItems.Re port.SOPTotal,0),0)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Scott Sabo" <ss***@henryschein.com> wrote in message
news:bV**************@news.uswest.net... Allen-
Thanks for the help on this. It would be when the main report has no records, but the sub report does. How would you test the HasData property?
Allen-
This worked, thanks so much for the help! I have a much greater
understanding of this now.
Scott This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Warren |
last post by:
I am trying to create a report that does the following:
Access Data in Query:
NAME | DATE | SALE TYPE |
-------------------------
John DOE | 1282003 | TYPE A
Jane DOE | 1282003 | TYPE C...
|
by: Kailey11 |
last post by:
This probably is a basic question for most of you, but I am setting up an very
simple database - person, date traveled, location and milage - using ACCESS
2000 and I want to add up the milage in...
|
by: ABinBoston |
last post by:
I have an Access Application that I would like to have a report print on
pre-printed Invoices.
The Totals are in the Footer, but the report prints a different size depending
on the number of...
|
by: Bob Alston |
last post by:
I am looking for Access reporting add-in that would be easy to use by
end users. My key focus is on selection criteria. I am very happy with
the Access report writer capabilities. As far as...
|
by: Seyi1 |
last post by:
I am attempting to create a report with sub-totals in the body of the
report and a total at the bottom.
how do I go about doing this thanks:
here is an example of the result I need to achive
...
|
by: Cary Carter |
last post by:
I'm trying to SUM the CountOf field totals in a report.
In a report based on a select query that uses CountOf{fieldname} I am attempting to get the SUM totals of the X number of count totals.
...
|
by: hanshirley88 |
last post by:
Hi,
I am doing an expense and funding report which contains a list of
consumers by Region and then by SiteID. For example,
Region: NE
Site: NEMV
1. Mary Doe
2. Len Willams
|
by: beebelbrox |
last post by:
Greetings all.
Once more I must dip into the font of your collective wisdom and request help:
I have been given the task of taking an exsisting Access Query and exporting it to excel. There...
|
by: ollyb303 |
last post by:
Hi,
I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by supervisor.
I have one crosstab query (Query1) which...
|
by: peter1234 |
last post by:
I am trying to produce study notes for ACCESS, and for many days I am stuck trying to produce totals and subtotals for table ‘Order Details’ from ‘Northwind Sample Access Database’. The fact that I...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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: 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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |