web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Data Not Getting Displayed when Given Range

(0) ShareShare
ReportReport
Posted on by 3,099

Hi

  I have added 1 field on Request Page for selecting G/L account . When i give single Account it works fine. In Range it does not work

G/L Account - OnPreDataItem()
"G/L Account".SETRANGE("G/L Account"."No.",GLAccountNo);

G/L Account - OnAfterGetRecord()
OpgBalance := 0;
Balance := 0;

G/L Account - OnPostDataItem()

G/L Entry - OnPreDataItem()
SETRANGE("Posting Date", 0D, ToDate);

G/L Entry - OnAfterGetRecord()
IF "G/L Entry"."Posting Date" < FrDate THEN BEGIN
  OpgBalance += "G/L Entry".Amount;
  Balance += "G/L Entry".Amount;
END;

IF "G/L Entry"."Posting Date" < FrDate THEN
  CurrReport.SKIP
ELSE
  Balance += "G/L Entry".Amount;


Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    mmv Profile Picture
    11,471 on at
    G/L Account - OnPreDataItem()
    "G/L Account".SETRANGE("G/L Account"."No.",GLAccountNo);

    It has to be changed to

    G/L Account - OnPreDataItem()
    "G/L Account".SETFILTER("G/L Account"."No.",GLAccountNo);
  • jsshivalik Profile Picture
    3,099 on at

    Hi

      Why Setfilter , not SetRange

    Thanks

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    Check this link for better understanding of setrange and setfilter

    msdn.microsoft.com/.../dd354955.aspx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans