Tuesday, April 3, 2012

Step by Step Guide How to Install Dynamics AX 2012 SSRS and Analysis Extensions

This is the 3rd part in the series - Step by Step Installation of Dynamics AX 2012 Components:

Part 1 - Basic Dynamics AX 2012 Installation http://daxdilip.blogspot.com/2011/08/step-by-step-guide-how-to-install.html

Part 2 - Dynamics AX 2012 Enterprise Portal Installation http://daxdilip.blogspot.com/2011/08/how-to-install-dynamics-ax2012.html


INSTALL REPORTING EXTENSIONS
Run Pre-Requisite Validation

Go to the Link below and Download Cumulative Update 3 for SQL Server 2008 R2
http://support.microsoft.com/?kbid=2261464








Troubleshooting Tip (SSRS Errors)



Error during Install of AX 2012 SSRS Extensions

Microsoft.ReportingServices.WmiProvider.WMIProviderException: The profile for the user is a temporary profile. (Exception from HRESULT: 0x80090024)   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.ThrowOnError(ManagementBaseObject mo)
   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.ReencryptSecureInformation()
   at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ReencryptSecureInformation()

An error occurred during setup of Reporting Services extensions.

Reason: Unable to restore the SQL Server Reporting Services encryption key. The operation failed with error code 2148073508


Solution


a. Restart the box

b. In SQL Server 2008, SSRS Reporting Configuration Manager, Under Encryption Keys, Restore the key

c. Generate Backup encryption key for the service account

d. Check you are able to browse Report Server and Report Manager URL

e. Now, Install SSRS Extensions again, it should work



Deploy Reports (Powershell)



Wait for a few mins to populate the variable, it will return back to the PS Prompt
TIP - You can also output to a file by appending out-file as shown


803 SSRS reports out of the box
Publishing reports
Note – takes around 45 mins to deploy (with some warnings which can be ignored I guess)

INSTALL/CONFIGURE ANALYSIS SERVICES
  1. Install SQL Server Analysis
  2. Restart Server










Troubleshooting Dynamics AX 2009 Reporting Extensions Installation error on SQL Server 2008

Problem -
While installing Dynamics AX 2009 Reporting Extensions on SQL Server 2008, you might run into the following error – “You must install SQL Server 2005 Reporting Services Service Pack 2 before installing the reporting extensions”. Look at the Screenshot below











Solution -
1. Locate the AX Reporting services dll from the extracted AX 2009 SP1 folder [\AX2009SP1\support\axsetupresources\microsoft.dynamics.setup.reportingservices.dll;File Version - 5.0.1000.52]
2. Copy the microsoft.dynamics.setup.reportingservices.dll into the folder: \DynamicsAX\Msi\Components32\Program Files\Microsoft Dynamics AX\Setup [since my system is 32-bit so Components32]
3. It will ask to replace the existing dll having File Version – 5.0.593.0. Say Yes and replace. Now, carry on with the installation process.
Please read this post for further information and thanks to the poster for the steps – http://community.dynamics.com/forums/t/12322.aspx

Monday, April 2, 2012

Argument Passing between Forms in Dynamics Ax 2009

