Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Timing issue

edited October 2004 in General
Hi,

I have a var in Report which is resides in a group footer and is a total of
a field in a subreport. It works ok except that the in the first group, the
first value is added twice. The timing is such: Calculate on
DatapipelineTraversal, Reset on GroupEnd.

Thanks,

Matthew

Comments

  • edited October 2004
    Hi Matthew,

    Which version of ReportBuilder are you using? Instead of calculating on
    DatapipelineTraversal, try using Traversal instead. If this does not affect
    the output, please send a small example of this behavior 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
  • edited October 2004
    I am using Ver 7.04.

    What is the difference between DatapipelineTraversal and Traversal?

    Matt
  • edited October 2004
    Nico,

    I tried Traversal and there is no value at all.

    If I put a label in the report and a var in the subreport assign with the
    oncalc like this:

    procedure TReptSF.ppVarMTotCogsCalc(Sender: TObject; var Value: Variant);
    begin
    Value := Value + dm.ATRpAdCostTotCogs.Value;
    ppLMCogs.Caption := formatFloat('##,###,##0.00',Value);
    end;

    This seems to work. It only appears to work if I assign the caption in the
    oncalc. So this piece of code has to go through each iteration - not very
    efficient. Also all the vars are crowded in the single line of the details
    for the subreport - not very pretty. Is there a better way?

    Matt
  • edited October 2004
    Hi Matt,

    When making any type of calculation in ReportBuilder, it is necessary to use
    the OnCalc event of a TppVariable. This is to ensure that the event only
    fires once per calculation interval. The code you have below is the best
    way to handle this situation.

    I'm a bit unclear about all the variables being crowded on one line of the
    detail band. Perhaps a clearer picture of what your report looks like and
    what it is supposed to accomplish would help me understand what exactly is
    happening.

    --
    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.