Skip to main content

AX 2009: Citrix & Terminal Server Printing

Errors, or no output when printing from AX to a locally mapped Printer

If you are mapping local printers to your TS or Citrix environment and have an issues where nothing is printed or the following error is generated: startDoc: rc:SP_ERROR you will need to change the Print Processor data type from Raw to EMF.
This problem occurs because the UPD requires the Enhanced Metafile (EMF) format. By default, Microsoft Dynamics AX creates the print job in the RAW format. (As of AX
To modify these printer settings.
1. Click Start, and then click Control Panel.
2. Double-click Printers and Faxes.
3. Right-click the printer that you want to use, and then click Properties.
4. On the Advanced tab, click Print Processor.
5. In the Default data type pane, click NT EMF 1.008, and then click OK.
Microsoft Dynamics AX will recognize the EMF format. Additionally, Microsoft Dynamics AX will send the report to the spool file in the EMF format.
This is described in further detail in this KB 947524
Printers do not stay set as default
Symptoms:
Printers do not stay as default when running reports in AX.
1) You connect using RDP with printers redirected (say session 1)
2) You print in AX ->> Printer selection is saved to SysLastValue (say „HP Laserjet (session 1)”
3) Now you connect with another RDP session (session 2)
4) This time you’re logged on with session 2, and session 1 is also present in the system
5) When you now open the same report, you’ll see that the selected printer is „Unavailable” – This is because „HP LaserJet (session 1)” isn’t available, since we’re in session 2. So we only have „HP Laserjet (session 2)”.
Cause:
The use of printers for reports and or printing is often stored in usage data within Dynamics AX. The local printers that are directed from your local workstation and created on TS and Citrix often time have a uniquely generated printer name that includes a session id.  If you log out and then log back in a different printer name can be generated. In cases like this usage data is invalidated because so it sets your printer back to the clients default printer.
Resolution:
There is a KB fix that address this.  KB 981681.
AX Printer recommendations regarding UPD (Universal Print Driver)
When printer issues are experienced and the Universal Print Driver is used on a Terminal Server or Citrix environment we suggest  that you load the specific printer driver on the Terminal Server or Citrix machine.  After loading the driver on the Terminal Server or Citrix the proper postscript is generated and then sent to the printer. and anomalies.
Network Printers are not mapped to the Terminal Service or Citrix machines
Network printers that have this format \\\ are not always mapped to Terminal Service or Citrix machines.*  Installing printers locally or using TPC\IP based printers allows them to map to your remote environment and are then available for use.
*depending on the environment configuration and the version of TS or Citrix in use.
Tips for troubleshooting AX Printing issues
  • Try printing directly from a client that has its own local printers installed.  This will help you determine if the printing issue common with AX or with Citrix/TS
  • Check to ensure that your client version and AOS kernel versions match
  • Make sure your AX application and kernel version do not cross service pack levels
  • Test printing from multiple applications to ensure that there is not an underlying issue with the printer itself

Popular posts from this blog

What does this mean: "The form datasource query object does not support changing its AllowCrossCompany property after the form has executed the query."?

I have made a form with datasources vendtable and vendtrans. Inside vendtable_ds.executequery() looks like this: QueryBuildDataSource queryBuildDatasource ,queryBDS_VendTrans_Invoice; ; queryBuildDatasource = this.query().dataSourceTable(tablenum(vendtable)); queryBDS_VendTrans_Invoice = this.query().dataSourceTable(tablenum(vendtrans)); if (curext() == "MASTERCOMP") { this.query().allowCrossCompany(true); } else { this.query().allowCrossCompany(false); } //FilterVendorName = stringedit control on form if (FilterVendorName.text()) { queryBuildDatasource.addRange(fieldNum(VendTable,Name)).value(strfmt("*%1*", FilterVendorName.text())); } else { queryBuildDatasource.clearRange(fieldNum(VendTable,Name)); } //FilterInvoiceNumber = stringedit control on form if (FilterInvoiceNumber.valueStr() == "") { queryBDS_VendTrans_Invoice.enabled(false); } else { queryBDS_VendTrans_Invoice.enabled(true); queryBDS_VendTrans_In...

Credit Note [Dynamics AX] using X++

This post will help to create credit note for a sales order based on the invent lot id. All the invoices raised for a particular sales line – Lot Id will be raised back as a credit note. Information on Credit Note: A credit note or credit memorandum (memo) is a commercial document issued by a seller to a buyer. The seller usually issues a Credit Memo for the same or lower amount than the invoice, and then repays the money to the buyer or sets it off against a balance due from other transactions Below Code will help to create credit note for all the invoices raised against the sales line -lot id. Please note: This code can be customized as per your requirements. This is just a template to help creating credit note using X++ code. Please test the code before use. static void SR_CreateCreditNote_Sales(Args _args) { // Coded by Sreenath Reddy CustInvoiceTrans custInvoiceTrans; Dialog dialog = new Dialog(“Create credit note – for sales.”); DialogField dfInv...