Hi,
Here a sample code to pass argument to one form to another form and using of Args() class.
Steps:
1) Create two Forms named FormA and FormB
2)Use the EmplTable as the Datasource of both forms
3)Design FormA with one Grid and add 4 data fields to the Grid(EmplId,DEL_Name,Grade,EmplStatus…..)
4)Assign the datasource for the grid and the data fields
5)Add a Button in FormA
6)Override the Clicked() method and write the below code:
void Clicked()
{
Args    _args;
FormRun _formRun;
EmplId   _empId;
;
_empId = EmplTable.EmplId;  // Selected employee id in the Grid is assigned to the variable which is pass to the next form
_args = new Args(); // creating a object for args class
_args.name(formstr(VA_FormB));  // Form Menuitem
_args.caller(this);  // Form Caller(Current Form is mentioned as this)
_args.parm(_empId); // Employee Number is passed to next form[but parm() is not a best practise]
_args.record(EmplTable); // Table name is passed
_formRun = ClassFactory.formRunClass(_args); //new FormRun(_args);   // Creating object for FormRun
_formRun.init();   // Form Initialization for Load
_formRun.run();  // Form Run for process
_formRun.wait(); // Form Wait for Display
}
7) Open the Second Form – FormB
8) Add one Grid Control and set the Data Source is EmplTable
9) Add 4 data fields as same in the Form A
10)Now Override the Init() of Form
public void init()
{
parmid      _parmId;
EmplTable   _EmplTable;
//     DictTable   _dictTable;    FormBuildDataSource   _ds;    FormBuildGridControl frmGrid; // These are for dynamic Form creation so leave it
_parmId =  element.args().parm(); // Getting the argument value from the Caller
//info(int2str(element.args().record().TableId));
if(!element.args().caller())   // Check the form is called by caller or directly, if directly it throw error
throw error(“Cant Run Directly”);
if(element.args().record().TableId == tablenum(EmplTable))   // check if the sent Table and the Current form table are equal or not
{
//        _EmplTable = element.args().record();  // Assign the Received Table name to Local Variable
//_dictTable = new DictTable(element.args().record().TableId);  // leave it , is used for Dynamic Form Creation
//_ds = form.addDataSource(_dictTable.name());  // leave it , is used for Dynamic Form Creation
//_ds.table(_dictTable.id());   // leave it , is used for Dynamic Form Creation
//frmGrid = form.addControl(FormControlType::Grid, “Grid”);   // leave it , is used for Dynamic Form Creation
//frmGrid.dataSource(_ds.name());   // leave it , is used for Dynamic Form Creation
//info(strfmt(“%1     %2″,_EmplTable.EmplId,_EmplTable.DEL_Name));
//frmGrid.addDataField(_ds.id(),fieldnum(EmplTable, DEL_Name));  // leave it , is used for Dynamic Form Creation
//        EmplTable_EmplId.dataSource(_EmplTable);   // leave it , is used for Dynamic Form Creation
//        EmplTable_EmplId.dataField(fieldnum(EmplTable,EmplID));   // leave it , is used for Dynamic Form Creation
//        EmplTable_DEL_Name.dataSource(_EmplTable);   // leave it , is used for Dynamic Form Creation
//        EmplTable_DEL_Name.dataField(fieldnum(EmplTable,EmplId));  // leave it , is used for Dynamic Form Creation
//        EmplTable_DEL_Email.dataSource(_EmplTable);   // leave it , is used for Dynamic Form Creation
//        EmplTable_DEL_Email.dataField(fieldnum(EmplTable,EmplId));   // leave it , is used for Dynamic Form Creation
super();  // Form Initialization
}
else
{
info(“DataSet Not Received”);  // throw error
}
}
11)Override the Init() of the DataSource
public void init()
{
switch(element.args().dataset())// get the table id sent by caller
{
case tablenum(EmplTable):  // check the table if matches with this tableid
{
_EmplID  =   element.args().parm();  // get the argument value
query   = new Query();            queryBuildRangeProj =                                          query.addDataSource(tablenum(EmplTable)).addRange(fieldnum(EmplTable,EmplId));          // query build for the form to display
queryBuildRangeProj.value(_emplId); // Criteria for the form
EmplTable_ds.query(query); // execution of the query
break;
}
}
super(); //datasource  initialization on the form based on the criteria
}
12) Save it, and create two menu items for each.
13) It is important to change the runon property of the FormB as CalledFrom.
14)Run the FormA and select an Employee Record and click the button.
15)The FormB opens with the Related information of the Selected Employee on form.

Tuesday, March 27, 2012

Overview Dynamics AX 2012 Installation

too many screenshots need to be published. IF you cannot view the pictures, you can go to the link:
http://www.fileserve.com/file/cqg6Msu to download the copy of my installation document. If you need a full detail of the installation document, please wait Microsoft to publish the one for RTM version.
Step 1. Install Microsoft Dynamics AX Components
 Step 2. Install File Location Step
3. Setup Support Files will be installed Step
 4. Choose Custom Installation Step
