Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Calculation between two subreports

Discussion in 'Information Technology' started by Larry G., Jul 28, 2006.

  1. Larry G.

    Larry G.
    Expand Collapse
    Guest

    Here is a question I have not seen before.

    I have two subreports on one main report. I want to calculate the difference
    between a total on each report.

    Report A has a total gallons pumped through a system, each reading is taken
    daily and then totaled in the report footer.

    Report B has a total gallons pumped through 22 individual wells, reading sa
    re taken once a week and the total is calculated in the footer of report B.

    In the footer of the Main Report I want to calculate the difference between
    those two numbers. here is what I put in the unbound text box:

    =([Reports]![Weekly Gallons
    Pumped]![text11])-([Reports]![rptMWTotalUsage]![text3])

    I get a #Name? error on the report. Any ideas?
    --
    Never give up, the answer IS out there, it just takes a while to find it
    sometimes!
     
  2. Loading...

    Similar Threads Forum Date
    How Did Sikh Heritage Become Hostage To Hostilities Between India And Pakistan? Hard Talk Jun 26, 2016
    Is There A Thin Line Between Love And Hate? Interfaith Dialogues Apr 25, 2016
    what happened in between Blogs Oct 16, 2015
    Sikh Marriage Between Man & Woman Sikh Sikhi Sikhism Jul 1, 2015
    Difference between us and the Gurus? Sikh Sikhi Sikhism Dec 25, 2014

  3. Wolfgang Kais

    Wolfgang Kais
    Expand Collapse
    Guest

    Hello Larry.

    "Larry G." wrote:
    > Here is a question I have not seen before.
    >
    > I have two subreports on one main report. I want to calculate the
    > difference between a total on each report.
    >
    > Report A has a total gallons pumped through a system, each reading is
    > taken daily and then totaled in the report footer.
    >
    > Report B has a total gallons pumped through 22 individual wells,
    > readings are taken once a week and the total is calculated in the
    > footer of report B.
    >
    > In the footer of the Main Report I want to calculate the difference
    > between those two numbers. here is what I put in the unbound
    > text box:
    >
    > =([Reports]![Weekly Gallons
    > Pumped]![text11])-([Reports]![rptMWTotalUsage]![text3])
    >
    > I get a #Name? error on the report. Any ideas?


    You cannot access a subreport like this, the reports collection only
    contains the "main reports" that are open.
    The solution depends on how the subreport controls in the main report
    are named. If their names are the same as the names of the respective
    database objects, try:

    =[Weekly Gallons Pumped].Report![text11] -
    [rptMWTotalUsage].Report![text3]

    --
    Regards,
    Wolfgang
     
  4. Larry G.

    Larry G.
    Expand Collapse
    Guest

    Thanks Wolfgang that did the trick! Justr when I think I have what I need
    figured out, I find a new way to stump myself!
    --
    Never give up, the answer IS out there, it just takes a while to find it
    sometimes!


    "Wolfgang Kais" wrote:

    > Hello Larry.
    >
    > "Larry G." wrote:
    > > Here is a question I have not seen before.
    > >
    > > I have two subreports on one main report. I want to calculate the
    > > difference between a total on each report.
    > >
    > > Report A has a total gallons pumped through a system, each reading is
    > > taken daily and then totaled in the report footer.
    > >
    > > Report B has a total gallons pumped through 22 individual wells,
    > > readings are taken once a week and the total is calculated in the
    > > footer of report B.
    > >
    > > In the footer of the Main Report I want to calculate the difference
    > > between those two numbers. here is what I put in the unbound
    > > text box:
    > >
    > > =([Reports]![Weekly Gallons
    > > Pumped]![text11])-([Reports]![rptMWTotalUsage]![text3])
    > >
    > > I get a #Name? error on the report. Any ideas?

    >
    > You cannot access a subreport like this, the reports collection only
    > contains the "main reports" that are open.
    > The solution depends on how the subreport controls in the main report
    > are named. If their names are the same as the names of the respective
    > database objects, try:
    >
    > =[Weekly Gallons Pumped].Report![text11] -
    > [rptMWTotalUsage].Report![text3]
    >
    > --
    > Regards,
    > Wolfgang
    >
    >
    >
     

Share This Page