Options

Trouble with several fields in GroupTotalFields

randrewsrandrews Member Posts: 135
Suppose, I have Table with key Field1,Field2,Field3,...

And I want to group by
GroupTotalFields = Field1,Field3 with key (above)

But report grouping as GroupTotalFields = Field1,Field2,Field3 in section with onpre triger:
CurrReport.SHOWOUTPUT(FIELDNO(Field3) = CurrReport.TOTALSCAUSEDBY);

Can I make results by standart grouping way, avoiding to create key Field1,Field3.
Or it is necessarily incredible variable

Comments

  • Options
    kinekine Member Posts: 12,562
    you must create the correct key, because the grouping is called when one value in the group field is changed...

    assume this:
      Field 1, Field 2, Field 3
      1,1,1 - Group 1 (1,1)
      1,1,2 - Group 2 (1,2)
      1,2,1 - Group 3 (1,1)
      1,2,2 - Group 4 (1,2)
      2,1,1 - Group 5 (2,1)
      2,1,3 - Group 6 (2,3)
      2,2,1 - Group 7 (2,1)
    

    it is Sorted with Field 1, Field 2, Field 3 key. If you want group by Field 1, Field 3 for each record will be group section called because Field 3 is still changing his value. You must sort it in this way>

      Field 1, Field 3 sorting
      1,1,1 \
      1,2,1 - group 1 (1,1)
      1,1,2 \
      1,2,2 - group 2 (1,2)
      2,1,1 \
      2,2,1 - group 3 (2,1)
      2,1,3 - group 4 (2,3)
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    randrewsrandrews Member Posts: 135
    Thanks a lot for reply.
    Its precisely that I want.
Sign In or Register to comment.