Greeting everyone
i have this report with 4 parameter
two of them for from date and to date
and other with Multi-Select Lookup parameter
but the problem is when i apply that not filtered
here my codes
public void processReport()
{
CompanyInfo companyInfo;
CustTable custTable;
Query query;
QueryRun queryRun;
ListIterator companyListIterator,custListIterator;
QueryBuildDataSource qbdsCompany,qbdsCust;
date fromDate,toDate;
List companylist,custlist;
SalesPurchByCompanyContract salesPurchByCompanyContract;
contract = this.parmDataContract() as salesPurchByCompanyContract;
fromDate=contract.parmfromDate();
toDate=contract.parmtoDate();
companyListIterator = new ListIterator(contract.parmSalesPurchByCompany());
custListIterator = new ListIterator(contract.parmSalesPurchByCompany());
while(companyListIterator.more())
{
while(custListIterator.more())
{
this.populateTmpTable(companyListIterator.value(),custListIterator.value(),fromDate,toDate);
custListIterator.next();
}
companyListIterator.next();
}
}
this code for populate to temp table
public void populateTmpTable(String50 _dataarea,String255 _AccountNum,date _from,date _to)
{
CustTable custTable;
CustInvoiceJour custInvoiceJour;
DirPartyLocation dirPartyLocation;
TaxRegistration taxRegistration;
container conCompanies = [ 'scr','shw','sh', 'mgex','mbsg','scw' ,'spr','spw','wsof','wsom','wsos','wsow'];
while select crossCompany
: conCompanies
custInvoiceJour
where custInvoiceJour.dataAreaId ==_dataarea
&& (custInvoiceJour.InvoiceDate >= _from) && (custInvoiceJour.InvoiceDate <= _to)
&& custInvoiceJour.OrderAccount !=_AccountNum
{
salesPurchByCompTemp.clear();
salesPurchByCompTemp.CompanyID=custInvoiceJour.dataAreaId;
salesPurchByCompTemp.InvoiceDate=custInvoiceJour.InvoiceDate;
salesPurchByCompTemp.SalesBalance=custInvoiceJour.SalesBalance;
salesPurchByCompTemp.SumTax=custInvoiceJour.SumTax;
salesPurchByCompTemp.InvoiceAmount=custInvoiceJour.InvoiceAmount;
salesPurchByCompTemp.InvoiceId=custInvoiceJour.InvoiceId;
salesPurchByCompTemp.SalesId=custInvoiceJour.SalesId;
salesPurchByCompTemp.IDCust=custInvoiceJour.OrderAccount;
salesPurchByCompTemp.NameCust=custInvoiceJour.InvoicingName;
select * from custTable where custTable.AccountNum==custInvoiceJour.OrderAccount;
select * from taxRegistration where taxRegistration.DirPartyLocation==custTable.Party;
salesPurchByCompTemp.TaxCustome=taxRegistration.RegistrationNumber;
salesPurchByCompTemp.insert();
}
}