I want to use one report instead two reports, but I have a problem how to group inside C/AL code(if is it possible).
DataitemTableVIew == Dataitem.SETCURRENTKEY(....);
GroupTotalFields == ?
You are not able to use automatic grouping in C/AL. You must do it in another way... read next record, compare with actual, if there is change on some field you want to group, show some grouping section...
The grouping of a report is defined within the report itself. You can do stuff with it in code, like using the TOTALSCAUSEDBY command for instance, but you're going to have to design the sections anyway, and those you cannot do in run time.
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
By the way "==" doesn't work in navision.
RIS Plus, LLC