Custom Aggregate Function

Erik van der GaagErik van der Gaag New Zealand
edited 1:46PM in FastReport 4.0
Hello,

Is there a way to add a custom aggregate function?

I would like to make my own aggregate 'Standard Deviation'.

Thanks,
Erik.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:46PM
    yes use the add function method, better is to build a custom function library see the developers manual.
  • Erik van der GaagErik van der Gaag New Zealand
    edited 1:46PM
    Hi gordk,

    We have already add a lot of custom function via the second method mentioned in the developers manual, so that they are available for all fast reports without having to declare them for each one.

    This then uses the 'AddMethod' function.

    Is there a way to use this and tell fast report that it is an aggregate function rather than just a normal one?

    Thanks,
    Erik.
  • gordkgordk St.Catherines On. Canada.
    edited 1:46PM
    I don't think there is a way as the aggregates need to be in a footer to be used.
    if one of the params of your custom function requires an aggregate value you will probably need to make the report 2 pass gather and store the aggregate value in an array on the first pass then use the array value in the final pass. Similar to the way we handle displaying aggregate values in the header.

Leave a Comment