Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dealing with No Data (2003)

    I have an unbounded report which contains two sub reports. The first sub-report produces a quarterly income summary; the second a quarterly outgoings (=prizes) summary.
    In the unbounded report footer I have some text which says "Net profit for the quarter = " and then a text box which contains, as its row source,
    =QuarterlyIncome.Report![Income Grand Total Sum]-QuarterlyOutgoings.Report![Prize Grand Total Sum]
    This works fine unless there are no prize winners recorded. In this circumstance, the output text is "Net profit for the quarter = #Error"
    I've tried all sorts of IIf's and VBA to deal with the Prize_Grand_Total_Sum not being set up but I'm not getting anywhere.
    What should the row source text be, please, to deal with this case. (I do have an On No Data event on the outgoings report, but it doesn't seem to trigger when it's run as part of the unbounded report)
    Thanks
    Silverback
    Silverback

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Dealing with No Data (2003)

    Try

    =QuarterlyIncome.Report![Income Grand Total Sum]-IIf(QuarterlyOutgoings.Report.HasData,QuarterlyOut goings.Report![Prize Grand Total Sum],0)

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dealing with No Data (2003)

    It works perfectly.
    Thank you, Hans
    Silverback
    Silverback

Posting Permissions

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