Senin, 26 September 2011

RE: [MS_AccessPros] Report not displaying "0.00" from a null subreport

 

Thanks Duane, I've been out of town and didn't have access to my email, so
I'm just getting my feet back on the ground. I have looked for the "HasData"
property of the subreport, but haven't been able to find it, and I do not
know where to put your suggested code. I tried placing it in the subform's
On Load event and received a compile error.

r/David

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Duane Hookom
Sent: Friday, September 23, 2011 11:55 AM
To: Access Professionals Yahoo Group
Subject: RE: [MS_AccessPros] Report not displaying "0.00" from a null
subreport

David,
You can take advantage of the HasData property of the subreport. Mix this
with IIf() to get your total or 0 like (caution "air" expression):

=IIf(srptParts.Report.HasData, srptParts.Report.txtTotParts, 0)

Duane Hookom
MS Access MVP


To: MS_Access_Professionals@yahoogroups.com
From: drtolson@verizon.net
Date: Fri, 23 Sep 2011 14:00:24 +0000
Subject: [MS_AccessPros] Report not displaying "0.00" from a null subreport

Great Day, I have a report that is printing an invoice for services
performed on a vehicle at a automobile repair shop. the report loads
customer and vehicle data, along with totals from two subreports: one shows
the work that was done on a vehicle - oil change, replace front brakes pads,
etc; and the other one shows the parts that were needed for the job - oil,
oil filter, air filter, etc. In one report no parts were used, so that
subreport does not print, and the total fields in the parent report: "Total
Parts", "Total Tax," and "Total Repair" all display "#Error".

I suspect that these errors are the result of no data in the parts
subreport; however, the "Total Parts", Total Tax", and "Total Repair,"
fields all have the Nz(Field name) function, which I thought would produce
0.00 if that parts field was null.

Thanks in advance for your assistance.

r/David



[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar