Thank you John and Crystal. I am always tickled to see resolutions to
something I am having trouble with. You both have a great day and an even
finer day tomorrow.
Sincerely,
David
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of John Viescas
Sent: Thursday, December 01, 2011 11:04 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] How to display figures from a subreport to the
report
David-
I hate that about reports. The report engine looks at your Record Source and
the fields referenced by controls (not in an expression) and builds its own
SQL
to drive the report. It has to do that to be able to honor sorting and
grouping. But that sometimes means it actually leaves out fields that you
want
to reference in an expression. You can get around that by putting
txtNoCharge
in the Detail section. You can make it Visible = No if you don't want to
display it. That will make the field available to your expression.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
[mailto:MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of David
Tolson
Sent: Thursday, December 01, 2011 4:52 PM
To: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
Subject: RE: [MS_AccessPros] How to display figures from a subreport to the
report
Thanks John, this is what I placed in the report footer of the subreport:
=Sum(IIf([txtNoCharge],[WorkRequestedCost],0))
And "txtNoCharge" is the Yes/No field (forgive my poor naming convention
here); and "Requested Cost" is the field where the cost of the service is
stored, but when I open the report I am prompted to give a value for
"txtNoCharge"
r/David
From: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
[mailto:MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of John
Viescas
Sent: Thursday, December 01, 2011 10:27 AM
To: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
Subject: RE: [MS_AccessPros] How to display figures from a subreport to the
report
David-
A text box in the Report Footer of the subreport like this:
=Sum(IIf([txtNoCharge], [Cost], 0))
.. should give you the sum of the items not charged. Of course, you'll have
to
provide the correct name of the field that contains the cost.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
<mailto:MS_Access_Professionals%40yahoogroups.com>
[mailto:MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
<mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of David
Tolson
Sent: Thursday, December 01, 2011 4:17 PM
To: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
<mailto:MS_Access_Professionals%40yahoogroups.com>
Subject: [MS_AccessPros] How to display figures from a subreport to the
report
Great Day, I have an Report that prints an invoice, and the Report has a
subreport that displays repair items and costs. There could be more than
one repair item with the associated cost, and then I sum the total of all
repair items. There may be an instance where one (or more) of the repair
items is marked as "N/C" for No Charge. There is a Yes/No field that marks a
repair item as N/C in the form that creates the repair order (Invoice). I
load that field in the report as unseen, and I have a text box next to the
cost of the repair item that says..
=IIf([txtNoCharge]=-1,"N/C"," ")
Now jumping back to the report, I show the totals of the repair service:
Cost of Labor
Cost of Parts
Tax
Misc.
Total cost of job (adds to above)
What I would like to do is add a field after Misc. that sums all of the
fields in the subreport where the service item was provided at no charge,
and this figure will be subtracted from the other costs to show the
discount. It would seem that I could filter the form to sum only NoCharge
items, but the form is already filtered for RepairItems.
Any suggestions will be greatly appreciated.
r/David
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
Kamis, 01 Desember 2011
RE: [MS_AccessPros] How to display figures from a subreport to the report
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar