Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2003
    Posts
    33

    Unanswered: #Error in Report

    When the query returns a record there is no error. But when there is not a record for the criteira entered the Sum([Field Name]) expression returns a #Error.

    Does anyone have a fix for this?

    Thank you,
    Gina

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Try this

    Sum(nz([field name]))
    Inspiration Through Fermentation

  3. #3
    Join Date
    Jul 2003
    Posts
    33
    Yeah I tried that. The problem is the criteria that it is filtering records on is Null.

    so I'm asking the report to filter all the records grouped by CSICode where CSIcode is passed via a parent report. But the expression is Sum(ApporvedAmount) and gives me an error when CSICode is null.

  4. #4
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    So this is a sub report that shows some kind of detail for a parent item?
    The CSICode can exist in the Parent Report but there may not be any
    detail for the sub report?

    If that's what your looking for, you need to use the HasData property for the sub report:

    Me!subreport.visible = Me!subreport.Report.HasData
    Inspiration Through Fermentation

  5. #5
    Join Date
    Jul 2003
    Posts
    33
    This doesn't really work for me becuase I Need to have the Sum([fieldName] = 0 or null if there is not data.

  6. #6
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    How about this:

    Create a second field, in the same size and position as the field returning the error. Use the HasData property to display/hide these 2 fields. If no data, display the null field, otherwise display the SUM field.
    Inspiration Through Fermentation

Posting Permissions

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