Tuesday, 28 August 2012

How to add image dynamically from Ax2009 database to SSRS report


i am using following method for employee signature printing in AX2009.

  1. In report design view, create a required table with a data source connection and a dataset with a field that contains binary image data. For more information, see .
  2. Insert a column in your table.
  3. On the Insert menu, click Image, and then click in the data row of the new column.
  4. On the General page of the Image Properties dialog box, type a name in the Name text box or accept the default.
  5. In Select the image source, select Database.
  6. In the Image Properties dialog box, click the expression (fx) button.
    Add following line in expression =System.Text.Encoding.Default.GetBytes(Mid(System.Text.Encoding.Default.GetString(Fields!IMAGE.Value),8))
  7. In Use this MIME type, select the MIME type, or file format, of the image—for example, bmp.
  8. Click OK.


Insert Company logo in SSRS reports (AX)


following useful article for printing companylogo of Ax on SSRS reports of Ax .

http://www.hakasolutions.com/news/51/130/Insert-Company-logo-in-SSRS-reports-AX/

Sunday, 5 February 2012

Create Sales Quotation using X++ Code in Ax2012


static void CreateSalesQuotation(Args _args)
{
    AxSalesQuotationTable    AxSalesQttable;
    AxSalesQuotationLine     AxSalesQtline;
    SalesQuotationLine      SalesQuotationLine;
    salesQuotationTable     salesQuotationTable;
    CustTable     custTable;
    SalesQty  salesQty;
    ;
    salesQty = 2;
    AxSalesQttable =  new AxSalesQuotationTable();
    AxSalesQttable.parmCustAccount('C-20');
    AxSalesQttable.parmCurrencyCode('USD');        
    AxSalesQttable.save();
    AxSalesQtline =  new AxSalesQuotationLine();//::construct(smmQuotationLine);

    AxSalesQtline.axSalesQuotationTable(AxSalesQttable);

    AxSalesQtline.parmQuotationId(AxSalesQttable.parmQuotationId());
    AxSalesQtline.axSalesQuotationTable(AxSalesQttable);
    AxSalesQtline.parmItemId('1000');

    AxSalesQtline.parmSalesQty(salesQty);

    AxSalesQtline.parmInventDimId('00001005_069');
    //AxSalesQtline.par

    AxSalesQtline.parmcurrencyCode('USD');
    AxSalesQtline.save();
}

Wednesday, 25 January 2012

A call to the Microsoft Dynamics AX SRSFrameworkService service failed. No connection could be made because the target machine actively refused it

I am facing that problem but the help of following link. I have solved that problem
http://community.dynamics.com/product/ax/f/33/t/68553.aspx

with the help of  above link i have register the following both services

SRSFrameworkService
SSASFrameworkService
and also auto deploy the following services
BIServices
UserSessionService 

Tuesday, 1 November 2011

How add financial dimension on forms inside Ax2012


1.      Perform
a)      Open AOT>>Data Dictionary>>Extended Data Types type/select DimensionDefault and drag it in table which will be used further as a datasource in form where you have to show the Dimensions. Do Remember  that you have to drag it in table not at DataSource.
b)     Open Table in the Data, Dictionary which will be used as a Datasource, and create a realtion with table DimensionAttributeValueSet .
c)      Right Click the Relations. Select ‘New Realation’.  Select properties. Set name as DimensionAttributeValueSet, Table as DimensionAttributeValueSet.
d)     Right Click the this newly created Relation DimensionAttributeValueSet, select New>>Normal.
e)      Set the properties of Normal Realtion as:  Field=TheFieldwhichwillsaveDimensionNumberInYourTable
Source EDT= DimensionDefault
Related Field=RecId

2.      Verify that the table that will hold the foreign key to the DimensionAttributeValueSet table is a
data source on the form(the one on which you have to show dimensions).
3.      Create a tab that will contain the financial dimensions control. This control is often the only
data shown on the tab because the number of financial dimensions can be large.
4.   set properties of Tab as under
a)      Set the Name metadata of the tab to TabFinancialDimensions.
b)     Set the AutoDeclaration metadata of the tab to Yes.
c)      Set the Caption metadata of the tab to @SYS101181 (Financial dimensions).
d)     Set the NeedPermission metadata of the tab to Manual.
e)      Set the HideIfEmpty metadata of the tab to No.
       5.  Override the pageActivated method on the new tab
public void pageActivated()
{
    dimDefaultingController.pageActivated();

    super();
}
      6.   Override the following methods on the form.
class declaration
public class FormRun extends ObjectRun
{
    DimensionDefaultingController dimDefaultingController;
}
init (for the form):
public void init()
{
    super();
    dimDefaultingController=DimensionDefaultingController::constructInTabWithValues(
      true, 
      true, 
      true, 
      0, 
      this, 
      tabFinancialDimensions, 
      "@SYS138487");

    dimDefaultingController.parmAttributeValueSetDataSource(myTable_ds,
    fieldstr(myTable, DefaultingDimension));
}
    7.      Override the following methods on the form data source
            public int active()
{
    int ret;
    ret = super();
    dimDefaultingController.activated();
    return ret;
}
public void write()
{
    dimDefaultingController.writing();
    super();
}
public void delete()
{
    
    super();
  dimDefaultingController.deleted();
}

           

Monday, 19 September 2011

what´s difference between Kernel version and Application


The Dynamics AX Kernel is the component executing the X++ Application code. So the Kernel version is the version of the executable (Client, Server, Business Connectors) while the Application version is the version of the Dynamics AX “Business Logic” - the X++ Application code, Forms, Repots – everything in the AOT.
You can check the current Application version in the Dynamics AX Client going to "Help - About Microsoft Dynamics AX".