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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

New report for new legal entity

(0) ShareShare
ReportReport
Posted on by 56

Hi All,

Can you please let me know , i am creating a NEW report that need to print form SO -- Pick and Pack -- Journal -- Packingslip -- Preview/Print -- < in the marked area >

packingslip.jpg

let me know --

1. How i will pass specific SO to print the report?

2. Controller and DP class is enough rite? because no dialog or parameters required

3. The report is only visible for Japan legal entity

ANS 3). So, i need to add Country/Region property in Output menu item. So, that i can see this report only in Japan legal entity.

please give me more shed on this.

thanks!

I have the same question (0)
  • Blue Wang Profile Picture
    Microsoft Employee on at

    HI @rp@n,

    What is specific SO? So, I think you need to filter or pass parameter.

    If you need any parameters, you need to create contract class to hold parameters.

  • @rp@n Profile Picture
    56 on at

    Blue,

    for example --

    2526.p4.jpg

    4606.p2.jpg

    here specific means , when user select any sales order and clicked on the report than it should be print the particular sales order only.

    please let me know how will achieve this.

    thanks!

  • Sergei Minozhenko Profile Picture
    23,095 on at

    Hi @rp@n,

    Check the article www.schweda.net/blog_ax.php

    The idea is to use args to get selected record (or records) and store this infromation in contract to pass it to service class.

  • @rp@n Profile Picture
    56 on at

    Sergei,

    i have create controller and DP class as of now for my report.

    *** here contract class is required to get the selected record from form and to pass in to DP class to manipulate further to print the particular SO in report rite?

  • Sergei Minozhenko Profile Picture
    23,095 on at

    Hi @rp@n,

    Contract class is the only way to pass parameters from controller class to DP class and active record is only available in controller class.

  • @rp@n Profile Picture
    56 on at

    Sergei,

    the above link which you send me that is not much clear for me. do you have any other links for report as per my criteria?

    please give me more shed on this.

    thanks!

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,095 on at

    Hi @rp@n,

    Let's take standard classes as example LedgerJournalPreviewController, LedgerJournalPreviewContract and LedgerJournalPreviewDP.

    In LedgerJournalPreviewContract  there is a field journalNumber and related parm method. It's used to store information about source record. In your case, you can use SalesId or RecId for the SalesTable record.

    In LedgerJournalPreviewController there is a method prePromptModifyContract and in this method source record is fetched from this.parmArgs().record() and key field value passed to contract class (check LedgerJournalTable case).

    In DP class, you just fetch the value from contract and use it to find needed data (order, line and so on).

  • @rp@n Profile Picture
    56 on at

    Thanks Sergei,

    finally one things only why prePromptModifyContract method is require here?

    is it because to send parameter before user interaction ? or something else?

    please give me more shed on this.

  • @rp@n Profile Picture
    56 on at

    Sergei,

    i saw that, one more method is there "PreRunModifyContract"

    please elaborate this 2 methods --

    prePromptModifyContract

    PreRunModifyContract

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,095 on at

    Hi @rp@n,

    If you take a look at the place where prePromptModifyContract is executed (SrsReportRunController.startOperation) you will find an explanation of method purpose.

    // call hook to change the contract before prompt is called.

    So it means you put some values to contract before the dialog appears (as contract used in the dialog as well and some values can be shown there)

    The same situation is with preRunModifyContract, if you take a look at xmlDoc comment for method in class SrsReportRunController

    Provides the opportunity to modify the contract before the report is run.

    It means that you can use this method to modify contract values after user closes dialog, but before report processing itself.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 593 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 543

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans