Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Process Only Report ?

(0) ShareShare
ReportReport
Posted on by 782

Hi,

I have added action to page to calculate the amount base on current month.
Now i want to calculate the amout base on user input date for that i used process only report i have not much experience with process only report.
How to get the value in a codeunit which we have enter on request page?

EG:

i enter "4/8/2019" on request page i want to display this date in message. how to do this ?

*This post is locked for comments

  • Muhammad Arif Maseed Profile Picture
    782 on at
    RE: Process Only Report ?

    Thanks for the solution :)

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Process Only Report ?

    You should first run the report from the UI. When the report is executed, it asks yhe user for the Date parameter from request page (VarDate). Then, in OnPostReport call:

    MyCodeunitGettingDate(VarDate);

  • Muhammad Arif Maseed Profile Picture
    782 on at
    RE: Process Only Report ?

    My codeunit 50000 Function

    GettingDate(DATE : date)

    MESSAGE(REPORT.RUNREQUESTPAGE(50000));

    MESSAGE(FORMAT(DATE));

    /////

    Report  OnPostDataItem()

    VarDate is a Variable in report type of date. VarDate is using in request page

    Mycodeunite.GettingDate(VarDate);

    can you please guide me where i am wrong ?

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Process Only Report ?

    What do you mean with "tthere is no any function in codeunit"?

    Obviousluy, a codeunit is a container of code, so you need to define here the functions that makes your work.

    I cannot imagine what you need to do but create a function that receives the date parameter as input and inside that function write your code.

  • Muhammad Arif Maseed Profile Picture
    782 on at
    RE: Process Only Report ?

    i followed the same instruction but when i the message displayed the data is in xml format.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Process Only Report ?

    In your report request page you can place a Datevariable where your user will enter the requested date parameter.

    Then in the OnPostReport trigger you can call your codeunit function by passing that value as parameter.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans