Bojensen Blogs

AX2012 Sales Invoice SSRS Reporting Error identified

 

While working and testing modifications to the Layout of the “Sales Invoice“ report in AX 2012, I have found a rather annoying error with language translation of the SSRS report.

When you are printing a Sales Invoice, the report prints all labels according to the Language set in the Sales Invoice Header. (Found under the Setup Fast Tab).

However there is an error in the class “SalesInvoiceDP”, which is responsible for invoking the SalesInvoiceReport from Reporting Services.

The error is in the “InvoiceTxt” method which sends the Title for the output to the report. ( i.e. “Proforma Invoice”, “Invoice”, “Tax Invoice”  a.o.)

2012-05-09_2237

The error is that the report title language is set according to the logged in user’s language and NOT according to the Sales Invoice language.

So in order to correct this annoying problem, you have to replace a number of lines in the method “InvoiceTxt” of “SalesInvoiceDP” as shown here:

This code snippet prints the “Proforma Invoice” label text:

private str  invoiceTxt()
{
    str  invoiceTxt;
    ….
    ….
    ….

    // Original code removed 
    // invoiceTxt = "@SYS87981";

    // new code with proper translation according to the Sales Invoice language settings
    invoiceTxt = SysLabel::labelId2String(literalstr(‘@SYS87981’), custInvoiceJour.LanguageId);

Comments are closed.