Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Can we generate LDA report Month wise?

Posted on by Microsoft Employee

Dear Experts,

Currently, We get the LDA report yearly save it in excel and modify. I have a requirement to generate a LDA report Month wise. Can we add an option so that users  can generate report month wise.

 

Thanks

With Regards

Mandeep Kaur

*This post is locked for comments

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Can we generate LDA report Month wise?

    report 33020840 is either part of the localised version you use (india, US, ... ?) or part of a nav addin (module). you can check that in the object's versionlist and in the documentation trigger.

    you can add option fields in request page of report.

    seems, that there already exist 2 global variables StartDate, EndDate.

    if they are local variables in your code sample, then add 2 global variables of type Date to the report: GlStartDate, GlEndDate

    then edit the report's request page

    add, if needed at the top as 2. line a new group, name it options (like in many standard reports)

    under this group line add 2 field lines

    field line 1, sourceexpr=GlStartDate,name=StartDate,caption=StartDate

    same with field line 2, use GlEndDate instead

    press F9 to edit the code editor

    add in onopenpage trigger:

    GlStartDate := DMY2DATE(1,4,Year);

    GlEndDate := DMY2DATE(31,3,Year+1) ;

    when running the report, these values can be overwritten by different values, eg. month start/end date values

    in your code sample replace

    StartDate := DMY2DATE(1,4,Year);

    EndDate := DMY2DATE(31,3,Year+1) ;

    by

    StartDate := GlStartDate;

    EndDate := GlEndDate ;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Can we generate LDA report Month wise?

    Thanks for your reply sir,

    Report no. is 33020840

    As per the code

    CompanyInfo.GET;

    IF Year = 0 THEN BEGIN

    ERROR('Please Enter Financial Year');

    END

    ELSE BEGIN

    StartDate := DMY2DATE(1,4,Year);

    EndDate := DMY2DATE(31,3,Year+1) ;

    END;

    //Month:=0;

    PrevSourceCode := '';

    PrevItemNo := '';

    PrevMonth := 0;

    Kindly advise.

    Thanks

    With Regards

    Mandeep Kaur

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Can we generate LDA report Month wise?

    which report is that (number)?

    which localisation do you use?

    in general, if the report runs on an annual base, then that means, there is a period filter defined (start date, end date) where start date is the first jan, the last date is the last of dec. customization should be easy. change the start and end date for using of months.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans