Home Subreports

adding the result of a subreport value to main page.

edited September 2006 in Subreports
I have a sub report (subreport1.windowinfo) on my first page of the report
(main:customer)

The subreport1 has a variable field (variable11) that gives a vaule based on
a sum amount.

I want to be able to display the value of this variable11 on the
main:customer page.

How would i type this to add it to main:customer page. Would i need a new
varialbe that returns this amount, if so what is the syntax for this?

Thanks
Stuart

Comments

  • edited September 2006
    Hi Stuart,

    Are you using RAP? If so, you will need to create a global variable in the
    main report and set it equal to a TppVariable in the main report's design.
    Then in the OnCalc of the variable11 in the subreport, you would also update
    the value of the global variable. Take a look at the following example...

    http://www.digital-metaphors.com/tips/RAPGrandTotalInHeader.zip

    If you are not using RAP, you can simply place a Variable in the main report
    and update its value in the OnCalc of the variable in the subreport
    directly.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2006
    Hi Nico.

    I have tried using RAP in D6 and RBE10.04 due to your advice and have found
    a problem.
    If a report contains more than one page the global variable gets more value
    than needed.
    Check it please.
    I will try to create a test project if you coudn't reproduce that
    situation.

    --
    WBR Sergey Kovalev svk@siamed.ru
    SIA International Ltd

  • edited September 2006
    Hi Sergey,

    In my testing with the example I posted in my previous post, the calculation
    was correct for the grand total. How is your application different? If you
    would like to send a simple example, please send it in .zip format to
    support@digital-metaphors.com and I'll take a look at it for you.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.