Skip to main content

Posts

Showing posts from February, 2011

AX - Scan a document

There are a few ways to scan a document in AX. Best way is to use Windows Image Acquisition (WIA). This comes standard from Windows Vista and up. Previous version you had to download " Windows Image Acquisition Automation Library v2.0 " from Microsoft. Without getting into too much detail. Here is the code: static void scanDocument(Args _args) { COM commonDialog; COM imageFile; str wiaFormatJPEG = "{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}"; str wiaFormatBMP = "{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}"; str wiaFormatPNG = "{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}"; str wiaFormatGIF = "{B96B3CB0-0728-11D3-9D7B-0000F81EF32E}"; str wiaFormatTIFF = "{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}"; InteropPermission perm; ; // Set code access permission to help protect the use of th

AX - Get rid of the white space on report footer

If you have a page footer and you don't call the super method in the executeSection. You will find the length of the footer is reserved as white space. Rather than just not calling the super method - you might consider calling element.disableSection(PageFooter_1) or element.disablePageFooter(); This way - no space is reserved for the section.