5. Choose the Components that you want to install ( using the sequence Databases  Application Object Serve r  Client)
Step 6. Installation will validate if the prerequisite software has been installed on the system. Click Error in the result to check what you can do .
Step 7, After fixing all the Error message and investigate the warning message, click Next to continue the installation
Step 8. Create a new Database
Step 9. Choose the Additional Models to install Step
10. Set up AOS and AOS Service account Step
11. Configure AX Client Step
12. Click Next until finish. Step
13. Now, we can continue installing Reporting Extensions and Analysis Extensions. Specify SSAS and SSRS Instance After validating the prerequisite, the installation process can be finished. As I checked the Deploy Reports when I set the SSRS instance, the Installation will deploy the reports directly via PowerShell. Not Like AX 2009, AX 2012 doesn’t need to create a folder and data source in AX first. The Powershell will create one automatically. Step 14. Enterprise Portal Installation Check the Enterprise Portal option to install it directly. Same as AX 2009. The basic AX 2012 installation has been finished. Based on my experience, Dynamics AX 2012 provide much better function than 209. When you get the issue during the installation, you can check the error message that shows you how to troubleshoot the issue.
Enjoy your AX 2012!

Step by Step Guide How to Install Dynamics AX2012 Enterprise Portal

How to Install Dynamics AX2012 Enterprise PortalThis is the second post in the series of installing Dynamics AX2012 Components. You can refer to the first post here - (Installing the base Dynamics AX Components - Databases, AOS, Client, Debugger, Office Addins)

http://daxdilip.blogspot.com/2011/08/step-by-step-guide-how-to-install.html

This post will talk about installing Dynamics AX2012 Enterprise Portal.
The basic pre-requisite for Installing Enterprise Portal is Sharepoint 2010 Foundation/Sharepoint 2010 Server

Since this is sandpit/training box, I would be just installing Sharepoint Foundation 2010.

i. Install the Sharepoint 2010 Pre-Requisites shown below













ii. Pre-Requisites Installed Successfully

iii. Now, start with the Foundation Installation

iv. Run the Sharepoint Configuration Wizard
v. After all the tasks are completed successfully, you are welcomed to the Sharepoint Team site


Tip - If you are planning to Install Sharepoint 2010 on Windows 7, please see the steps here which I posted a while ago - http://daxdilip.blogspot.com/2009/11/how-to-install-and-configure-sharepoint.html

Installing Dynamics AX2012 Enterprise Portal

i. Now, let's go ahead and install Enterprise Portal Component. Run the setup and click Next


ii. Check the Pre-Requisite Validation runs fine and then move next


iii. Enter the .Net BC Connector Information
iv. Configure the website, I just left the defaults as it is and moved next
v. Move next with the installation



vi. Encountered an error at this step


Looked at the error log file which came up, and found the below logs:

Error: Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.
Installation completed successfully, but Setup could not create the Enterprise Portal website. You can create the website by running Setup and installing Enterprise Portal again. You can also manually create a website using SharePoint Central Administration.



An error occurred during setup of Enterprise Portal (EP).
Registering tracing manifest file "C:\Program Files\Microsoft Dynamics AX\60\Server\Common\TraceProviderCrimson.man"
WEvtUtil.exe install-manifest "C:\Users\itadmin.PASPALEY\AppData\Local\Temp\tmpA5A1.tmp
**** Warning: Publisher {8e410b1f-eb34-4417-be16-478a22c98916} is installed on

Troubleshooting:
Didn't spent much time on troubleshooting this one as I have seen this error of logging with temporary profile before, but not with EP. The simplest solution which worked for me was to restart the box , login back and run the Enterprise Portal Setup again and that fixed the issue.


Finally, the Role center page arrives :-)... I can recall my pervious experience with  Dynamics AX 4.0 and 2009 version, never I was able to install MOSS and Enterprise Portal at the first go successfully without too many hiccups.




Additional Tip/Note -
Installation of Sharepoint Foundation 2010 Creates a new SQL Server named instance for e.g. In this case TEST-DEMOAX2012/Sharepoint where all sharepoint related databases can be found

Step by Step Guide How to Install Dynamics AX 2012 - Part 1

