[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)

Report
All responses (
Answers (