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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Process Only Report ?

(0) ShareShare
ReportReport
Posted on by 795

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

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    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.

  • Muhammad Arif Maseed Profile Picture
    795 on at

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

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    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
    795 on at

    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,172 Most Valuable Professional on at

    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
    795 on at

    Thanks for the solution :)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans