Building an RTC report which takes Top [Number] parameter

NavNovice56NavNovice56 Member Posts: 2
edited 2012-01-13 in NAV Three Tier
Trying to incorporate the Top [Number] functionality in an RTC report. So along with the filter variables, there will be an option to put a certain number and only that many results will be displayed . Similar to the 10062 Top_Customer report already there in NAV ..but not sure how to approach ..any help will be appreciated . Trying to replicate the Top Customers report code ..not working so far .

Comments

  • ReinhardReinhard Member Posts: 249
    There is no property that you can set.
    But it should be an easy modification to add in a page request integer for the desired quantity, lets say "numRecords"

    You will need one more integer variable called "counter"

    Now in your report you have a data item. You should add a couple of additional lines:

    onPreDataItem
    counter := 0;
    

    onAfterGetRecord
    IF counter = numRecords THEN
      CurrReport.BREAK;  //this will stop the report once you get to the desired number of records
    counter += 1;
    
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.