Custom Aggregate Function

Erik van der GaagErik van der Gaag New Zealand
edited 9:53PM 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 9:53PM
    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 9:53PM
    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 9:53PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.