Options

Skip a record

ghostrider1976ghostrider1976 Member Posts: 5
edited 2006-06-07 in Navision Financials
Good Morning,

i want to modify a report. In this report, there is a field, that is called "FreiDispontBest". The field will be calculated through Code after starting the report. Now, i want to modify my report, so, that the section only will print if this field has got a negative value. If the content of this field is zero or positiv, the section shall not be print an the report shall go to the next record.

How can I disable the section in case of a field-value?

Thanks for your Help!

Best regards,

Frank

Comments

  • Options
    David_CoxDavid_Cox Member Posts: 509
    edited 2006-06-07
    This wil switch the section on and off based on the value of FreiDispontBest

    Item, Body (2) - OnPreSection()
    CurrReport.SHOWOUTPUT(FreiDispontBest < 0); // Less than Zero

    As a guide others ways to use this code
    Item, Header (2) - OnPreSection()
    CurrReport.SHOWOUTPUT(CurrReport.PAGENO=1);

    Item, Header (3) - OnPreSection()
    CurrReport.SHOWOUTPUT(ItemFilters <> '');

    Have fun! :lol:
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • Options
    AlbertvhAlbertvh Member Posts: 516
    Hi Frank,

    2 possibilities

    1) OnAfterGetRecord
    IF FreiDispontBest >= 0 THEN
    CURRREPORT.SKIP;

    2) OnPreSection
    CURRREPORT.SHOWOUTPUT := FreiDispontBest < 0;

    Hope this sorts you out. :D
  • Options
    ghostrider1976ghostrider1976 Member Posts: 5
    Hello!

    Thanks, that is explicit, what I want.

    Best regards,

    Frank
Sign In or Register to comment.