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)

Print SSRS report directly to the printer

(0) ShareShare
ReportReport
Posted on by

I have been trying to figure out how to set the printer name so that it will show up in the Print destination dialog.  I am using the this code to set the medium type and the printer name

xPrintSettings.printMediumType(SRSPrintMediumType::Printer);

xPrintSettings.printerName(strFmt('@"%1"',xPrinterName));

It picks up the Print Medium type but will not pick up the printer name when I do a SrsReportRunUtil::showSettingsDialog(xPrintSettings).  Eventually I will want to print  directly to the printer, but I am trying to make sure it is picking up the printer name correctly first.  Currently it appears to picking up the default printer which in my case is fax.  Can some one please give me an example of how to set the printer name?

Thank you

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi Adney,

    Check printerMap() method of SRSPrintDestinationSettingsForm form, it returns names of all available printers, so just use one of them.

  • Community Member Profile Picture
    on at

    I know the name of the printer.  What I am trying to do is direct a printout to printer that is stored in a table associated with the user id.  I can set the print medium type, but I can't set the printer name.  The printer is installed locally to the server and appears in the list when the show settings dialog is displayed.  The default has been set to a different printer and when I try to change the printer it changes to FAX.

    This is what the print settings look like before I set the printer name

    printsetting2.png

    I put the code in to change the printer name parmPrintJobSettings().printerName(strFmt(@'PRTIT01'));, which is the same printer that is set to, and the settings look like this

    printsetting2.png

    If you know the printer name, why can't I set it.

    Thank you

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