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

Notifications

Announcements

Community site session details

Community site session details

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

How to integrate Vendor purpose into a customized report through print management

(1) ShareShare
ReportReport
Posted on by 144
I have added the vendor purpose into print management for a customized report as below. Report takes the PurchTable buffer to generate data.
 
 
 
But I run the report it throws an error as below. 
 
 
Below is the code for the controller class.
class AAAReportController extends SrsReportRunController
{
    private PurchTable purchTable;

    public static void main(Args _args)
    {
        AAAReportController controller = new AAAReportController();
        controller.parmArgs(_args);
        controller.parmReportName(ssrsReportStr(AAAReport, Report));

        controller.purchTable = _args.record();

        AAAReportContract contract;
        contract = controller.getDataContractObject();
        contract.parmPurchId(controller.purchTable.PurchId);

        SRSPrintDestinationSettings settings;
        settings = controller.parmReportContract().parmPrintSettings();
        settings.fileName(strFmt('%1_RPT', controller.purchTable.PurchId));

        #PrintMgmtSetup
        PrintMgmtPrintDestinationTokens destinationTokens = new PrintMgmtPrintDestinationTokens();
        destinationTokens.parmParameters(enum2Symbol(enumNum(PrintMgmtDocumentType), enum2int(PrintMgmtDocumentType::AAAReport)));

        controller.parmPrintDestinationTokens(destinationTokens);
        controller.parmShowDialog(true);
        controller.startOperation();
    }

    public boolean canGoBatch()
    {
        boolean ret;

        ret = super();

        ret = false;

        return ret;
    }

}
 
Can someone help me to resolve this error?
 
Categories:
I have the same question (0)
  • Mohamed Amine Mahmoudi Profile Picture
    26,515 Super User 2025 Season 2 on at
     
    Usually we get this error when the parameters are not properly loading/refreshed when you run the report.
    I hope this can help you.
     
    Best regards,

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

News and Announcements

Season of Giving Solutions is Here!

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
Abhilash Warrier Profile Picture

Abhilash Warrier 678 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 283 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans