Monthly Archives: November 2005

Create a form using X++ code

static void JobUsingCodeCreateForm(Args _args){    Form                   form;    FormRun             formRun;    Args                    args;    FormBuildDesign         formBuildDesign;    FormBuildControl        formBuildControl;    FormBuildTabControl     formBuildTabControl;    FormBuildTabPageControl formBuildTabPageControl;    FormBuildGridControl    formBuildGridControl;    FormBuildDatasource     formBuildDatasource;    FormBuildStringControl  formString;    ;     form = new Form();    formBuildDatasource = form.addDataSource(tableStr(PurchTable));    formBuildDesign = form.addDesign(‘design’);    formBuildTabControl = formBuildDesign.addControl(FormControlType::Tab, ‘Tab’);    formBuildTabPageControl = formBuildTabControl.addControl(FormControlType::TabPage, … Continue reading

Posted in Axapta Development | Leave a comment

Use temp table in reports

1. Create a report2. Add a data source of your temporary or ‘real’ table to the query 3. Create a simple design 4. Declare your temporary or a ‘real’ table in Class declaration as ‘myTmpTable’5. Overwrite method ‘run’ on the … Continue reading

Posted in Axapta Development | Leave a comment

Collation sequence in SQL Server

Some people may be confused about which collation sequence needs to be chosen during MS SQL installation. Actually, what you need to do is to install and run Axapta with "initialize database for Unicode" flag on. Then the collation order … Continue reading

Posted in Axapta Development | Leave a comment

How to retrieve the label?

static void retrieveLabel(Args args){ Syslabel  label = new label( <LanguageId> ); //”En-us” Str     someTxt; ;  someTxt = strFmt( label.extractString( literalStr("@SYS1234") ) ;}

Posted in Axapta Development | Leave a comment

Connect to database using ODBCConnection

In some situation, for instance, you want to use standard SQL, you may need to connect to the database directly. Codes below may be what you need: static void testOdbcConnection(Args args){    LoginProperty   loginProperty;    ODBCConnection  oDBCConnection;    ;     loginProperty = new … Continue reading

Posted in Axapta Development | Leave a comment