Posts

Showing posts from August, 2015

Exporting Data from AX to text file

static void DemoExporttoExcel(Args _args) {    TextIO file;     container line;    InventTable                    inventTable;    #File    #define.filename('C:\\Data.csv')    ;    //Filename    file = new TextIO(#fileName, #io_write);    file.outFieldDelimiter(';');// for semicolon seperator     if (!file || file.status() != IO_Status::Ok)     {     throw error("File cannot be opened.");     }    while select inventTable    {       line = [inventTable.itemId];         file.writeExp(line);    }   }

To limit Text Box Characters in SSRS report

Often there is a requirement to limit the Text Box size to Specified number of characters , although there is a  canGrow   property on the text box which if set to no  restricts the characters to be displayed but if the number of characters is specified than its not the right way. to achieve the requirement use : Left(fields!data.value,40) It will limit the number of characters to the number specifies i.e 40 in this case.