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 :
Microsoft Dynamics AX (Archived)

How to send SSRS Report directly to printer without report viewer preview?

(0) ShareShare
ReportReport
Posted on by

Hello,

By default Dynamics AX 2012 displays reports in report viewer of SSRS. How can I send it directly to printer?

Regards,

Sergio Sepúlveda M.
Dev-Solutions

*This post is locked for comments

I have the same question (0)
  • Syed Zeeshan Haider Jafry Profile Picture
    725 on at

    Hi,

    If the report uses the Print management then you can define the default printer setting on print management setup. and use Print management to print. check below link,

    technet.microsoft.com/.../dd309660.aspx

  • Suggested answer
    Bill 'Luther' Thompson Profile Picture
    on at

    Hello,

    If you want to work with the reports directly via X++ code, you could start by looking at the following:

    blogs.msdn.com/.../how-to-sending-reports-to-file.aspx

    You would more or less use the second example, and code the printer into X++, and you should be able to accomplish what you are wanting to do.

    Best Regards,

    Bill Thompson

    Dynamics AX/Sure Step - Online Support Engineer

    ============================================================

    When responding to posts, please 'Reply to Group' via your newsreader so that

    others may learn and benefit from your issue.

    ============================================================

    This posting is provided 'AS IS' with no warranties, and confers no rights.

    ============================================================

  • lori698 Profile Picture
    115 on at

    did you ever get this resolved? I am having a similar issue below is a sample of my code but the viewer still displays

    static void SR_SaveReportToPDFFromController(Args _args)

    {

       SalesPackingSlipController SalesPackingSlipController;

       SalesPackingSlipContract SalesPackingSlipContract;

       salesTable salesTable;

       Args                    args = new Args();

       SrsReportRunImpl        srsReportRun;

       CustPackingSlipJour       CustPackingSlipJour;

       ReportName              reportName = "SalesPackingSlip.Report";  

       str invoiceFileName;

       ;

    select firstOnly CustPackingSlipJour

               where CustPackingSlipJour.SalesId == 'SO011043';

       salesTable = SalesTable::find(CustPackingSlipJour.SalesId);

       args.record(CustPackingSlipJour);

       SalesPackingSlipController = new SalesPackingSlipController();

       SalesPackingSlipController.parmReportName(reportName);

       infolog.setInfoLogLevel(SysInfoLogLevel::None);

       SalesPackingSlipContract = SalesPackingSlipController.parmReportContract().parmRdpContract();

       SalesPackingSlipContract.parmRecordId(CustPackingSlipJour.RecId); // Record id must be passed otherwise the report will be empty

       SalesPackingSlipController.parmArgs(args);

       srsReportRun = SalesPackingSlipController.parmReportRun() as SrsReportRunImpl;

       SalesPackingSlipController.run();

       SalesPackingSlipController.parmReportRun(srsReportRun);

       SalesPackingSlipController.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::File);

       SalesPackingSlipController.parmReportContract().parmPrintSettings().overwriteFile(true);

       SalesPackingSlipController.parmReportContract().parmPrintSettings().fileFormat(SRSReportFileFormat::PDF);

       invoiceFileName = "AX_" + CustPackingSlipJour.SalesId + ".pdf";      

       SalesPackingSlipController.parmReportContract().parmPrintSettings().fileName('c:\\lori\\' + invoiceFileName);

        SalesPackingSlipController.runReport();

       infolog.setInfoLogLevel(SysInfoLogLevel::All);    

    }

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans