web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to get name of the report and design?

(0) ShareShare
ReportReport
Posted on by 210

/// <summary>
/// The <c>SalesBaileeController</c> class is the helper class for the associated SRS Report.
/// </summary>
class SalesBaileeController extends SrsPrintMgmtController
{
PrintCopyOriginal printCopyOriginal;
SalesInvoiceJournalPrint salesInvoiceJournalPrint;
RecordSortedList journalList;
CustInvoiceJour custInvoiceJour;

SalesBaileeContract salesBaileeContract;
/// <summary>
/// Initializes an instance of the print management report run object.
/// </summary>
/// <remarks>
/// This method provides the necessary construction of the <c>PrintMgmtReprotRun</c> class. Customizing
/// this class may cause problems with future upgrades to the software.
/// </remarks>
protected void initPrintMgmtReportRun()
{
printMgmtReportRun = PrintMgmtReportRun::construct(
PrintMgmtHierarchyType::Sales,
PrintMgmtNodeType::SalesTable,
PrintMgmtDocumentType::SalesOrderBailee);

printMgmtReportRun.parmReportRunController(this);

if (salesInvoiceJournalPrint)
{
printMgmtReportRun.parmDefaultCopyPrintJobSettings(new SRSPrintDestinationSettings(salesInvoiceJournalPrint.parmPrinterSettingsFormLetterCopy()));
printMgmtReportRun.parmDefaultOriginalPrintJobSettings(new SRSPrintDestinationSettings(salesInvoiceJournalPrint.parmPrinterSettingsFormLetter()));
printMgmtReportRun.parmForcePrintJobSettings(!salesInvoiceJournalPrint.parmUsePrintManagement());
}
else if (printCopyOriginal == PrintCopyOriginal::OriginalPrint)
{
//forcePrintJobSettings is reversal to usePrintManagement
printMgmtReportRun.parmForcePrintJobSettings(false);
}
}

/// <summary>
/// Loads the instances of the <c>PrintMgmtPrintSettingDetail</c> class that are used to print the
/// report.
/// </summary>
/// <param name="_jourTable">
/// The journal table to print.
/// </param>
/// <param name="_transTable">
/// The table to which the print management information has been related.
/// </param>
/// <param name="_languageId">
/// The language ID that should be used to retrieve the footer text.
/// </param>
/// <param name="_documentKeyValue">
/// A human readable value that uniquely identifies the document to be printed.
/// </param>
/// <remarks>
/// Start by calling the <c>loadPrintSettings</c> method to load print settings for the current
/// instance of the <c>FormLetterReport</c> class. Next, call the <c>moveNextPrintSetting</c> method to
/// iterate over the print settings that have been found. The <c>getCurrentPrintSetting</c> method will
/// then return the current instance of the <c>PrintMgmtPrintSettingDetail</c> class that can be used
/// to retrieve printer settings for the current copy of the report.
/// </remarks>
public void loadPrintSettings(Common _jourTable, Common _transTable, str _languageId, str _documentKeyValue = '')
{
boolean isValidReference(Common _referencedTableBuffer)
{
PrintMgmtNodeInstance nodeInstance = new PrintMgmtNodeInstance();

nodeInstance.parmNodeDefinition(PrintMgmtNode::construct(PrintMgmtNodeType::SalesTable));
nodeInstance.parmReferencedTableBuffer(_referencedTableBuffer);

return nodeInstance.isValidReference();
}

void setSettingDetail(PrintMgmtDocInstanceType _type, SRSPrintDestinationSettings _defaultSettings)
{
PrintMgmtPrintSettingDetail printSettingDetail = new PrintMgmtPrintSettingDetail();

PrintMgmtReportFormat printMgmtReportFormat;

printMgmtReportFormat = PrintMgmtReportFormat::findSystem(PrintMgmtDocumentType::SalesOrderBailee);

printSettingDetail.parmReportFormatName(printMgmtReportFormat.Name);
printSettingDetail.parmSSRS(printMgmtReportFormat.SSRS);

printSettingDetail.parmType(_type);

printSettingDetail.parmInstanceName(enum2str(_type));

// Since this will be reported to the screen, one copy is the only thing that makes sense
printSettingDetail.parmNumberOfCopies(1);

printSettingDetail.parmPrintJobSettings(_defaultSettings);

printMgmtReportRun.loadSettingDetail(printSettingDetail, _documentKeyValue);
}

if (printCopyOriginal == PrintCopyOriginal::OriginalPrint && isValidReference(_transTable))
{
// Print an original
printMgmtReportRun.load(_jourTable, _transTable, _languageId, _documentKeyValue);
}
else if (printCopyOriginal == PrintCopyOriginal::Copy)
{
// Print a copy
setSettingDetail(PrintMgmtDocInstanceType::Copy, printMgmtReportRun.parmDefaultCopyPrintJobSettings());
}
else
{
// Print an original. We also default to print one original when we are trying to
// print using Print Mgmt information, but don't have a valid table reference.
// This covers the reprint case where the original transaction record may not be present.
setSettingDetail(PrintMgmtDocInstanceType::Original, printMgmtReportRun.parmDefaultOriginalPrintJobSettings());
}

if (!printMgmtReportRun.more())
{
checkFailed("@SYS78951");
}
}

/// <summary>
/// Implements the print management functionality.
/// </summary>
/// <remarks>
/// This method loads the print settings for the business object. It then invokes any necessary
/// business logic and then calls the <c>outputReports</c> method.
/// </remarks>
protected void runPrintMgmt()
{
printCopyOriginal = this.parmArgs().parmEnum();

if (this.parmArgs().record())
{
// Get journal list from the selected record/s
journalList = FormLetter::createJournalListCopy(this.parmArgs().record());
}
else
{
journalList = this.parmArgs().object();
}

if (!journalList)
{
throw error("@SYS26348");
}
if (SysDictClass::isEqualOrSuperclass(classIdGet(args.caller()), classNum(FormletterJournalPrint)))
{
salesInvoiceJournalPrint = args.caller();
}

while (journalList.next(custInvoiceJour) && !this.parmCancelRun())
{
if (!custInvoiceJour)
{
throw error("@SYS26348");
}

this.initPrintMgmtReportRun();

this.loadPrintSettings(custInvoiceJour, custInvoiceJour.salesTable(), custInvoiceJour.LanguageId);
this.outputReports();
}
}

public static void main(Args _args)
{
SalesBaileeController reportController = new SalesBaileeController();

if (!NonSSRSPrintMgmtAdapter::runPrintMgmtNonSSRS(PrintMgmtDocumentType::SalesOrderBailee, _args))
{
return;
}

reportController.parmArgs(_args);
reportController.parmReportName(PrintMgmtDocType::construct(PrintMgmtDocumentType::SalesOrderBailee).getDefaultReportFormat());
reportController.parmShowDialog(false);
reportController.startOperation();
}

}

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi,

    Do you want to understand which report you need to change? Or what was the question?

  • vikash_ Profile Picture
    210 on at

    how to find which report is used in this? i mean the name of the report.

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi,

    1. You need to check if there is a special set up in "Print management" form. Go to "Accounts receivable" -> Setup -> Forms -> Form setup ->Print management button. Find your specific report and check if there any setup. If it's there you can see the report name from the form.

    2. If there is no set up in "Print management" form. You need to find a default report and it can be found in PrintMgmtReportFormat.populate method.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans
Liquid error: parsing "/globalsearch/?q=Independiente+0+%3A+2+Boca+Juniors++tarjetas" - Nested quantifier +.