Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Saving product receipt SSRS report as archive whenever PO is received.

Posted on by Microsoft Employee

Hello experts,

 

We have requirement to archive product receipt SSRS report whenever PO is received. We have few interfaces and periodic jobs which will create the product receipt from backend. If anyone has worked on similar requirement, please share details on automation.    

 

I have started with following but I am not able to successfully pass the arguments hence getting blank report.

    SrsReportRunController          controller = new SrsReportRunController();
    args                            args;
    SRSPrintDestinationSettings     printsettings;
    args = new args();
    args.record(vendpackingslipjour::findrecid(recId));
    controller.parmreportname(ssrsreportstr(PurchPackingSlip, Report));
    // get print settings from contract
    printSettings = controller.parmReportContract().parmPrintSettings();

    // set printer as the destination
    printSettings.printMediumType(SRSPrintMediumType::Archive);
     
    controller.parmShowDialog(false);
    controller.parmArgs(args);
    // start operation
    controller.startOperation();

 

 

Best Regards,

Prashanth N N

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Saving product receipt SSRS report as archive whenever PO is received.

    Thanks for the help, I have got the solution after debugging standard classes

    Contract.parmPrintFormletter(true);

    Contract.parmUsePrintManagement(true);

    We just need to set the above two parameters to true as we do it manually.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Saving product receipt SSRS report as archive whenever PO is received.

    Hi Experts,

    Still this is open query.

    Anyone worked on similar requirements? Please share your thoughts.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Saving product receipt SSRS report as archive whenever PO is received.

    Hi Crispin,

    Can you please provide more details on this approach? I was not able to find purchFormLetterContract.parmPrintSettings() method.

    Thanks,

    Prashanth N N

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Saving product receipt SSRS report as archive whenever PO is received.

    Hi Crispin,

    Yes, we are using standard purchformletter classes to post product receipt. I will try calling it from afterOperationEnd() method.

    But, report saved is blank report when we use SrsReportRunController.

    Any insights on this?

    Thanks,

    Prashanth N N        

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Saving product receipt SSRS report as archive whenever PO is received.

    Hi Crispin,

    Thanks for the quick response.

    I have few interfaces which post product receipt from backend. So I want to know common method are place from where I can call this code.

    Also, it is showing blank report now and when I change the controller to Purchpackingslip controller it works fine.

    Thanks,

    Prashanth

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans