Skip to main content

Notifications

Community site session details

Community site session details

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

new report print based on the language in ax 2012 r3

(0) ShareShare
ReportReport
Posted on by 18

Hi All,

i have create a new report for Receipt and called from 

SO-- Pick and Pack -- Preview/Print -- < my report >

i have added below code for the language to be print based on Customer langauge

Controller class ---

PreRunModifyContract method --

public void preRunModifyContract()
{
     this.parmReportContract().parmRdlContract().parmLanguageId(CustTable::find(custinvoiceJour.OrderAccount).languageId());
}

is it rite ?

for example suppose -- 

i have 10 Sales order --

i have select the 4th Salesorder = S0001 from All Sales Order and that SO having the Customer = C0001, and the language set = JA

then report should be print in Japanese.

is the above code is find exact customer with language for respective salesorder ? may be the customer C0001  set to different language for different Sales order.

please give me more shed on this

  • André Arnaud de Calavon Profile Picture
    294,233 Super User 2025 Season 1 on at
    RE: new report print based on the language in ax 2012 r3

    Hi Arpan,

    Not sure if the coding is correct or not. Do you have static report designs? If so, have you generated the report for all languages?

    Have also a look at the next page: docs.microsoft.com/.../deploy-language-specific-versions-of-a-report

  • @rp@n Profile Picture
    18 on at
    RE: new report print based on the language in ax 2012 r3

    i have wrote the below code in Controller class >> preRunModifyContract() -- to get the language id based on CUSTOMER

    public void preRunModifyContract()
    {
    SalesIdBase salesIdLocal;
    CustAccount customerLocal;
    RecId party;
    contract = this.parmReportContract().parmRdpContract() as GDJ_JPN_SalesReceiptContract;


    custPackingSlipJour = this.parmArgs().record() as custPackingSlipJour;
    salesIdLocal = custPackingSlipJour.SalesId;
    customerLocal = salestable::find(salesIdLocal).CustAccount;
    Party = CustTable::find(customerLocal).Party;

    this.parmReportContract().parmRdlContract().parmLanguageId(DirPartyTable::findRecId(Party).LanguageId);
    }

    is it rite? because i set "JA" language for the particular customer, which i am testing the Sales order. but still it's printing in EN-US language only

    kindly anyone please help me

  • @rp@n Profile Picture
    18 on at
    RE: new report print based on the language in ax 2012 r3

    any one can you please help me on this

  • @rp@n Profile Picture
    18 on at
    RE: new report print based on the language in ax 2012 r3

    hi

    attached my report format -- 1488.a1.jpg

    NOTE -- the above marked label i expecting to print in Japanese language.

    for example -- label files which i am using in report

     label ids                                                      EN-US                                                       JA

    @GDJ164 Item Description アイテム説明
    @SYS102891 Quantity 数量
    @SYS40864 Unit 単位

    Please help me. if i am missing any steps

                                                                        

  • @rp@n Profile Picture
    18 on at
    RE: new report print based on the language in ax 2012 r3

    HI ALL,

    i have created a new report for Receipt. which i need to print multiple languages like EN-US and JA based on Customer language setting. AS i mentioned above

    1. i have added the report in Static design under BI

    2. Create a three new classes like

    Controller  EXTENDS SrsReportRunController

    Method -- prerunmodifycontrcat()

    this.parmReportContract().parmRdlContract().parmLanguageId('JA');  // testing purpose

    Contract

    DP

    but the label always print in ENGLISH only not Japanese.

    Kindly let me know where is wrong?

  • @rp@n Profile Picture
    18 on at
    RE: new report print based on the language in ax 2012 r3

    HI ALL

    i have tried that

    Controller class ---

    PreRunModifyContract method --

    public void preRunModifyContract()

    {

        this.parmReportContract().parmRdlContract().parmLanguageId(CustTable::find(custinvoiceJour.OrderAccount).languageId());

    }

    it's not working

    please help me

  • @rp@n Profile Picture
    18 on at
    RE: new report print based on the language in ax 2012 r3

    the above code i got in to the blogs that i put in controller class

  • André Arnaud de Calavon Profile Picture
    294,233 Super User 2025 Season 1 on at
    RE: new report print based on the language in ax 2012 r3

    I have not done this myself as the usual external documents are already considering the customer language.

    What is it exactly that you don't understand? Is your above shared coding equal to what Microsoft did themselves?

  • @rp@n Profile Picture
    18 on at
    RE: new report print based on the language in ax 2012 r3

    yes, but not understand

    can you please elaborate me

  • André Arnaud de Calavon Profile Picture
    294,233 Super User 2025 Season 1 on at
    RE: new report print based on the language in ax 2012 r3

    Hi @rp@n,

    There are multiple examples in the standard application where the language of the report is changed to meet an external customer language. Have you looked at e.g. the controller and DP classes for the sales invoice how it is done?

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,233 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,982 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans