I created a report on my client machine. I have the width set perectly with a logo from SysImage… I run the report on my client with a salesID and it’s fine. When I take the report and compile it on the server and run it from there with the same order, I get a “Right edge of paper exceeded on page 1…” and the report is cut off half way through.
Why are they different?
ATrain
February 15, 2012, 8:29pm
2
It’s the printer you’re choosing. If you’re printing to the screen/printer/whatever, choose different printers from the drop down menu.
I’m saving the report to PDF, then sending it off… My client machine saves and sends fine, but the server doesn’t. Is there something I’m missing?
void saveReport(SalesTable _salesTable, str _fileName, str _reportName)
{
ReportRun testReport;
Args args = new Args();
PrintJobSettings printJobSettings;
SysPrintOptions sysPrintOptions;
;
try
{
args.parm(_salesTable.SalesId);
args.name(reportStr(report));
testReport = new ReportRun(args);
testReport.init();
printJobSettings = testReport.printJobSettings();
printJobSettings.setTarget(PrintMedium::File);
printJobSettings.preferredTarget(PrintMedium::File);
printJobSettings.format(PrintFormat::PDF);
printJobSettings.preferredFileFormat(PrintFormat::PDF);
printJobSettings.warnIfFileExists(false);
printJobSettings.fileName(_fileName);
testReport.unpackPrintJobSettings(printJobSettings.packPrintJobSettings());
testReport.report().interactive(false);
testReport.run();
}
catch(exception::Error)
{
}
}
Have you configured printers on the AOS? This link is for AX 2012, but I think the same thing applies in Dynamics AX2009: http://technet.microsoft.com/en-us/library/aa569633.aspx
Where do you save the pdf file before sendning it? C:/ can be on entirely different servers depending if the code runs on server or client. Do you get an error message?
I’m saving them to the network share…
I don’t want to print them from that server. I just want to save them to PDF formatted exactly how it is on my client machine.
Hi Mike
Did you check the AX client font size(for report) of both system?
Regards