Well, I found a workaround, although it requires a bit of programming. If anyone ever need to perform a similar change, here's what I did:
table VendInvoiceJournal, method PrintJournal: add a Boolean parameter. in the method, replace the original line of code:
purchInvoiceMenu = new MenuFunction(menuitemOutputStr(purchInvoice),MenuItemType::Output);
by
if(InvoiceAnnexPrint)
{
purchInvoiceMenu = new MenuFunction(menuitemOutputStr(new_purchInvoice),MenuItemType::Output);
}
else
{
purchInvoiceMenu = new MenuFunction(menuitemOutputStr(purchInvoice),MenuItemType::Output);
}
the new menu item points a to class derived from VendInvoiceDocumentController. In this derived class, the main method initializes an internal Boolean member to true. this member must be defined in VendInvoiceDocumentController, not in the derived class.
In VendInvoiceDocumentController::initFormLetterReport, I then initialize the obscure formLetterReport.useUserDefinedDestinations to the value of the new Boolean member:
formLetterReport.parmUseUserDefinedDestinations(new_ForceUseUserDefinedDestinations);
There is nothing to change in the FormLetterReport class. When the loadPrintSettings method is executed, I have now circumvented this section of code by forcing parmUseUserDefinedDestinations to true. Note the comment, it seems like it is intended for this report to NOT go directly to a printer:
// Since this will be reported to the screen, one copy is the only thing that makes sense
printSettingDetail.parmNumberOfCopies(1);
printSettingDetail.parmPrintJobSettings(_defaultSettings);
if (!this.parmUseUserDefinedDestinations())
{
printSettingDetail.parmPrintJobSettings().printMediumType(SRSPrintMediumType::Screen);
}
My post probably isn't so clear, feel free to ask for any clarifications.
Regards,
Eric