[SysEntryPointAttribute(false)]
public void processReport()
{
Query query;
QueryRun queryRun;
QueryBuildRange vendAccountRange;
QueryBuildRange fromDateRange;
QueryBuildRange toDateRange;
QueryBuildRange incoTermsRange;
QueryBuildRange cTMLocationIdRange;
QueryBuildRange cTMItemIdRange;
QueryBuildRange WMSCarrierNameRange;
QueryBuildRange approvedContractRange;
QueryBuildRange locationRange;
QueryBuildrange commodityRange;
QueryBuildRange contractTypeRange;
QueryBuildDataSource qbds;
QueryBuildDataSource qbds1
,qbds2
,qbds3
,qbds4;
QueryBuildDataSource qbds_load;
QueryBuildLink queryBuildLink;
CTMContractLoads ctmContractLoads;
CTMContractOnCost ctmContractOnCost;
CTMContractLines ctmContractLines;
CTMMIHeader ctmMIHeader;
CTMContractHdr ctmContractHdr;
CTMMILine ctmMILine;
UOMLogisticsContract2 contract;
VendTable vendTable;
CTMCustVendName ctmCustVendName; // origin Name
VendAccount vendAccount;
CTMDeliveryFromDate ctmDeliveryFromDate; // delivery from date
CTMDeliveryToDate ctmDeliveryToDate; // delivery to date
CTMLogisticStepStatus ctmLogisticStepStatus; // status
CTMIncoTermsCode ctmIncoTermsCode; // Inco Terms
CTMLocationId ctmLocationId;
CTMLocationId shipTo;
WMSCarrierName vendAccountHau; // Haulier
CTMItemId ctmItemId; // Commodity
CTMContractId contractId;
;
contract = this.parmDataContract() as UOMLogisticsContract2;
query = this.parmQuery();
qbds = query.dataSourceTable(tableNum(VendTable));
qbds1 = query.dataSourceTable(tableNum(CTMContractLoads));
qbds2 = query.dataSourceTable(tableNum(CTMMIHeader));
qbds3 = query.dataSourceTable(tableNum(CTMMILine));
//qbds1 = query.dataSourceTable(tableNum(CTMContractLoadsForm));
//qbds1 = query.dataSourceTable(tableNum(CTMContractLoadsForm));
//qbds1 = query.dataSourceTable(tableNum(CTMContractLoadsForm));
vendAccount = contract.parmOriginName(); // done
ctmDeliveryFromDate = Contract.parmDeliveryFromDate();// done
ctmDeliveryToDate = contract.parmDeliveryToDate();// done
ctmLogisticStepStatus = contract.parmStatus(); // done
ctmIncoTermsCode = contract.parmIncoTerms();
// cTMLocationId = contract.parmDe
ctmLocationId = contract.parmPickUpLocaton(); // done
vendAccountHau = contract.parmHaulier(); // done
ctmItemId = contract.parmComodity(); // done
//shipTo = contract.parmShipTo();
if(vendAccount)
{
vendAccountRange = SysQuery::findOrCreateRange(qbds,fieldNum(VendTable,AccountNum));
vendAccountRange.value(vendAccount);
}
if(vendAccountHau)
{
WMSCarrierNameRange = SysQuery::findOrCreateRange(qbds2,fieldNum(CTMMIHeader,carrier));
WMSCarrierNameRange.value(vendAccountHau);
}
if(cTMLocationId)
{
cTMLocationIdRange = SysQuery::findOrCreateRange(qbds1,fieldNum(CTMContractLoads,DeliveryLocation));
cTMLocationIdRange.value(cTMLocationId);
}
if(cTMItemId)
{
cTMItemIdRange = SysQuery::findOrCreateRange(qbds1,fieldNum(CTMContractLoads,PurchaseCommodity));
cTMItemIdRange.value(cTMItemId);
}
if(cTMDeliveryFromDate)
{
fromDateRange = SysQuery::findOrCreateRange(qbds2,fieldNum(CTMMIHeader,DeliveryFromDate));
fromDateRange.value(SysQuery::range(cTMDeliveryFromDate,dateNull()));
//vendAccountRange.value(cTMDeliveryFromDate);
}
if(cTMDeliveryToDate)
{
toDateRange = SysQuery::findOrCreateRange(qbds2,fieldNum(CTMMIHeader,DeliveryToDate));
toDateRange.value(SysQuery::range(dateNull(),cTMDeliveryToDate));
}
queryRun = new queryRun(query);
while ((queryRun.next()))
{
vendTable = queryRun.get(tableNum(VendTable));
ctmContractLoads = queryRun.get(tableNum(CTMContractLoads));
ctmMIHeader = queryRun.get(tableNum(CTMMIHeader));
ctmContractOnCost = queryRun.get(tableNum(CTMContractOnCost));
ctmMILine = queryRun.get(tableNum(CTMMILine));
select firstOnly ctmContractHdr
where ctmContractLoads.PurchaseContract == ctmContractHdr.ContractId;
this.insertIntoLogisticsTMP(
vendTable
,ctmContractLoads
,ctmMIHeader
,ctmContractOnCost
,ctmMILine
,ctmContractHdr
);
}
}
==========
SSRS Report design - >
Parameters Change proeperty
Allow Blank: True
Nullable: True
This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
Subscribe to:
Post Comments (Atom)
Ledger Voucher creation Framework and x++ code to create ledger voucher
Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...
-
{ "Message" : "Please verify that the user is valid and set up correctly." } Sol: System Administration > Se...
-
Please click here to access Custom Workflow step by step process:
-
FormRun formRun = sender.formRun(); Object inventTrans_ds = formRun.dataSource(formDataSourceStr(InventMarking,InventTransO...
No comments:
Post a Comment
Give me the commetns and solutions