Hi Crispin, I have tried your approach and the report is still not printing those fields. Are there any other classes I need to extend?
[PostHandlerFor(classStr(SalesInvoiceDP), methodstr(SalesInvoiceDP, processReport))]
public static void tmpTablePostHandler(XppPrePostArgs arguments)
{
SalesInvoiceDP dpInstance = arguments.getThis() as SalesInvoiceDP;
SalesInvoiceHeaderFooterTmp tmpTable = dpInstance.getSalesInvoiceHeaderFooterTmp();
SalesTable salesTable;
CustTable custTable;
InventLocation inventLocation;
Inventsite inventSite;
CustInvoiceJour custInvoiceJour;
while select forUpdate tmpTable
{
select firstonly1 CustAccount, InventSiteId, InventLocationId from salesTable
where salesTable.SalesId == tmpTable.SalesId;
CustInvoiceJour = CustInvoiceJour::findRecId(tmpTable.JournalRecId);
custTable = SalesTable.custTable_CustAccount();
inventSite = InventSite::find(SalesTable.InventSiteId);
inventLocation = InventLocation::find(SalesTable.InventLocationId);
tmpTable.DeliveryAddress = CustTable.address();
tmpTable.CustName = CustTable.name();
tmpTable.CustEmail = CustTable.email();
tmpTable.SiteAddress = InventSite.logisticsPostalAddress().Address;
tmpTable.WarehouseAddress = InventLocation.logisticsPostalAddress().Address;
if (CustInvoiceJour.isProforma())
{
tmpTable.SiteAddress = "Just testing address";
}
ttsbegin;
tmpTable.update();
ttscommit;
}
}