Counting lines in a table

MasterOfDragonsMasterOfDragons Member Posts: 18
Hi,

I'm writing a report and have to determine the number of lines in a table before doing anything else. How could I do this?

Thanks inadvance
Master of Dragons

Answers

  • DenSterDenSter Member Posts: 8,307
  • MasterOfDragonsMasterOfDragons Member Posts: 18
    Thanks for the fast answer; but could you please be a bit more specific, as I'm quite new to Navision and C/AL? :?

    Master of Dragons

    EDIT: Never mind, I think I've found what I need. Thanks.
  • kinekine Member Posts: 12,562
     CountOfLines := Rec.Count;
    

    CountOfLines is the Integer variable which will be used to store the no. of lines in the table.

    Rec is variable of type Record for your table with applied all filters you need.

    Rec.Count is function, which will count the records which are accessible with given filters.

    Never mind: I read that you found the answer after I answered... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.