Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2010
    Posts
    186

    Unanswered: #Name? in a calculation that is custom formatted where no data - Access 07 report

    In my invoices main report with 6 subreports.....I have 2 subreports that have 3 sums in them and I bring those onto the main report. In an attempt to not see anything if there isn't any subreport data I set custom formats

    Data is appearing exactly as I need it in print preview........shown on attachment mrWCIG. I found a problem with the custom format when I looked in report view - all of the no data stuff appears as #Name?. (Report view also running painfully slow so I'm not sure I'll get an example to attach)

    Problem being - I've been unable to write the expressions I need using these sums. I tried different paranthese and brackets and Nz but got nothing, the calculations treated the value as 0.

    3 similar sums that come from subreports, all using report.hasdata in the control source, all show data when there is data, nothing when there is not in print preview, #Name? when there is not in report view
    1 is in the Section 1 footer
    2 are in the Section 0 footer

    I need to use these sums in calcuations with other Section0 footer fields.
    Is there a function I can use (like an Nz) to get the expression to ignore #Name? so that I can get a value to use in the calculation? How do I write it?

    If not, I can remove the custom format but Is there a VBA that will hide fields with no data?
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Consider using the nodata event in tge sub reports to stop printing
    Push the data from the sub reports to the head report f you need to summarise.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2005
    Posts
    119
    are you using the field name in the calculation? for example the box on your report is called "xxx". Is there an actual field in your data called "xxx" and used in your calculation? if so, try changing the box name to something different, like "xxx2".

  4. #4
    Join Date
    Jun 2010
    Posts
    186
    Quote Originally Posted by Krista327 View Post
    are you using the field name in the calculation? for example the box on your report is called "xxx". Is there an actual field in your data called "xxx" and used in your calculation? if so, try changing the box name to something different, like "xxx2".
    No - all of the names are unique

  5. #5
    Join Date
    Jun 2010
    Posts
    186
    Quote Originally Posted by healdem View Post
    Consider using the nodata event in tge sub reports to stop printing
    Push the data from the sub reports to the head report f you need to summarise.
    I have it set up that way......but without the custom format in properties I can't get the textbox on the main report not to show $0.00. I only want to see if it it's value is more than $0.00. I use print preview on the screen so it would be great to be able to hide them on the screen and when they print unless they are more than $0

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    If you are unable / unwilling to push values from the sub reports up to the top level, then consider using the NZ function
    failing that the Coalesce function may be of use
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •