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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Community Member Profile Picture
    on at

    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

  • Community Member Profile Picture
    on at

    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
    on at

    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
    on at

    Hi Experts,

    Still this is open query.

    Anyone worked on similar requirements? Please share your thoughts.

  • Verified answer
    Community Member Profile Picture
    on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans