Hi MATTGUO
Thank you very much for your response , actually this my processReport()
Class contains
public void processReport()
{
int number;
str s;
TransDate fromDate,toDate;
JFLFSalesYEARMONTHMATRIXContract CustInvoiceDC;
Query query;
QueryRun queryRun;
QueryBuildDataSource queryBuildDataSource,qbds,queryBuildDataSource1 ;
QueryBuildRange queryBuildRange,contractQbr2;
QueryBuildRange receiptDateRequestedFilter ;
CustInvoiceJour queryCustInvoiceJour;
CustInvoiceTrans _custInvoiceTrans;
InventDim _inventDim;
InventTable _inventTable;
InventLocation _inventLocation;
InventSite _inventSite;
query = new query(queryStr("JFLFSalesYEARMONTHMATRIX"));
CustInvoiceDC = this.parmDataContract() as JFLFSalesYEARMONTHMATRIXContract;
query = this.parmQuery();
fromDate = CustInvoiceDC.parmFromDate();
toDate = CustInvoiceDC.parmToDate();
queryBuildDataSource = query.dataSourceTable(tableNum(CustInvoiceJour));
receiptDateRequestedFilter = SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(CustInvoiceJour)),fieldNum(CustInvoiceJour,InvoiceDate));
receiptDateRequestedFilter.value(SysQuery::range(fromDate,toDate));
queryRun = new QueryRun(query);
ttsBegin;
while(queryRun.next())
{
jFLFSalesYearMonthTmp.clear();
queryCustInvoiceJour = queryRun.get(tableNum(CustInvoiceJour));
_custInvoiceTrans = queryRun.get(tableNum(CustInvoiceTrans));
_inventDim = queryRun.get(tableNum(InventDim));
_inventTable = queryRun.get(tableNum(InventTable));
_inventLocation = queryRun.get(tableNum(InventLocation));
_inventSite = queryRun.get(tableNum(InventSite));
jFLFSalesYearMonthTmp.InvoiceAmount = queryCustInvoiceJour.InvoiceAmount;
jFLFSalesYearMonthTmp.InvoiceDate = queryCustInvoiceJour.InvoiceDate;
jFLFSalesYearMonthTmp.SalesYear = year(queryCustInvoiceJour.InvoiceDate);
// jFLFSalesYearMonthTmp.SaleMonthName = mthName(mthOfYr(queryCustInvoiceJour.InvoiceDate)); // mthName(mthOfYr(systemdateget()))
s =mthName(mthOfYr(queryCustInvoiceJour.InvoiceDate));
jFLFSalesYearMonthTmp.SaleMName = s;
jFLFSalesYearMonthTmp.SalesMonth = mthOfYr(queryCustInvoiceJour.InvoiceDate);
jFLFSalesYearMonthTmp.InvoicingName = queryCustInvoiceJour.InvoicingName;
jFLFSalesYearMonthTmp.OrderAccount = queryCustInvoiceJour.OrderAccount;
jFLFSalesYearMonthTmp.costValue = queryCustInvoiceJour.costValue();
jFLFSalesYearMonthTmp.InventQty = _custInvoiceTrans.InventQty;
jFLFSalesYearMonthTmp.ItemId = _custInvoiceTrans.ItemId;
jFLFSalesYearMonthTmp.LineAmount = _custInvoiceTrans.LineAmount;
jFLFSalesYearMonthTmp.SalesPrice = _custInvoiceTrans.SalesPrice;
jFLFSalesYearMonthTmp.itemName = _custInvoiceTrans.itemName();
jFLFSalesYearMonthTmp.modVolumeM3 = _custInvoiceTrans.modVolumeM3();
jFLFSalesYearMonthTmp.configId = _inventDim.configId;
jFLFSalesYearMonthTmp.InventColorId = _inventDim.InventColorId;
jFLFSalesYearMonthTmp.InventSizeId = _inventDim.InventSizeId;
jFLFSalesYearMonthTmp.NameAlias = _inventTable.NameAlias;
jFLFSalesYearMonthTmp.InventLocationId = _inventLocation.InventLocationId;
jFLFSalesYearMonthTmp.RegionName = _inventLocation.Name;
jFLFSalesYearMonthTmp.SiteId = _inventSite.SiteId;
jFLFSalesYearMonthTmp.BranshName = _inventSite.Name;
jFLFSalesYearMonthTmp.insert();
}
ttsCommit;
}
so where do I have to do I have to it, and how to do it, just what I want the report to display only comparisons between specific years according the user input, can you please help.
Best regards
Jamil Alshaibani