Hi All,
If I do the print management settings from “SalesLedger/Setup/Forms/Form setup/button: Print management”, my custom report is considering the print management settings, but if I delete the settings from here and do it from this path "Sales ledger/Common/Customers/All customers/General tab/ SetUp/Print management button" the report is not considering the print management settings (similarly for Purchase Ledger also).
What could be the issue?
Details for the code changes are below:
I have a new report for which I have to create the new node in print management setting.
I manage to bring the report in print management by adding code in the below classes and table:
My issue is:
If I open the print management settings from “SalesLedger/Setup/Forms/Form setup/button: Print management”
And do the setting here it’s working fine, my report is picking the print destination setting correctly from here.
But if I delete the settings from the above path and do the same setting from the other path which is “Sales ledger/Common/Customers/All customers/General tab/ SetUp/Print management button”
The report is not considering the print management settings here and running on screen only.
Changes
Enum:
Added report name in the below Enums:
\Data Dictionary\Base Enums\PrintMgmtNodeType
\Data Dictionary\Base Enums\PrintMgmtDocumentType
Tables:
\Data Dictionary\Tables\PrintMgmtReportFormat\Methods\populate:
addAX (PrintMgmtDocumentType::SalesAdvancePayment);
addAX (PrintMgmtDocumentType::PurchAdvancePayment);
addAX (PrintMgmtDocumentType::LoadAdviceNote);
Classes:
\Classes\PrintMgmtHierarchy_Purch\getNodesImplementation:
supportedNodes.addEnd(PrintMgmtNodeType::PurchAdvancePayme
supportedNodes.addEnd(PrintMgmtNodeType::LoadAdviceNote);
\Classes\PrintMgmtHierarchy_Purch\getParentImplementation:
case PrintMgmtNodeType::PurchAdvancePayment:
// When no parent is present, return null
result.parmReferencedTableBuffer(null);
result.parmNodeDefinition(PrintMgmtNode::construct(PrintMgmtNodeType::PurchAdvancePayment));
break;
case PrintMgmtNodeType::LoadAdviceNote:
// When no parent is present, return null
result.parmReferencedTableBuffer(null);
result.parmNodeDefinition(PrintMgmtNode::construct(PrintMgmtNodeType::LoadAdviceNote));
break;
Similarly for PrintMgmtHierarchy_Sales:
\Classes\PrintMgmtHierarchy_Sales\getNodesImplementation
\Classes\PrintMgmtHierarchy_Sales\getParentImplementation
\Classes\PrintMgmtNode_CustTable\getDocumentTypes
if (isConfigurationkeyEnabled(configurationKeyNum(LedgerBasic)))
{
docTypes.addEnd(PrintMgmtDocumentType::SalesAdvancePayment);
}
Similarly for these classes also:
\Classes\PrintMgmtNode_VendTable
if (isConfigurationkeyEnabled(configurationKeyNum(LedgerBasic)))
{
docTypes.addEnd(PrintMgmtDocumentType::PurchAdvancePayment);
docTypes.addEnd(PrintMgmtDocumentType::LoadAdviceNote);
}
\Classes\PrintMgmtNode_Purch
if (isConfigurationkeyEnabled(configurationKeyNum(LedgerBasic)))
{
docTypes.addEnd(PrintMgmtDocumentType::PurchAdvancePayment);
docTypes.addEnd(PrintMgmtDocumentType::LoadAdviceNote);
}
\Classes\PrintMgmtNode_Sales:
if (isConfigurationkeyEnabled(configurationKeyNum(LedgerBasic)))
{
docTypes.addEnd(PrintMgmtDocumentType::SalesAdvancePayment);
}
\Classes\PrintMgmtNode:
case PrintMgmtNodeType::SalesAdvancePayment:
return new PrintMgmtNode_Sales();
case PrintMgmtNodeType::PurchAdvancePayment:
return new PrintMgmtNode_Purch();
case PrintMgmtNodeType::LoadAdviceNote:
return new PrintMgmtNode_Purch();
Class: PrintMgmtDocType
\Classes\PrintMgmtDocType\getDefaultReportFormat
case PrintMgmtDocumentType::SalesAdvancePayment:
return ssrsReportStr(AdvSettlPayment, Report);
case PrintMgmtDocumentType::PurchAdvancePayment:
return ssrsReportStr(AdvSettlPayment, Report);
case PrintMgmtDocumentType::LoadAdviceNote:
return ssrsReportStr(AdvSettlPayment, Report);
\Classes\PrintMgmtDocType\getQueryTableId
case PrintMgmtDocumentType::SalesAdvancePayment:
tableId = tableNum(SalesTable);
break;
case PrintMgmtDocumentType::PurchAdvancePayment:
tableId = tableNum(PurchTable);
break;
case PrintMgmtDocumentType::LoadAdviceNote:
tableId = tableNum(CTMContractLoads);
break;
\Classes\PrintMgmtDocType\getQueryRangeFields
case PrintMgmtDocumentType::SalesAdvancePayment:
fields.addEnd(fieldNum(SalesTable, InvoiceAccount));
fields.addEnd(fieldNum(SalesTable, SalesId));
break;
case PrintMgmtDocumentType::PurchAdvancePayment:
fields.addEnd(fieldNum(PurchTable, InvoiceAccount));
fields.addEnd(fieldNum(PurchTable, PurchId));
break;
case PrintMgmtDocumentType::LoadAdviceNote:
fields.addEnd(fieldNum(CTMContractLoads, LoadId));
break;
Please suggest some solution.
Best Regards
Pranav