Search This Blog

Monday, July 15, 2013

OpenPrinter_1: rc:0 lastError:1801(0x709) The printer name is invalid In Axapta 2009

When I open  the report getting the below in Dynamics AX 2009
Error message as below:
"OpenPrinter_1: rc:0 lastError:1801(0x709) The printer name is invalid."

Actually 2 places we need to Change


First Place:

      Classes->RunBaseReportDialog->main() 

static void main(Args args)
{
    RunBaseReportDialog     reportDialog    = new RunBaseReportDialog(args.caller());
    RunBaseReport           runBaseReport   = args.caller().runbase();
    ReportRun               reportRun       = runBaseReport.reportRun();
    Report                  report          = reportRun.report();
    boolean                 oldInteractive;
    boolean                 res;
    Dialog                  dialog;
;

    oldInteractive = report.interactive();
    report.interactive(true);

    //res = reportRun.prompt();  
 //removed
    res = reportDialog.prompt();  //Added 

    report.interactive(oldInteractive);
    if (!res)
        return;

    dialog = Dialog::getDialogFromCaller(args.caller());
    if (dialog)
    {
        dialog.updateServer();
    }
    runBaseReport.dialogUpdatePrinterSettings(dialog);
    reportDialog.run();
}
Second One:

Change the report design Property  orientation:Auto


Happy Daxing....:)


2 comments:

  1. I am still getting the same error after making your correction.
    Any further ideas?

    ReplyDelete
  2. We tried this as well and no luck.
    We have few citrix servers and error appears in two of them, but there might be differences depending on the user.
    We are using AX2009.

    Any ideas?

    ReplyDelete