Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Process Only Report ?

Posted on by 768

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

  • RE: Process Only Report ?

    Thanks for the solution :)

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 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);

  • 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
    Stefano Demiliani 37,162 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.

  • 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
    Stefano Demiliani 37,162 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

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans