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

    Expressions involving two sub-reports (2003)

    I have two reports which total a) quarterly income and [img]/forums/images/smilies/cool.gif[/img] quarterly expenditure. The quarterly sum is produced in each report using a text box which has as its control source =Sum(FieldName); these text boxes are in the report footer of the individual reports and were created by the report wizard.

    The two reports have been inserted into an unbound report (by dragging and dropping); both are working correctly and displaying the right information, including the quarterly totals.

    I need to produce a summary total of income minus expenditure. I have tried a calculated text box and building an expression of type

    Reports![Report1Name]![Quarterly sum text box name] Reports![Report2Name]![ Quarterly sum text box name]

    which is positioned in the report footer of the unbound report.

    However, when run, a #Name? error is generated.

    What am I doing wrong, please?

    Thanks
    Silverback
    Silverback

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

    Re: Expressions involving two sub-reports (2003)

    Subreports are not part of the Reports collection. Try

    =[Report1Name]![Quarterly sum text box name]-[Report2Name]![ Quarterly sum text box name]

    where Report1Name and Report2Name are the names of the subreports as controls on the main report; these are not necessarily the same as the names of the subreports in the database window. Open the main report in design view and click once on a subreport to see its control name in the title bar of the Properties window.

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

    Re: Expressions involving two sub-reports (2003)

    Thank you, again.
    Working OK, now.
    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
  •