Function Last-of

kangal74kangal74 Member Posts: 15
HI

I want to know if in navision's report , we can do like le progress's function : Last-of or first-of.
To know , if this record is the last of regroupment.
Best regards

Comments

  • kapamaroukapamarou Member Posts: 1,152
    I don't know if I understand Correctly but I'll try to help.

    You need to define which specific key the dataitem will use. Then you set the GroupTotalFields on the properties of the dataitem and use Section of Type "Group Header", "Group Footer" that will print upon grouping change. You can use these sections in Combination with SHOWOUPUT and TOTALSCAUSEDBY functions.

    Try it out and ask again maybe with a detailed example for more help.
  • XypherXypher Member Posts: 297
    kapamarou has got it right (if I also understood that correctly).

    But specifically if you need an example of usage,
    IF CurrReport.TOTALSCAUSEDBY = FIELDNO("Item Group") THEN BEGIN
      varTotalItems := FORMAT(varItemCount,0,'<Sign><Integer Thousand>');
      varTotalCost  := FORMAT(varItemCost,0,'<Sign>$<Integer Thousand><Decimals,3>');
    END ELSE
      CurrReport.SHOWOUTPUT(FALSE);
    

    The above you would want to put in a Group Footer which would display the "results" of that grouping.

    Of course this is useless if the field(s) of your DataItem you have defined in GroupTotalFields are not, in some way, sorted.
Sign In or Register to comment.