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)

Multi Selection Lookup parameter report ax 2012

(0) ShareShare
ReportReport
Posted on by 403
[SysEntryPointAttribute]
public void processreport()
{
    //List Enumarator
    ListEnumerator listEnumeratormainaccount;
    List mainaccounts = new List(Types::String);
    ListEnumerator listEnumeratorbusinessunit;
    List businessunit = new List(Types::String);
    ListEnumerator listEnumeratorsiteid;
    List siteid = new List(Types::String);
    ListEnumerator listEnumeratorcustomer;
    List customer = new List(Types::String);
    ListEnumerator listEnumeratordepartment;
    List department = new List(Types::String);
    ListEnumerator listEnumeratorproject;
    List project = new List(Types::String);
    ListEnumerator listEnumeratorregion;
    List region = new List(Types::String);

    //Deklarasi Table
    GeneralJournalEntry         journalentry;
    GeneralJournalAccountEntry  journalaccountentry;
    MainAccount                 mainaccount;
    LedgerJournalTrans          journaltrans;
    ReportFAGLMovementCategory  faglmovementcategoryview;
    AssetTrans                  assettrans;


    //Deklarasi Parameter
    Transdate               selectedAsOf;
    List                    selectedMainAccount;
    List                    selectedBusinessUnit;
    List                    selectedSiteID;
    List                    selectedCustomer;
    List                    selectedDepartment;
    List                    selectedProject;
    List                    selectedRegion;
    TransCategory        selectedTransCategory;
    CurrentOperationsTax    selectedPostingLayer;

    //Deklarasi Cotract
    ReportFAGLMovementContract contract = this.parmDataContract();

    //Panggil Parameter
    selectedAsOf                = contract.parmAsOf();
    selectedMainAccount         = contract.parmMainAccount();
    selectedBusinessUnit        = contract.parmBusinessUnit();
    selectedSiteID              = contract.parmSiteID();
    selectedCustomer            = contract.parmCustomer();
    selectedDepartment          = contract.parmDepartment();
    selectedProject             = contract.parmProject();
    selectedRegion              = contract.parmRegion();
    selectedTransCategory       = contract.parmTransCategory();
    selectedPostingLayer        = contract.parmPostingLayer();

    //selectedMainAccount      = selectedMainAccount == '' ? '*' : selectedMainAccount;
    //selectedBusinessUnit     = selectedBusinessUnit == '' ? '*' : selectedBusinessUnit;
    //selectedSiteID           = selectedSiteID == '' ? '*' : selectedSiteID;
    //selectedCustomer         = selectedCustomer == '' ? '*' : selectedCustomer;
    //selectedRegion           = selectedRegion == '' ? '*' : selectedRegion;
    //selectedDepartment       = selectedDepartment == '' ? '*' : selectedDepartment;
    //selectedProject          = selectedProject == '' ? '*' : selectedProject;

    //Proses report

    
    while select journalentry
        join faglmovementcategoryview
        where faglmovementcategoryview.GeneralJournalEntry == journalentry.RecId
            && journalentry.AccountingDate <= selectedAsOf
            && journalentry.PostingLayer == selectedPostingLayer
            && faglmovementcategoryview.TransCategory == selectedTransCategory
            //&& faglmovementcategoryview.BusinessUnit == listEnumeratorbusinessunit.current();
            //&& faglmovementcategoryview.SiteId == listEnumeratorsiteid.current();
            //&& faglmovementcategoryview.Customer == listEnumeratorcustomer.current();
            //&& faglmovementcategoryview.Department == listEnumeratordepartment.current();
            //&& faglmovementcategoryview.Region == listEnumeratorregion.current();
            //&& faglmovementcategoryview.ProjectID == listEnumeratorproject.current();
            //&& faglmovementcategoryview.MainAccountId == listEnumeratormainaccount.current();
    {
        tmp.clear();
        tmp.AccountingDate              = journalentry.AccountingDate;
        tmp.SubledgerVoucher            = journalentry.SubledgerVoucher;
        tmp.AccountType                 = "FA";
        tmp.MainAccount                 = faglmovementcategoryview.MainAccountId;
        tmp.BusinessUnit                = faglmovementcategoryview.BusinessUnit;
        tmp.SiteID                      = faglmovementcategoryview.SiteID;
        tmp.Customer                    = faglmovementcategoryview.Customer;
        tmp.Department                  = faglmovementcategoryview.Department;
        tmp.ProjectID                   = faglmovementcategoryview.ProjectID;
        tmp.Region                      = faglmovementcategoryview.Region;
        tmp.TransCategory            = faglmovementcategoryview.TransCategory;
        //tmp.FAPurchId                   = journaltrans.FAPurchId;
        tmp.Text                        = faglmovementcategoryview.Text;
        tmp.ReportingCurrencyAmount     = faglmovementcategoryview.ReportingCurrencyAmount;
        tmp.TransactionCurrencyAmount   = faglmovementcategoryview.TransactionCurrencyAmount;
        tmp.TransactionCurrencyCode     = faglmovementcategoryview.TransactionCurrencyCode;
        tmp.PostingLayer                = journalentry.PostingLayer;
        tmp.AccountName                 = faglmovementcategoryview.Name;

        if(faglmovementcategoryview.TransCategory == TransCategory::Addition)
        {
            select journaltrans
            where journaltrans.Voucher == journalentry.SubledgerVoucher;

                tmp.FAPurchId                   = journaltrans.FAPurchId;

        }
         tmp.insert();
    }
}

I have 9 parameter multi selection lookup in report ax 2012. But I am still confused how to write coding in Data Provider Class. Anyone can help me ?
This is my coding in the processReport method

*This post is locked for comments

I have the same question (0)

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
CP04-islander Profile Picture

CP04-islander 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans