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 :
Microsoft Dynamics AX (Archived)

Displaying Transfer Invoice Date in the header of Customer Turnover Report

(0) ShareShare
ReportReport
Posted on by 120

Hi  Everyone 

Displaying Transfer Invoice Date in the header of Customer Turnover Report 

I am getting  blank as it shows in following Screenshots  :

Customer_5F00_Turnover.png

Best Regards,

Jamil

*This post is locked for comments

I have the same question (0)
  • Mahmoud Hakim Profile Picture
    17,887 on at

    This is objects customized not standard

    So you must back to a developer to check it.

  • On-Hand Inventory I want to Add to the Report ItemName  Profile Picture
    120 on at

    Hi, Mahmoud Hakim

    Yes,  you are right, but I am the developer in our factory, but I am new to AX 2012, when I assign the InvocieDate to the report I am getting blank instead.

    Best Regards

    Jamil

  • Suggested answer
    Agha SirajulDola Profile Picture
    555 on at

    Jamil -

    put experession oposite to those feilds like

    start trans-date    ( =First(Fields!TRANSDATEFIELD.Value, "DataSetName"))

    Last trans-date     (=Last(Fields!TRANSDATEFIELD.Value, "DataSetName"))

    Regards,

  • On-Hand Inventory I want to Add to the Report ItemName  Profile Picture
    120 on at

    Hi Agha

    Thank you very much for your help and corporation I did this already before , but actually I am getting blank instead  of getting a value

    =Microsoft.VisualBasic.Strings.Format(First(Fields!InvoiceDate.Value, "CustRevenue"), "dd/MM/yyyy")

     

    =Microsoft.VisualBasic.Strings.Format(Last(Fields!InvoiceDate.Value, "CustRevenue"), "dd/MM/yyyy")

     

    Waiting for your valuable replay

    Best Regards

    Jamil

  • Agha SirajulDola Profile Picture
    555 on at

    have u verified, whether InvoiceDate field has data. and remove the formatting from expression, better do it in properties.

  • On-Hand Inventory I want to Add to the Report ItemName  Profile Picture
    120 on at

    Hi Agha
    Yes, I have verified the invoice Date it has a data in the following screenshot :

    INVOICEDATE.png

    Regards,

    Jamil

  • Agha SirajulDola Profile Picture
    555 on at

    Jamil-

    not in form, in report. see through debugger in RDP class. is it populated ?

  • On-Hand Inventory I want to Add to the Report ItemName  Profile Picture
    120 on at

    Hi Agha

    /// Processes the report business logic.

    /// </summary>
    /// <remarks>
    /// Provides the ability to write the report business logic. This method will be called by SQL
    /// ServerReporting Services at runtime. The method should compute data and populate the data tables
    /// that will be returned to SQL ServerReporting Services.
    /// </remarks>
    [SysEntryPointAttribute(false)]
    public void processReport()
    {
    boolean firstCustomer = true;
    boolean journalFound = false;
    CustTable custTableTmp;

    Query qCustTable, qJournals;
    QueryRun qRunCustTable;
    QueryBuildRange qBuildRange;
    QueryRun localQueryRun;
    AccountNum rangeValue;
    smmCustRevenueContract contract;

    qCustTable = this.parmQuery();
    qJournals = this.parmQuery();

    contract = this.parmDataContract() as smmCustRevenueContract;

    currency = infolog.isoCurrencyCode() ? infolog.isoCurrencyCode() : Ledger::accountingCurrency(CompanyInfo::find().RecId);

    qCustTable.recordLevelSecurity(true);
    qJournals.recordLevelSecurity(true);

    invoiceOrderAccount = contract.parmInvoiceOrderAccount();

    if (invoiceOrderAccount == InvoiceOrderAccount::InvoiceAccount)
    {
    qJournals.dataSourceTable(tablenum(CustInvoiceJour)).addLink(fieldnum(CustTable, AccountNum),fieldnum(CustInvoiceJour, InvoiceAccount));
    qJournals.dataSourceTable(tablenum(ProjInvoiceJour)).addLink(fieldnum(CustTable, AccountNum),fieldnum(ProjInvoiceJour, InvoiceAccount));
    }
    else
    {
    qJournals.dataSourceTable(tablenum(CustInvoiceJour)).addLink(fieldnum(CustTable, AccountNum),fieldnum(CustInvoiceJour, OrderAccount));
    qJournals.dataSourceTable(tablenum(ProjInvoiceJour)).addLink(fieldnum(CustTable, AccountNum),fieldnum(ProjInvoiceJour, InvoiceAccount));
    }

    qBuildRange = SysQuery::findOrCreateRange(qJournals.dataSourceTable(tablenum(CustTable)),fieldnum(CustTable, AccountNum));

    if (!qBuildRange.value())
    {
    qBuildRange.status(RangeStatus::Hidden);
    }
    else
    {
    rangeValue = qBuildRange.value();
    }

    qRunCustTable = new QueryRun(qCustTable);

    while(qRunCustTable.next())
    {
    if (SysReportRun::changed(qRunCustTable,tablenum(CustTable)))
    {
    custTableTmp = qRunCustTable.get(tablenum(CustTable));
    journalFound = false;
    revenue = 0;
    sumMarkup = 0;

    qBuildRange.value(queryValue(custTableTmp.AccountNum));

    localQueryRun = new QueryRun(qJournals);

    localQueryRun.recordLevelSecurity(true);
    while(localQueryRun.next())
    {
    if (SysReportRun::changed(localQueryRun,tablenum(CustInvoiceJour)))
    {
    custInvoiceJour = localQueryRun.get(tablenum(CustInvoiceJour));
    if (custInvoiceJour)
    {
    revenue += Currency::mstAmount(custInvoiceJour.SalesBalance-custInvoiceJour.EndDisc,custInvoiceJour.CurrencyCode,custInvoiceJour.InvoiceDate,
    Currency::noYes2UnknownNoYes(custInvoiceJour.Triangulation),
    custInvoiceJour.ExchRate,custInvoiceJour.ExchRateSecondary);

    sumMarkup += Currency::mstAmount(custInvoiceJour.SumMarkup,custInvoiceJour.CurrencyCode,custInvoiceJour.InvoiceDate,
    Currency::noYes2UnknownNoYes(custInvoiceJour.Triangulation),
    custInvoiceJour.ExchRate,custInvoiceJour.ExchRateSecondary);

    journalFound = true;
    }
    }

    if (SysReportRun::changed(localQueryRun,tablenum(ProjInvoiceJour)))
    {
    projInvoiceJour = localQueryRun.get(tablenum(ProjInvoiceJour));
    if (projInvoiceJour)
    {
    revenue += Currency::mstAmount(projInvoiceJour.SalesOrderbalance-projInvoiceJour.EndDisc,projInvoiceJour.CurrencyId,projInvoiceJour.InvoiceDate,
    Currency::noYes2UnknownNoYes(projInvoiceJour.Triangulation),
    projInvoiceJour.ExchRate,projInvoiceJour.ExchrateSecondary);

    sumMarkup += Currency::mstAmount(projInvoiceJour.SumMarkup,projInvoiceJour.CurrencyId,projInvoiceJour.InvoiceDate,
    Currency::noYes2UnknownNoYes(projInvoiceJour.Triangulation),
    projInvoiceJour.ExchRate,projInvoiceJour.ExchrateSecondary);

    journalFound = true;
    }
    }
    }
    if (journalFound)
    {
    qBuildRange.value(rangeValue);
    this.insertIntoTmpTable(custTableTmp);
    }
    }
    }
    }

  • Suggested answer
    Mahmoud Hakim Profile Picture
    17,887 on at

    You can check lastinvoicedate method in custtable and use the same logic.

  • On-Hand Inventory I want to Add to the Report ItemName  Profile Picture
    120 on at

    Hi Mahmoud Hakim

    I am new to AX 2012   how to call  lastinvoicedate method for first trans date and last trans. date

    Wating for your valuable answer

    Regards,

    Jamil

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans