New Blog Post: PDF/A and Metadata

Grupo total on Variable field

edited February 2017 in General
Hi folks,

I've a variable Total on a detail band (price X qty = total) that is
working fine. However I want to to SUM total on the group footer. I just
can't figure how to approach this. Any advice?

Regards,
Mario

Comments

  • edited February 2017
    Hi Mario,

    Which version of ReportBuilder and Delphi are you using?

    One option is to simply place a TppVariable inside the group footer
    band, then update its in the OnCalc of the variable in the detail.

    Value := Price * Quantity;
    TotalVar.Value := TotalVar.Value + Value;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2017
    Thank you Nico,

    I currently using RB 18.0 Ent and Berlin Professional.

    I try your advice, but it only shows the value from the last detail line.

    Here's the code I'm using:


    procedure varTotalCategoriaOnCalc(var Value: Variant);
    begin
    Value := invExistencia['costo_unitario'] * invExistencia['existencia'];
    varTotalCategoria.Value := varTotalCategoria.Value + Value;
    end;

    Is this what you meant?

    Regards,
    Mario

  • edited February 2017
    Hi Mario,

    Your code appears correct. Check the ResetType property and be sure the
    value is not being reset at the incorrect time.

    If you are still having issues, you can send a simple example
    demonstrating this problem using only Delphi and RB components in .zip
    format to support@digital-metaphors.com and I'll take a look at it for
    you. Please include your current RB serial number as well.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2017
    On 2/13/17 10:15 AM, Nico Cizik (Digital Metaphors) wrote:

    Thank you Nico, I just sent you the sample project.

    Thank you for your support.

    Regards,
    Mario
This discussion has been closed.