Wednesday, November 16, 2011

Enterprise Portal Deployment



                             Enterprise Portal Deployment
Microsoft Dynamics AX 2009

~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:

Blogs to help about EP Portal Deployment.


~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:

EP deployment Steps

Tuesday, November 15, 2011

Could not load file or assembly 'Microsoft.Dynamics.AX.Fim.PaymentService, Version=5.0.0.0,

While deploying SSRS , I got the below error :
Could not load file or assembly 'Microsoft.Dynamics.AX.Fim.PaymentService, Version=5.0.0.0,………….
To overcome this issue, we need to add the above mentioned dll from client\bin  folder to GAC as below :
Go to Start -> All programs -> Microsoft visual studio 2008 -> visual studio  tools -> visual studio  command prompt , right click and run as administrator :
Run the below  command :
Gacutil /i “location of dll”

Upon successfully added , you will get the message , “Assembly added to the cache”.


Hope it helps you as well.

AX 2009 Report extension installation

Hi Friends,

I am trying to install Report extension. When I run the Setup, I get the following message :

"You must install SQL server 2005 Reporting Services Service Pack 2 before installing the report extensions".

Some of the Resolution that i find out:

1. You can download regarding hofix released by Microsoft and replace dll file.
    HoFix Release By Microsoft - Click Here

~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~

2.The another resolution of updating registry key as follows:

Setup does not recognize that SQL Server 2005 Service Pack 2 is installed When installing the reporting extensions, you may receive an error message that states that you must install SQL Server 2005 Service Pack 2. If you have installed SQL Server 2005 Service Pack 2 and receive this error message, complete the following steps.
1. Open the registry and find the HKLM\SOFTWARE\Microsoft\Microsoft SQL Server key.
2. Right-click the HKLM\SOFTWARE\Microsoft\Microsoft SQL Server key & choose New >Key
3. Name the key Reporting Services.
4. Right-click the Reporting Services key and choose New > String Value.
5. Name the string value Version. The Version string value will have a type of REG_SZ.
6. Double-click the Version string value and enter 9.00.3042.00 as the value data. Click OK

~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~

While viewing the URL of reports if gets errors of symmetric key then change the setting in the Encryption Key (Change Action and Delete Action) as per required.
~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~

Get Single Records From Datasource and Update records

Hi Friends,

While development i came across the criteria which recommends me to insert or update the records on the basis of perticular field of table. In this case i used the getFirst and getNext methods of the datasource to fetch single records from the specified datasource.

Here is the code sample.......

~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~

InventTrans     tmpInventTrans;

tmpInventTrans = inventTrans_ds.getFirst(0,false);
while(tmpInventTrans)
{
         if(tmpInventTrans.SheAmortCancel == Noyes::No)
        {
            cancelVoucher=false;
            break;
        }
        tmpInventTrans = inventTrans_ds.getNext();
}

~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~

tmpInventTrans = inventTrans_ds.getFirst(0,false);
while(tmpInventTrans)
{
                select forupdate inventTransUpdate where inventTransUpdate.RecId == tmpInventTrans.RecId;
                inventTransUpdate.SheAmortCancel = NoYes::No;
                inventTransUpdate.update();
                tmpInventTrans = inventTrans_ds.getNext();
}
info("Amortization cancellation aborted");

~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~

Monday, November 14, 2011

Dynamics AX Business Intelligence

There is a new blog from Microsoft, focusing specifically on Dynamics AX BI. The blog can be found here.:

Dynamics AX Business Intelligence

AX SSRS Reporting Concepts

ScreenCast - AX SSRS Reporting Concepts on YouTube

Dynamics AX - code to Read/Write data to excel

Writing Data to Excel file
How it works
1. Use SysExcelApplication class to create excel file.
2. Use SysExcelWorkbooks and SysExcelWorkbook to create a blank workbook(by default 3 worksheets will be available).
3. Use SysExcelWorkSheets to select worksheet for writing data.
4. SysExcelCells to select the cells in the excel for writing the data.
5. SysExcelCell to write the data in the selected cells.
6. Once you done with write operation use SysExcelApplication.visible to open
file.

static void Write2ExcelFile(Args _args)
{
InventTable inventTable;
SysExcelApplication application;
SysExcelWorkbooks workbooks;
SysExcelWorkbook workbook;
SysExcelWorksheets worksheets;
SysExcelWorksheet worksheet;
SysExcelCells cells;
SysExcelCell cell;
int row;
;
application = SysExcelApplication::construct();
workbooks = application.workbooks();
workbook = workbooks.add();
worksheets = workbook.worksheets();
worksheet = worksheets.itemFromNum(1);
cells = worksheet.cells();
cells.range('A:A').numberFormat('@');
cell = cells.item(1,1);
cell.value("Item");
cell = cells.item(1,2);
cell.value("Name");
row = 1;
while select inventTable
{
row++;
cell = cells.item(row, 1);
cell.value(inventTable.ItemId);
cell = cells.item(row, 2);
cell.value(inventTable.ItemName);
}
application.visible(true);
}

Reading Data from Excel File

static void ReadExcel(Args _args)
{
SysExcelApplication application;
SysExcelWorkbooks workbooks;
SysExcelWorkbook workbook;
SysExcelWorksheets worksheets;
SysExcelWorksheet worksheet;
SysExcelCells cells;
COMVariantType type;
int row;
ItemId itemid;
Name name;
FileName filename;
;
application = SysExcelApplication::construct();
workbooks = application.workbooks();
//specify the file path that you want to read
filename = "C:\\item.xls";
try
{
workbooks.open(filename);
}
catch (Exception::Error)
{
throw error("File cannot be opened.");
}
workbook = workbooks.item(1);
worksheets = workbook.worksheets();
worksheet = worksheets.itemFromNum(1);
cells = worksheet.cells();
do
{
row++;
itemId = cells.item(row, 1).value().bStr();
name = cells.item(row, 2).value().bStr();
info(strfmt('%1 - %2', itemId, name));
type = cells.item(row+1, 1).value().variantType();
}
while (type != COMVariantType::VT_EMPTY);
application.quit();
}