How to Install and Configure Dynamics AX 2012 Components
Over the past few weeks, I was involved in installing and configuring Dynamics AX 2012 Components on couple of machines running Server 2008 and Windows 7 Enterprise O/S.

Thought I will share my experience here in a series of posts covering  installation of all major components of AX 2012 - Database, AOS, Client, EP Components, Sharepoint 2010, Reporting Services and Business Intelligence.

Overall Installation Experience/Highlights: (Good)

a. I can say compared to my previous experiences with installation of Dynamics AX 4.0 and 2009, Dynamics AX2012 is less error-prone and satisfactory even though, the number of Pre-Requisites to be installed is quite a significant one in 2012

b. Validate Pre-Requisite Tool is quite handy which helps one to prepare for installation so that one is not taken by surprise when he/she performs the actual installation of components

c. Summary Report which comes up at the end is quite cool and user-friendly.

Considerations:

a. Requires more computing power in terms of RAM (As per System Requirements Guide it says 4 GB is the minimum). And from my personal experience, I have seen that AOS service (AX32serv.exe at it's peak, especially when you start the service and bring up the AX Client first time, it goes up close to 1 GB).

b. I also tried the fully loaded image from PartnerSource  on a machine which had overall 6GB RAM, allocated 4GB to the VM, but still it was crawling. It took me ages to bring up the AOS Service.

c. Since now the AOD is no longer file based and the models reside in SQL Server, you also need to plan ahead for the disk capacity for your SQL boxes. Standard AX database (Application) along with the model database (AOD) bulks up to 3 GB approx and if you want Contoso DB (Demo Data loaded) you should free up atleast 10 GB.

Ok, Now I will jump start the installation process starting with installation of Database, AOS and Client Components. I had captured the screenshots along the way as this will help me and my peers when we setup DEV, Test, Pre-Prod and Prod Environments.

Initial Setup Screen














Pre-Requisite Validation Utility

Note - Here, I'm just installing the components which are checked below: Database, AOS, Client Components, Debugger (My favorite ;-) and Management Utilities

Tip - I would suggest from my personal experience of installing AX, even though Single-Computer Installation sounds easy and quick but we don't get the proper control here, so I prefer Custom Installation and choose my components, easy to troubleshoot and learn as we go



















This screen shows you the list of validation errors which means you need to install the base pre-requisites software before you proceed.

The first error shown below is about the SQL Server Full Text Search is not installed or the service is not running
















Launch SQL Server Setup and Install Full-Text Search component











Next, comes the Report Viewer Control. You need to download it from here http://www.microsoft.com/download/en/details.aspx?id=6442

  











Some other pre-requisites which needs to be configured and installed are as follows:



Please Note, as per the Operating System whether it's Server 2008 or Win 7, it might ask you for some other pre-requisites as well, so I would suggest you run the pre-requisite validator and please don't go by the assumption that the above  links are the ONLY pre-requisites required.

.







Once the Pre-Requisites are installed successfully, you can kick start the Installation




















Tip - You can change the location here



































Select the Components you want to install, based on your implementation topology you might want to install different components on different boxes. As I'm setting up a Sandbox at the moment, I just installed everything in one box

Didn't thought of much experimenting with Themes so left it as it is.





















You can change the database names at this step below if you want to.

















Key in the ports for AOS and Services
















Note - For demo or training purposes, it's ok to go with network service but when you are setting up for pre-prod or production environments, you should choose a proper service account for AOS Account

This is kinda cool as you have the option below to choose the installation type as Developer, Administrator or Business and accordingly it will bring up the workspace for you after the install. At this moment, I'm wearing the administrator hat :-)

All set and ready to go...























You can take a break now ;-) and come back as this step took me good 15-20 mins time!



I love this :-)
















And this too.. The Summary Report comes up quite good (This is a new installation feature in 2012 which is a brief summary of the components installed )














Next, you can go ahead with the Compile Checklist.. One other small nice feature which I like is "Processing..." pop up below, it's quite interactive unlike previous versions, where you don't know what's happening and everything looks stuck

  






Next, I will be posting my experience on other big components of AX2012 starting with Configuring EP, Sharepoint 2010, SSRS and Business Intelligence. Keep looking at this space!! Till then Happy Dax'ing...