Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trouble with report addition (2000(SR3))

    I have to create a report for a gallery shop that outputs daily sales. The trouble I am having is adding the subtotal for a receipt to the shipping costs.

    If I create a report without a subreport then the shipping is added in to each item of the receipt (so if there are 3 items sold and shipping was $10, I am getting a total of $30 for shipping).

    If I use a sub-report for the details then I can get the shipping to add up correctly, and I can get the subtotal off of each individual receipt, but I can add those subtotals together properly nor can I add the shipping in to the subtotals.

    I access the subtotal from the subreport with the following syntax in the control source of a textbox on the main report =[Report]![sbrptSalesDetails]![Subtotal]. If I try to sum either on the textbox name or directly from the subreport, I get an enter parameter value message.

    The attached excel sheet is a simplified version of what I want to be able to see and add up.

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

    Re: Trouble with report addition (2000(SR3))

    In reports, you can only use Sum on expressions that depend on the record source of the report; you cannot Sum on the name of a text box or other control.

    If you don't use a subform, group by Date and by Rec# in the sorting and grouping window. Create a text box in the group header for Rec# (the text box may be hidden by setting its Visible property to No) bound to the shipping amount, and set its Running Sum property to Over All.

    If you use a subform, create a text box (which may be hidden) that refers to the subtotal on the subform, and set its Running Sum property to Over All.

  3. #3
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Trouble with report addition (2000(SR3))

    That's got me back on the right track. Thanks. I'll post back if I have any other problems but the basics are working properly now. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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