report generation in pdf

hi ,

i have a free text invoice report , which i wanna generate in pdf,

i am doing this through the printer setup … where i am selecting “send to” as file and giving a file name and format…

when i press “OK” button the report is displayed on the screen … rather than getting stored as pdf…

i am guessing that the printjobsetting are getting changed … can anyone help me with this???

So it’s a MorphX report in AX 2009 or older, right? Is it a standard report (which one) or a custom report?

Don’t “guess that the printjobsetting are getting changed”, verify whether it’s the case or not.

no its not a morph x report …

i have used element.unpackPrintJobSettings(salesFormLetterReport.getCurrentPrintSetting().parmPrintJobSettings().packPrintJobSettings()); command in fetch() method of the report to retrieve the current printjobsettings … which has been set by “print setup” screen… the values are different …

So what kind of report it is? Your code looks like from a MorphX report. And I still don’t know which version of AX you’re talking about.

If it’s a report based on SalesFormLetter, it may be taking setup from print management (Accounts Receivable > Setup > Forms > Form Setup).

If you get an unexpected value in a variable, the general advice would be debugging the code to see where it changes.