Jumat, 23 September 2011

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar