I try to extend the base print management report(PurchPurchaseOrder) But I got this error, I did three things
1.Created extension for Tmp Table (PurchPurchaseOrder), and Duplicated the report (PurchPurchaseOrder)
2.Added the field(AntDlvMode) That I wanted, restored the data set in the report and edited the report
3.atlast wrote coding for COC Class and print management
Anybody help me out
Thanks
COC Class
[ExtensionOf(classStr(PurchPurchaseOrderDP))]
public final class Purch_Extension
{
protected PurchPurchaseOrderTmp initializeOrderLine(
PurchPurchaseOrderHeader _purchaseOrderHeader,
boolean _highlightUpdated,
PurchPurchaseOrderDPOrderLineQuerySelection _orderLineSelection)
{
PurchPurchaseOrderTmp purchPurchaseOrderTmp = next initializeOrderLine(_purchaseOrderHeader, _highlightUpdated, _orderLineSelection);
PurchTable purchTable;
select purchPurchaseOrderTmp;
purchPurchaseOrderTmp.AntDlvMode = purchTable.DlvMode;
purchPurchaseOrderTmp.insert();
return purchPurchaseOrderTmp;
}
}
Print management class Code
class MaxPrintMgtDocTypeHandlersExt{ [SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))] public static void getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result) { switch (_docType) { case PrintMgmtDocumentType::CustAccountStatement: _result.result(ssrsReportStr(MaxCustAccountStatementExt, Report)); break; } }}
Here some example images
Extende objects