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

Announcements

No record found.

News and Announcements icon
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,095 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,095 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 658

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 468 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 333 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans