Hi Venkatesh,
Here is an adapted version of the code.
public void processReport()
{
MyContract myContract;
DetailSummary printDetail;
PurchTable purchTable;
PurchLine purchLine;
VendTable vendTable;
MarkupTrans markupTrans;
ExchangeRateHelper exchangeRateHelper;
DefaultDimensionView defaultDimensionView;
MyView myView;
myContract = this.parmDataContract() as MyContract;
printDetail = myContract.parmPrintDetail();
if (MyContract.parmasAtDate() == Global::DateNull())
{
throw error("As at date needs to be filled in");
}
ttsbegin;
MyTempTmp(this.parmUserConnection());
insert_recordset MyTempTmp(AField1,AField2,AField3,AFlield4,AField5)
select BField1,BField2,BField3
from myView
//Ranges of the report
where myView.BField2 <= MyContract.parmasAtDate()
&& myView.BField2 > mkDate(01,01,1900);
while select forUpdate * from myTempTmp
{
// Get exchange rate
if (myTempTmp.AField2 == Global::DateNull())
{
myTempTmp.ExchangeRate = 1;
}
else
{
exchangeRateHelper = ExchangeRateHelper::newExchangeDate(Ledger::current(), myTempTmp.AField3, myTempTmp.AField2);
myTempTmp.ExchangeRate = exchangeRateHelper.getExchangeRate1()/100;
}
myTempTmp.AField4 = purchLine.PurchId;
myTempTmp.AField5 = vendTable.AccountNum;
myTempTmp.update();
}
ttscommit;
}
I have a UIBuilder Class that creates a dialogue box prompting for the Date parameter.
on the dialogue box there is a "Select" button that can be used to fill in the ranges defined on the query in the AOT.
This is where my issue is coming in. When i add a value in the AOT --> Queries --> MyQuery --> DataSources --> PurchTable --> Ranges --> PurchId and in the properties panel add a PO number as a value, it filters my report for only that PO (which is correct) YET...when i put the PO number in on the "select" screen on my dialogue box, it doesn't filter the report.
I hope this explains it a bit better.
Thanks,
Adrian