Notifications
Announcements
No record found.
What is the best way to send simple output to a printer from X++ code without using a report?
*This post is locked for comments
I think the printjobsettings class would work:
http://msdn.microsoft.com/en-us/library/aa634996.aspx
Thanks for the quick reply-I've tried to familiarize myself with PrintJobSettings but I can't figure out if and how I can output a 1 string of characters with a given font and size to a printer without going through making a report.
What is the requirement? Do you want to output variables for programming purposes or do you need to output something for users? If you need to print data from ax then I would strongly suggest using a report anyway.
This started as what I thought would be a pretty simple task. I'm new to AX/X++ and I wanted to code a quick program that prompted for a string value of not more than 20 or so characters (a string value that wasn't necessarily stored in a table somewhere so writing a report where a table must be specified didn't make sense) and print it out as a barcode by using the 'BC C39 2 to 1 Medium' font. This was to be used to test some bar coding functionality that's being added to our AX implementation-we do not have AX up and running yet. We ended up simply printing out some bar codes from excel so no big deal but I'd still like to know how to go about writing X++ code that would output to a printer without using a report. I realize that almost all printed output can and should be handled by reports but still ... it's one of those things that'll bother me until I find out how to do it, lol. Thanks again.
Visual Basic 6 had the Printer object and VB 2008 has PrintDocument. The closest thing I can find is PrintJobSettings for X++ but it doesn't seem to have any methods for output. Again, I realize that most printed output can and should be handled by reports but I would still like to know how to send some simple output to the printer without having to define a report.
Hi all, jumping into this conversation because I was looking for something like it.
We have some POS cash drawers that are connected to the parallel printer port, the way they work is that by sending a specific command to them they will open, we need to be able to send that command to the printer (cash drawer) from x++.
Any of you tried something like that ?
thanks
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Priya_K 4
Martin Dráb 4 Most Valuable Professional
Ali Zaidi 2