Data showing in Layout View but not in Print Preview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • noclueforid
    New Member
    • May 2010
    • 24

    Data showing in Layout View but not in Print Preview

    I have a report with 4 sub reports on it. Each sub report contains a total from the related data in it. The expression I use in the report footer for each sub report is:

    Code:
    =Sum(Nz([curJSRAmount],0))
    curJSRAmount is of course different on each sub report, corresponding with the related data.

    I then total those 4 sub report totals on the main report footer using:

    Code:
    =Nz([rptTraining].[Report]![Text4],0)+Nz([rptTransportation].[Report]![Text4],0)+Nz([rptJob].[Report]![Text6],0)+Nz([rptRelocation].[Report]![Text6],0)
    When I view the main report in Report View, everything is fine, all totals populate and everything looks good. When I print it, I get an "#Error" in the main reports total field.

    One of the sub reports does have a null amount, but shouldn't the Nz function take care of that? Any suggestions why this is giving me an error?

    Thanks!
    Dave
    Last edited by NeoPa; Jun 13 '11, 10:38 PM. Reason: Added mandatory CODE tags for you.
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1290

    #2
    Try breaking it out into 4 individual totals to see if the problem lies with one of the 4 references, or maybe to all 4 references.

    But I think maybe you need to qualify the references.
    Code:
    [rptTraining].[Report]![Text4]
    needs to be
    Code:
    Reports![rptTraining].[Report]![Text4]
    Jim
    Last edited by NeoPa; Jun 13 '11, 10:40 PM. Reason: Added mandatory CODE tags for you.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32634

      #3
      I would certainly recommend trying out the formula with different ones of the references left in to see if any of the individual references is the individual culprit. It could be as simple as a mis-spelling or typo.

      Comment

      • noclueforid
        New Member
        • May 2010
        • 24

        #4
        Ahhh..the effects of long hours of work......narro wed it down as suggested and one of the queries with date entry was the culprit. I forgot to put "Between" in front of the statement.

        Thanks!!!

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32634

          #5
          Sometimes it's just about knowing how to debug. Sometimes it's about understanding what sorts of things are likely to cause such an error, and thus where to start looking. Sometimes it's as simple as doing the things we would tell others if they came to us for help, but we're too involved in the problem to stop long enough to consider that. Anyway, glad to hear you were able to find the issue :-)

          Comment

          Working...