Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    1
    Thanked 0 Times in 0 Posts

    sub-reports (2000)

    HI

    I am trying to add 3 figures from my main report to the sub report (cost_qry) and using the expression builder I came up with

    =[p1 Grand Total Sum]+[Text116]+[Text117]+[cost_qry].Report![p1 Grand Total Sum]

    which works after a fashion, in that it prompts for [cost_qry].Report![p1 Grand Total Sum] and [p1 Grand Total Sum] as parameters, pressing enter twice allows the report to run and correctly arrives at the total, but as I effectively want a total for each month in a year I don't want to press enter 24 times etc.

    any ideas ? (probably really easy)

    cheers

    Bobski

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: sub-reports (2000)

    I think you have made a mistake using the expression builder.

    You say you want to add three items from the main report, and put the total in the subreport (called cost_qry) yet your expression includes 4 items, one of which is on the subreport.

    I suggest you try to add the three items within the main report. Create a new unbound text box, and set its control source to the sum of the three items you want to add, using the expression builder.

    When that works, use the expression builder to transfer the result to the subreport. If you are working within the subreport, the expression builder should include Reports! and the name of the report in the reference to the control. If the control is on the current report (or form) you can leave this out.
    Regards
    John



Posting Permissions

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