Throughout the years we have noticed that out SRSReport Document Type for Document attachments grew over the size of 90GB. This was getting filled by having the Print to document archive checkbox ticked in their saved Print settings. The generated printouts were just sitting in the archive without ever being actioned. We had to come up with a way to untick this setting for everyone and revoke the option to enable it again on the form. After that we could start removing SSRS document archives.

Did the following changes under \Classes\SysPrintOptions to only allow system administrator to set this flag:

private void init()
(...)
        storeInPrintArchive = Global::isSystemAdministrator() ? printJobSettings.storeInPrintArchive() : false;

public void new()
(...)
    showOutputPrintArchive  = Global::isSystemAdministrator() ? true : false;

public boolean parmStoreInPrintArchive(boolean _storeInPrintArchive = storeInPrintArchive)
(...)
    storeInPrintArchive = Global::isSystemAdministrator() ? _storeInPrintArchive : false;

Then the saved printer settings had to be changed in the SysLastValue table for all user accounts, without changing any other printer settings. They are stored differently based on whether they extend FormLetter classes, or not.

Please make sure you run and validate this in your Test environment first!

static void WIK_setPrintJobSettings(Args _args)
{
    SysLastValue                    sysLastValue;
    container                       lastValues;
    container                       con;
    ContainerClass                  containerClass;
    SRSPrintDestinationSettings     printSettings;
    PrintJobSettings                printJobSettings;
    Object                          object;
    Object                          contractObject;
 
    while select sysLastValue
            // Specific formletter reports
        where (sysLastValue.elementName == classStr(SalesFormLetter_Invoice)
            || sysLastValue.elementName == classStr(SalesFormLetter_PickingList)
            || sysLastValue.elementName == classStr(SalesFormLetter_Confirm)
            || sysLastValue.elementName == classStr(SalesFormLetter_FreeText)
            || sysLastValue.elementName == classStr(SalesFormLetter_PackingSlip)
            || sysLastValue.elementName == classStr(PurchFormLetter_Confirmation)
            || sysLastValue.elementName == classStr(PurchFormLetter_ConfirmationRequest)
            || sysLastValue.elementName == classStr(PurchFormLetter_Invoice)
            || sysLastValue.elementName == classStr(PurchFormLetter_PackingSlip)
            || sysLastValue.elementName == classStr(PurchFormLetter_PurchOrder)
            || sysLastValue.elementName == classStr(PurchFormLetter_ReceiptsList)
            // Specific SSRS reports via controller class
            || sysLastValue.elementName == classStr(AssetBalanceReportColumnsController)
            || sysLastValue.elementName == classStr(AssetReportsController)
            || sysLastValue.elementName == classStr(BankPaymAdviceChequeController)
            || sysLastValue.elementName == classStr(BankReconciliationController)
            || sysLastValue.elementName == classStr(BankReconciliationSummaryController)
            || sysLastValue.elementName == classStr(CustAccountStatementExtController)
            || sysLastValue.elementName == classStr(CustAgingReportController)
            || sysLastValue.elementName == classStr(CustInvoiceController)
            || sysLastValue.elementName == classStr(CustLedgerTransController)
            || sysLastValue.elementName == classStr(CustVendTransOpenPerDateController)
            || sysLastValue.elementName == classStr(HcmAccommodationListController)
            || sysLastValue.elementName == classStr(HcmCourseAttendeeStatListController)
            || sysLastValue.elementName == classStr(HcmCourseConfirmationController)
            || sysLastValue.elementName == classStr(HcmWorkersHiredInPeriodController)
            || sysLastValue.elementName == classStr(HRMEmployeeLeaveController)
            || sysLastValue.elementName == classStr(InventABCController)
            || sysLastValue.elementName == classStr(InventAgingController)
            || sysLastValue.elementName == classStr(InventCostReportController)
            || sysLastValue.elementName == classStr(InventJournalTransController)
            || sysLastValue.elementName == classStr(InventJournalTransTransferController)
            || sysLastValue.elementName == classStr(InventLedgerConflictController)
            || sysLastValue.elementName == classStr(InventPriceOverviewController)
            || sysLastValue.elementName == classStr(InventSettlementAdjustmentController)
            || sysLastValue.elementName == classStr(InventTableOverviewController)
            || sysLastValue.elementName == classStr(InventTransferOrdOverviewController)
            || sysLastValue.elementName == classStr(InventTransferShipReceiveController)
            || sysLastValue.elementName == classStr(InventValueReportController)
            || sysLastValue.elementName == classStr(JADRouteCashReconciliationController)
            || sysLastValue.elementName == classStr(LedgerAccountSchedController)
            || sysLastValue.elementName == classStr(LedgerJournalAcctMovementController)
            || sysLastValue.elementName == classStr(LedgerJournalCashController)
            || sysLastValue.elementName == classStr(LedgerJournalController)
            || sysLastValue.elementName == classStr(LedgerOpenTransactionsController)
            || sysLastValue.elementName == classStr(LedgerTotalAndBalanceListController)
            || sysLastValue.elementName == classStr(LedgerTransListAccountController)
            || sysLastValue.elementName == classStr(LedgerTransPerJournalController)
            || sysLastValue.elementName == classStr(LedgerTransStatementController)
            || sysLastValue.elementName == classStr(LedgerTrialBalanceController)
            || sysLastValue.elementName == classStr(PurchConfirmationRequestController)
            || sysLastValue.elementName == classStr(PurchFinalizeServiceController)
            || sysLastValue.elementName == classStr(PurchPackingSlipController)
            || sysLastValue.elementName == classStr(PurchPurchaseOrderController)
            || sysLastValue.elementName == classStr(PurchStatisticsController)
            || sysLastValue.elementName == classStr(SalesCODLabelController)
            || sysLastValue.elementName == classStr(SalesConfirmController)
            || sysLastValue.elementName == classStr(SalesHeadingController)
            || sysLastValue.elementName == classStr(SalesInvoiceController)
            || sysLastValue.elementName == classStr(SalesPackingSlipController)
            || sysLastValue.elementName == classStr(smmReportsController)
            || sysLastValue.elementName == classStr(SysInfoLogController)
            //|| sysLastValue.elementName == classStr(SysOperationQueryController)
            //|| sysLastValue.elementName == classStr(SysOperationServiceController)
            || sysLastValue.elementName == classStr(SysUsersOnlineController)
            || sysLastValue.elementName == classStr(TaxListController)
            || sysLastValue.elementName == classStr(TaxTransController)
            || sysLastValue.elementName == classStr(TaxTransDetailController)
            || sysLastValue.elementName == classStr(TaxWithholdController)
            || sysLastValue.elementName == classStr(VendAccountStatementIntController)
            || sysLastValue.elementName == classStr(VendAgingReportController)
            || sysLastValue.elementName == classStr(VendBalanceListController)
            || sysLastValue.elementName == classStr(VendInvoiceController)
            || sysLastValue.elementName == classStr(VendInvoiceDocumentController)
            || sysLastValue.elementName == classStr(VendRprtApproveCollectionController)
            || sysLastValue.elementName == classStr(WmsPickingList_OrderPickController)
            // Handle all SSRS-based reports as a generic type
            || sysLastValue.elementName == classStr(SrsReportRunController)
            ) && (
                sysLastValue.recordType == UtilElementType::Class
            )
    {
        if (xUserInfo::find(false, sysLastValue.userId).enable == NoYes::No)
        {
            continue;
        }
 
        lastValues = xSysLastValue::getValue(sysLastValue.company, sysLastValue.userId, sysLastValue.recordType, sysLastValue.elementName, sysLastValue.designName);
        printSettings = null;
        object = null;
 
        if (lastValues)
        {
            switch (sysLastValue.elementName)
            {
                // Formletter classes
                case classStr(PurchFormLetter_Confirmation) :
                    object = PurchFormLetter_Confirmation::newConfirmation();
                    break;
 
                case classStr(PurchFormLetter_ConfirmationRequest) :
                    object = PurchFormLetter_ConfirmationRequest::newConfirmationRequest();
                    break;
 
                case classStr(PurchFormLetter_Invoice) :
                case classStr(PurchFormLetter_PackingSlip) :
                case classStr(PurchFormLetter_PackingSlip) :
                case classStr(PurchFormLetter_PurchOrder) :