Tuesday 22 April 2014

Work Flow Installation in Ax 2009 with Snap-Shot

Hi Today i am demonstrate how to install Workflow in Ax 2009.


 1. Run the setup and Click Next.
 2. In welcome screen click next button.
 3. Now we select Add and remove button for component installation.

 4. Now select the WorkFlow component and click Next.

 5. Here we specify BCP account for workflow installation and configuration. (DomainName/User)
 6. Then select website for workflow web directory.
 7. Now specify the AOS Account for workflow.
 8. Now it is ready for installation.
9. Now installation is complete. but here with warning this Waring will resolve when you configure workflow with ax.

Hope this is helpful.

See you Around :)

Best Practices for Developers.

Best Practices
Below are the best practices that a developer/technical consultant should abide by
  • Variable or constant or parameter declarations should be as local as possible to utilize memory resources in an efficient way.
  • Unused variables, methods, and classes should be removed from the code.
  • The re-usability should be maximized. E.g. rather than repeating lines of code at different places, a single method can be written so that changes in the method can be reflected at all the places where this method is used.
  • A method should perform a single well-defined task and be named according to the task performed.
  • All the text used in Dynamics AX is supposed to be in a label
  • A try or catch deadlock or retry loop should always be created around database transactions that can cause deadlocks.
  • Prefer switch statement rather than multiple if-else statements.
  • Remove commented code before shipping code.
  • Follow indentation rules.
  • Follow case rules for naming classes, methods, tables, etc.
  • Methods should perform a single well defined task and from their name the task performed should be clear.
  • To ensure trustworthiness, appropriate access levels (public, private, or protected) should be assigned.
  • Parameter's names must start with an underscore (_) character besides following other generalized naming conventions.
  • Date conversion should be avoided as it will loose date properties and hence sometimes conversion may result in wrong information.
Label Standards
It is highly recommended that any user-interface text is defined using labels. This will ensure many advantages during translation. A few label file standards to ensure the true benefits of the label file system are as follows:
  • The location of label files should be the most generalized one i.e. extended data type (EDT). In some cases an existing EDT cannot be used only because of the difference in label text. In such cases a new EDT should be created by extending the existing EDT. In such cases other alternatives may also be available (e.g. label change at the field) but the rule of thumb is to use the label at the most general place.
  • The label files should not be duplicated i.e. two label files should not exist for the same text.
AOT Object Standards
The AOT object standards are specific to a particular AOT element. Broadly we can classify AOT elements as follows:
  • Data Dictionary
    • Extended data type
    • Base Enum
    • Tables
    • Feature keys
    • Table collection
  • Classes
  • Forms
  • Reports
  • Jobs
  • Menu items
Data Dictionary
This is a group of AOT objects including the items mentioned in the previous section. The best practices for tables can further be divided into best practices for the fields, field groups, indexes, table relations, delete actions, and methods.
Extended Data Type
The EDT plays a great role as it is the basic entity of GUI elements. The following are a few basic best practices related to extended data types.
  • All date and date format-related properties should be set to Auto.
  • Help text should not be same as the label property. Help text is supposed to be more descriptive and should be able to explain why and/or how.
  • An EDT name must be a real-world name, prefixed with module (if it belongs to one module only).
Base Enum
The following are a few basic best practices related to Base Enum:
  • The Enum name should be an indication of either the few possible values or type of values. For example DiscountType, OpenClose, etc.
  • Display length property should be set to auto so that in every language the full name can be displayed.
  • Help and label properties must have some value. Help and label properties should not have the same value.
Tables
Many of the best practices for tables come under the scope of performance optimization, database design standards, etc. and hence those standards have been discussed elsewhere. Some of the standards not discussed are discussed here.
  • The table name may consist of the following valuable information:
    • Prefix: Module name such as Cust for Account Payable, Sales for Account Receivables
    • Infix: Logical description of the content
    • Post fix: Type of data e.g. Trans (for transactions), Jour (Journals), Line (table containing detailed information about a particular record in header table), Table (primary main tables), Group, Parameters, Setup, or module name to which the table belongs
  • Label is a mandatory property and tables must be labelled using Label ID only. The text value of Label ID must be unique in all languages supported.
  • If a table belongs to one of the four types Parameter, Group, Main, or WorksheetHeader, then it must have an associated form to maintain the table records. This form should have a name identical to its display menu item (used to start this form) and like the table name. formRef is the property of a table for the name of the associated form.
  • Title Field 1 and Title Field 2 should be mentioned:
    • TitleField1: The key field for the records in the table. This should be a descriptive title, if the key is information for the user.
    • TitleField2: The description for the records in the table.
Fields
Most of the properties for the fields are inherited from extended data types; however, it is not mandatory to use some or all inherited values for such properties. Here are a few guidelines:
  • Name: Should be like the corresponding EDT name but if named separately, it should be logical. The fields used as key should be postfixed as ID e.g. CustId, ItemId, etc.
  • HelpText: This is a mandatory property and inherited from the corresponding EDT. Since Help Text needs to be customized as per the different uses ofthe same EDT, Help text can be modified at any field but the following arethe guidelines:
    • The help text property should not be same as the label property.
    • Label is also a mandatory property, which is inherited from EDT. If a value is set here, it should be different from the value on EDT.
    • Every field that is either the primary key or one of the key mandatory properties must be set to Yes.
    • Before considering memo or container type fields, it should be kept in mind that they add time to application and database fetch, they inhibit array fetching, and these types of fields cannot be used in where expressions.
Field Group
The field group is a group of fields shown in the user interface. Dynamics AX has some standard groups (e.g. Identification, Administration, Address, Dimension, Setup, Misc, etc.), while other can be created. The fields that logically belong together can be placed in one field group while the Misc field group can be used to group fields that do not fit in any other field group. The dimension field group must have a single kind of field Dimension. The field groups should have the same kind of grouping at the database and form or reports to improve caching and hence the performance.
Delete Actions
The database integrity is one of the key principles in Relational Database Management System (RDBMS). The delete action should be used on every relation between two tables. The following are key best practices for delete actions.
  • Use a delete action on every relation between two tables.
  • Use table delete actions instead of writing code to specify whether deletes are restricted or cascaded.
Dynamics AX has three types of delete actions; selection of one will solely depend upon the custom requirements.
Table Methods
The tables in Dynamics AX have several properties such as delete, validateDelete, etc. and hence Dynamics AX recommends that you should not write methods or X++ code to implement something that can be done just by setting property values.
Dynamics AX recommends using inbuilt table methods for those custom requirements that cannot be met with table properties settings. Some of the table methods are mandatory to implement e.g. find and exists methods.
Classes
The classes have a peculiarity that they may have both a back end (database) and front end (GUI). The front interface should be easy to use and at the same time as secure as possible. The implementation details of the class should always be hidden from the user and hence use of private or protected methods is recommended. The back-end methods are highly secure, standardized, and reliable and hence use of private or protected methods is recommended in prescribed design patterns. The design patterns depend upon the type of class. Classes can be categorized in the following categories:
  • Real object
  • Action class
  • Supporting class
The following are a few common best practices related to declaration:
  • Object member variables must only be used to hold the state of the object i.e. variables for which values should be kept between and outside instance method calls.
  • Use of global variables must be minimized.
  • Unused variables must be cleaned up; a tool available at Add-Ins | Best Practices | Check Variables can be used to know the unused variables.
  • Constants used in more than one method in a class (or in subclass) should be declared during class declaration.
There is a rich set of best practices for classes and the Best Practices for Microsoft Dynamics AX Development released by Microsoft would be good read.
Forms
The forms are in the presentation tier in any three-tier architecture system. Most of them are related to look and feel or layout. Some other best practices for forms revolve around the following characteristics:
  • Use of Intellimorph maximally
  • No forced date or time format
  • No forced layout such as fixed width for label, position control for GUI controls, etc.
  • Use of label files for GUI text
  • Forms having minimal coding
Avoid Coding on Forms
The basic concept of three-tier architecture is that forms should be used only for the presentation tier and hence no other code such as business logic should be there on forms. The code placed on forms also reduces their reusability and the ease of further customization; e.g. if you want to develop an enterprise portal, the code written on forms will have to be written again in classes or table methods, etc., which will make the implementation complex. Another example may be when you want to 'COM enable' your business logic; form code related to business logic will make your life almost impossible.
Any code (other than presentation logic) written on forms imposes limitation on performance as call between two different layers increase slowing the performance and hence code on forms should be avoided as much as possible. In cases where avoiding code on forms is not possible the guidelines summarized in the following table should be used for writing code on forms.
Place to Write Code
Guidelines
Form level
When code is related to whole form
When code is related to multiple data sources
Editor or Display methods (only those that are not related to any data source)
Data source
Data source-related Edit or Display methods
Code related only to the data source that cannot be effectively placed in a table method
Controls
When it is strictly related to the controls
Use of IntelliMorph Maximally
Due to a user's locale or preferred format a form may be presented in a different language and/or a different date, time, or currency format. Dynamics AX best practices recommend Auto as the value for the display properties related to the following:
  • Date
  • Currency
  • Time
  • Language
  • Number format (such as decimal operator, separator, etc.)
  • Label size
  • Form size
The rule of thumb is to keep the various properties as Auto or default value, which will help IntelliMorph to function maximally. For further details about best practices readers are recommended to go through the Developers Guide for Best Practices.
Reports
The peculiar fact about the reports is that they are output media where the external environment such as paper size, user's configuration about the locale or language, font size, etc. matters.
Dynamics AX recommends using 'Auto Design' to develop the report as these kinds of reports can change the layout according to external environmental variables. Another way to develop a report in Dynamics AX is 'Generated Design'; this type of design is recommended only when strict report layout is required. A few such examples may be regulatory reports, accounts reports, etc.
Summary
In this two part article we discussed various areas where quality could be improved by adopting best practices. We also discussed various best practices, theory behind best practices, and how to adopt these best practices, i.e. with practical tips.


Ax 2009 SSRS Errors and Solutions

Error when deploying AX Report to SQL Reporting Server - Client found response type of 'text/html;charset=utf8;' but expected 'text/html'
When deploying the AX 2009 reports using the "Microsoft Dynamics AX 2009 Report Deployment" application you may hit the following error after a while:

Client found response type of 'text/html;charset=utf8;' but expected 'text/html'

We find that the error commonly occurs due to the length of time it takes to deploy the reports and the following 3 things should help in reducing the deployment time and load:

(1) If you are using Windows Server 2008/R2 then temporarily disable Windows Server 2008 User Account Control (this requires a reboot of the
system), until the reports are deployed.

(2) Temporarily stop/disable Anti-Virus software and services during the deployment only.

(3) Reduce the number of Reports Libraries and Reports per Language. By default, reports from all languages that are enabled in the LANGUAGETABLE of the AX database are deployed (this can be over 40+ languages). Prior to the reports deployment you can change the LANGUAGETABLE so that it only deploys Reports for the languages (cultures) that you want deployed.

To do this set the value 0 in the LabelFile column of the LANGUAGETABLE table for languages (LANGUAGEID column) you dont want to deploy reports for.
IMPORTANT NOTE: Make a backup of the table and/or database before changing the values. Also be aware that if you have any AX clients that has references to those languages that are disabled then they won't be able to log into AX.

Here is a sample SQL update statement to set the value zero in the LabelFile column for all languages except the ones specified in the WHERE clause:

e.g. The following statement will NOT update the values for LANGUAGEID en-us or sv-fi, but set the Value 0 for all other LANGUAGEID values

UPDATE LANGUAGETABLE SET LabelFile=0 where LANGUAGEID <> 'en-us' and LANGUAGEID <> 'sv-fi'
Error access SSRS reports - System.Web.Configuration.RegexWorker threw an exception
Lately we run into following problem: when navigating to any SSRS report via Enterprise portal or even by the SSRS report manager site, the following error is displayed where the report should appear:
An error has occurred during report processing. (rsProcessingAborted). The type initializer for 'System.Web.Configuration.RegexWorker' threw an exception.


The cause of the issue is that permissions for:
·  for SQL 2005 the account running the IIS application pool for Report Manager (should be bc proxy account)
·  for SQL 2008 the account running SSRS (should be bc proxy account)
are incorrect.
Granting admin rights to the accounts involved and then restarting IIS (or stopping starting the SQL 2008 SSRS process) can quickly prove whether you have a permissions issue. If it works with admin rights then you can remove the admin rights and make sure the accounts have permission to use DLLs in the GAC (typically C:\windows\assembly). You can verify exactly which DLL needs permission by checking the full error log at:
·  C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles for SQL 2005 Reporting Services
·  C:\Program File\Microsoft SQL Server\MSRS10\Reporting Services\LogFiles for SQL 2008 Reporting Services
·         Error during processing of 'AX_CompanyName' report parameter. (rsReportParameterProcessingError)
·         We came across an issue recently where the Dynamics AX 2009 reporting extensions and sql reporting services reports deployed successfully. However when trying to browse and view ANY of the published reports on the SQL Reportingserver or via role centers we get the following error displayed: 
·         Error during processing of ‘AX_CompanyName’ report parameter. (rsReportParameterProcessingError)
·         

and furthermore in the Windows Application Event log on the SQL Reporting server we get the following error logged:
·         Event Source: Microsoft.Dynamics.Framework.BusinessConnector
Event Category: None
Event ID: 1000
Description:
Dynamics Adapter LogonAs failed.

Microsoft.
Dynamics.BusinessConnectorNet.NoIISRightsException
at Microsoft.
Dynamics.BusinessConnectorNet.Axapta.Logon(BC_PROXY_ACCOUNT_INFO* pBCProxyAccountInfo, String company, String language, String objectServer, String configuration)
at Microsoft.
Dynamics.BusinessConnectorNet.Axapta.LogonUsingBCProxyAccount(_SEC_WINNT_AUTH_IDENTITY_W* pImpersonatedUserAccount, NetworkCredential bcProxyCredentials, String company, String language, String objectServer, String configuration)
at Microsoft.
Dynamics.BusinessConnectorNet.Axapta.LogonAs(String user, String domain, NetworkCredential bcProxyCredentials, String company, String language, String objectServer, String configuration)
at Microsoft.
Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.LogonAs(String user, String domain, NetworkCredential bcProxyCredentials, String company, String language, String objectServer, String configuration)
·         After further troubleshooting we identified that the user was not licensed for the "Enterprise Portal Framework" module. SQL Reporting extensions and integration uses the .NET Business Connector (BC.NET) and BC.NET requires Enterprise Portal Framework license, even if you are not using Role Centers and Enterpise Portal. When the business connector connects to the AOS server if it does not find the license key, it throws the NoIISRightsException error message as seen in the event log.
·          
·         To check whether you are licensed, run the Dynamics AX Client and go to Administration -> Setup -> System Information -> License Information and click on the Web tab
·          
·         An error has occurred during report processing. (rsProcessingAborted)
·         In Dynamics AX 2009 a very common scenario with Enterprise Portal and Role Center is that only users that are local Administrators on the machine where Microsoft SQL Server 2005 is installed can correctly see Microsoft SQL Server 2005Reporting Services reports (based on Microsoft SQL Server 2005 Analysis Services).
·         All the non-admin users see the following error message instead:
·         An error has occurred during report processing. (rsProcessingAborted) Get Online Help
Query execution failed for data set 'Company'. (rsErrorExecutingCommand) Get Online Help
For more information about this 
error navigate to the report server on the local server machine, or enable remote errors
·         Here, the non-admin users don't have permission to access the target OLAP cube.
·         The permissions to access the OLAP cube need to be set up independently from Dynamics AX using Microsoft SQL Server Management Studio (for example). The TechNet article Configure security settings for cubes describes step by step how the correct permissions can be assigned.
Problems when deploying Report Projects - AL.exe
Recently we run into some problems while we wanted to install AX 2009 on an stand alone server.
The OS is Windows 2003 SP2
The SQL Server is: SQL 2008
We have installed:
·  .Net Frame work: 2.0, 3.5 SP1
·  IIS 6.0
·  SQL Server 2008
·  Visual Studio 2008 Shell (isolated mode)
·  Windows SDK for Windows Server 2003 R2
We have also already patched the following dll:
Microsoft.Dynamics.Setup.ReportingServices.dll (using the SP1 version of this dll).
But we got the following error when trying to deploy the Report Projects to the reporting services.
Unable to load one or more of the requested types.
Retrieve the LoaderExceptions property for more information.
Error: The following components have not been installed or are not configured correctly:
AL.exe
Please consult your administrator or the documentation.
System.InvalidOperationException: The following components have not been installed or are not configured correctly:
AL.exe
Please consult your administrator or the documentation.
The entire message was:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
 
at System.Reflection.Assembly.GetTypes()
 
at ClrBridgeImpl.GetTypes(ClrBridgeImpl* , Char* assemblyName, Boolean* isException)

Error: The following components have not been installed or are not configured correctly:
AL.exe
Please consult your administrator or the documentation.
System.InvalidOperationException: The following components have not been installed or are not configured correctly:
AL.exe
Please consult your administrator or the documentation.
at Microsoft.Dynamics.Framework.Deployment.Reports.InstalledComponents.ThrowComponentsNotInstalled(String[] componentNames)
at Microsoft.Dynamics.Framework.Deployment.Reports.InstalledComponents.VerifyAlAndDslToolsAreInstalled()
at Microsoft.Dynamics.Framework.Deployment.Reports.ExportOperations.BuildProjects(IEnumerable`1 projectPaths, DeploymentLogger logger, List`1& reportLibraries)
at Microsoft.Dynamics.Framework.ReportsDeployment.DeploymentForm.<>c__DisplayClassc.b__7(Object , DoWorkEventArgs )
at Microsoft.Dynamics.Framework.ReportsDeployment.DeploymentForm.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
The deployment log file can be found at "C:\Documents and Settings\myname\Local Settings\Temp\1\tmpE4.txt"
We then found out that still not all required components were installed.
We were still missing Redistributable Package on our instance.
According to installation guide: AXInstallationGuide.pdf (page 63):
after you install:
Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package you should install the shell (step 2):
Part 2: Install the shell
After you install the redistributable package, you must install the shell. Complete the following steps to install the shell.
1.     On the computer's hard drive, locate the VS 2008 Shell Redist\Isolated Mode folder.
2.     Double-click the .exe file located in that folder. For example, if you installed the US English version of the redistributable package, double-click the vs_shell_isolated.enu.exe file.
3.     Follow the directions in the Microsoft Visual Studio 2008 Shell (isolated mode) wizard to complete the installation Please remember that no matter what operating system you are using you should install as well: Windows SDK for Windows Server 2008 and .NET Framework 3.5
The problem can be solved by ensuring you install all the pre-requisites in the order given as per the installation guide.
Unable to install Dynamics AX 2009 Reporting Extensions
In the Dynamics AX 2009 Setup when you are trying to install the Dynamics AX 2009 Reporting Extensions for Microsoft SQL Server Reporting Services you might run into the following error message:
An error occurred during setup of Reporting extensions.
Reason: Invalid URI: The URI is empty.
System.UriFormatException: Invalid URI: The URI is empty.
At the same time in the DynamicsSetup.txt you can find the following Exception:
Reason: Invalid URI: The URI is empty.
System.UriFormatException: Invalid URI: The URI is empty.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Net.WebRequest.Create(String requestUriString)
at Microsoft.Dynamics.Setup.ReportsServerInstaller.VerifyStateOfReportServer(String instanceName)
at Microsoft.Dynamics.Setup.Driver.RunReportingSetupManagerDeploy()
If you run into this error, you Microsoft SQL Server Reporting Services were not correctly configured to work for Dynamics AX 2009! Please follow the Microsoft Dynamics AX 2009 Installation Guide ConfigureReporting Services section (page 64) to configure the Microsoft SQL Server Reporting Services and try to install the Dynamics AX 2009 Reporting Extensions again.
Dynamics AX 2009 Report Deployment error

Good morning

If you get either of the following two errors when deploying SQL Reports from Dynamics AX 2009 over to SQL Reporting services, you may have a bad <URLRoot> parameter in file <drive:>\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\rsreportserver.config. (might be in ...\MSSQL.2\... sometimes)
The <URLRoot> parameter needs to have the value corresponding to the web site containing the Reports and ReportServer virtual folders. Error #1 is caused when your Sharepoint EP is installed on the same server at port 80, and when you have the default url value in rsreportserver.config. Error #2 is clearer.

Error #1
____________________________
Error: Deployment failed unexpectedly with the message:
Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<HTML dir="ltr">
<HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" /><meta HTTP-EQUIV="Expires" content="0" /><meta name="ROBOTS" content="NOHTMLINDEX" /><title>

[snip…]

                   <span id="ctl00_PlaceHolderMain_LabelMessage">File Not Found.</span>
                   <P><span class="ms-descriptiontext">
                                <span id="ctl00_PlaceHolderMain_helptopic_troubleshooting"><A Title="Troubleshoot issues with Windows SharePoint Services. - Opens in new window" HREF="javascript:HelpWindowKey('troubleshooting')">Troubleshoot issues with Windows SharePoint Services.</A></span>
                               
[snip…]

See the log file for further details.
Deployment failed with the following exception:
System.InvalidOperationException: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<HTML dir="ltr">
<HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" /><meta HTTP-EQUIV="Expires" content="0" /><meta name="ROBOTS" content="NOHTMLINDEX" /><title>
               
[snip…]
  
Error #2
____________________________
Deploying 0 data source(s) and 1 design(s) in 40 culture(s) (40 item(s) total)...
Unable to connect to 
http://xxxx:xxxx/reportserver/ReportService2005.asmx as specified in the config file for the report server at c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\RSReportServer.config. If this url is not correct please update the config file, otherwise make sure the report server is configured correctly.
The deployment log file can be found at "C:\Documents and Settings\Administrator\Local Settings\Temp\tmp4.txt"
I installed SQL Server 2008 Reporting Services with Microsoft Dynamics AX 2009 Reporting Extensions on a 64-Bit Windows Server 2008 system. While Deploying the reports I encountered the following errormessage:
=====================================================================================
Error: Deployment failed unexpectedly with the message: Not found See the log file for further details. Deployment failed with the following exception: System.Management.ManagementException: Not found   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)   at System.Management.ManagementObject.Initialize(Boolean getObject)   at System.Management.ManagementBaseObject.get_Properties()   at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)   at Microsoft.Dynamics.Framework.Deployment.Reports.SrsWmi.get_InstanceName()   at Microsoft.Dynamics.Framework.Deployment.Reports.WmiUtilities.<>c__DisplayClass1.<GetInstalledWmiInstance>b__0(SrsWmi s)   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)   at Microsoft.Dynamics.Framework.Deployment.Reports.WmiUtilities.GetInstalledWmiInstance()   at Microsoft.Dynamics.Framework.Deployment.Reports.WmiUtilities.GetReportServerConfigPath()   at Microsoft.Dynamics.Framework.Deployment.Reports.ReportLibraryDeployer.DeployBusinessLogicAssemblies(IEnumerable`1 businessLogicAssemblies, DeploymentLogger logger)   at Microsoft.Dynamics.Framework.Deployment.Reports.ReportLibraryDeployer.Deploy(IEnumerable`1 reportLibrariesToDeploy, IEnumerable`1 transitiveReferenceClosure, IEnumerable`1 cultures, DeploymentLogger logger, Func`2 connectionStringModifier)
=====================================================================================
To resolve this error it is important to perform the following steps:
Step 1 Patch your AX Installer:
To patch the Setup application, complete the following steps.
1. Copy the contents of the CD folder from the Microsoft Dynamics AX 2009 DVD to a shared network folder. (Because all subsequent Microsoft Dynamics AX installations must be performed from this folder, you must make the location accessible to all users who will install.)
2. Go to the location where you extracted the Service Pack 1 files. From the \Support\AXSetupResources directory, copy the Microsoft.Dynamics.Setup. ReportingServices.dll file.
3. Paste the file into the following locations, replacing the existing files: [SharedFolder]\CD\Msi\Components32\Program Files\Microsoft Dynamics AX\50\Setup [SharedFolder]\CD\Msi\Components64\Program Files\Microsoft Dynamics AX\50\Setup
4. Install Microsoft Dynamics AX reporting extensions from the shared folder.
Step 2 Install Reporting Extensions
Install Reporting extensions from the Patched AX installer.
Step 3 KB 957312:
Follow the steps in the following article:
Known Issues and Solutions

This section lists the most common issues encountered when building the integration between Microsoft Dynamics® AXSSRS and OLAP and the solution recommended by the Microsoft Dynamics® AX Support team.

Issue:

Error trying to deploy reports
Microsoft Dynamics AX Reporting Project Deployment: The following components have not been installed or are not configured correctly: AL.exe

Solution:

Download and install the 
Windows SDK for Windows Server 2008 and .NET Framework 3.5  Ensure it is fully installed.
NOTE:  Install regardless of operating system

Issue:

Error trying to deploy reports
System.InvalidOperationException: The following components have not been installed or are not configured correctly: Microsoft Domain-Specific Language Tools

Solution:

Download and install these required components.  
Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package
1.     Save the download locally
2.     Extract the package
3.     Run the vs_appenvredist.msi
NOTE:  Install regardless of operating system

Issue:

Error trying to deploy reports
Microsoft Dynamics AX Reporting Project Deployment: ClrBridgeLoader: fatal error :
Microsoft.
Dynamics.ClrBridge.dll cannot be loaded. Fatal error: ClrBridge is note loaded.

Solution:

Ensure you are trying to deploy reports from the SSRS server and that you can validate the SSRS server name in the Reporting Servers from within Microsoft Dynamics AX 2009.  If this error appears right after installing the reporting extensions, launch the report deployment tool again.

Issue:

Enterprise Portal (EP) or SSRS Reports don’t run or stop working
An attempt has been made to use a data extension 'AXDATAMETHOD' that is not registered for this report server. (rsDataExtensionNotFound)
or
data extension 'AXQUERY' and 'AXADOMD' 

Solution:

Installing or Reinstalling Reporting Extensions will resolve this issue.  As a precaution make a Backup of:
Program Files\Microsoft SQL Server\MSSQL.\Reporting Services\ReportServer folder

NOTE:  SSRS updates or Service Packs may remove entries from rsreportserver.config file.

Issue:

Enterprise Portal (EP) Reports don’t run or stop working
A ProgressTemplate must be specified on UpdateProgress control with ID 'AxProgressControl' 

Solution:

You can resolve the issue by using one of the three methods below:
1.     Apply the hotfix from KB957312 to the RTM version
2.     Upgrade to Dynamics AX 2009 SP1
3.     Un-install Microsoft .NET 3.5 SP1 and reinstall Microsoft .NET 3.5 without SP1
Issue:

Report deployment tool Crashes
Attempted to read or write protected memory.  This is often an indication that the memory is corrupt

Solution:

If multiple versions of Dynamics AX are installed on the same server you will need to change your AX 2009 Path in your environment variables ahead of your AX 4.0 path to avoid running the wrong version of DLL’s

Issue:

Error running reports
Error
 during processing of 'AX_CompanyName' report parameter. (rsReportParameterProcessingError).

Solution:

Process OLAP the cubes to supply data to the reports
or
An incorrect Execution account has been specified in the Reporting Services Configuration Manager

Note:  For SSRS 2008 the BC proxy is required to be the Execution account and for SSRS 2005 an Execution account should not be used.  Also look at application event log for details on other issues.

Important:  Running SSRS in SharePoint integrated mode is not support with Microsoft Dynamics AX

Issue:

Enterprise Portal (EP) web site runs but not the reports in the EP web parts:
Dynamics
 Adapter LogonAs failed 
or
Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException 

Solution:

Leave the Execution account blank on SSRS 2005 or set to BC Proxy account on SSRS 2008 (Microsoft Dynamics AX 2009 SP1 only)

NOTE:  SSRS Execution account is set to an account other than BC Proxy Account

Issue:

EP or SSRS Reports don’t run or stop working
Dynamics
 Adapter LogonAsGuest failed
or
FatalSessionException...

Solution:

The issue is caused by the Reporting Services web site set to anonymous Authentication.  Changing the SSRS website to Integrated and/or un-marking Anonymous Authentication will resolve this issue.

Issue:

Double Hop \ Kerberos Authentication
An Error has occurred while establishing as connection to the Analysis Server
or
Reports don’t display in the EP website from a Client Browser not local to the IIS server
Cannot read information from SQL Server Reporting Services. Validate that the Report Manager URL is correct

Solution:

Setup Service Principle names (SPN) and Delegation to allow the passing of Kerberos certificate

Issue:

Office Data Connection (ODC) file deployment fails with SQL Server 2008 
Microsoft Dynamics AX is searching for the SQL Server 2005 Microsoft.AnalysisServices.dll (v9.0.242.0)

Solution:

Apply one of the following hotfixes:
·  For Microsoft Dynamics AX 2009 RTM:  Apply the fix from KB957312
·  For Microsoft Dynamics AX 2009 SP1:  Apply the fix from KB960158
If the hotfix does not resolve the issue, make sure you are running a Dynamics AX 2009 client on the EP web server when deploying the ODC files.  As a workaround you can manually deploy the ODC files by following these steps:
1.     Click here to download a new ODC file (Dynamics_AX.odc).
2.     Save the ODC on the SSAS server
3.     Open the ODC file with Notepad or any other text editor
4.     Edit the odc file with the following changes: Data Source=OLAPServerName 
Initial Catalog=OLAPDbName
Add SSPI=Kerberos after Initial Catalog if using Kerbersos (in red only required for Kerberos authentication)


….

Provider=MSOLAP.3;Integrated Security=SSPI;Persist Security Info=True;
DataSource=;Initial Catalog=Dynamics AX;SSPI=Kerberos

5.     Save the changed ODC file.
6.     Go to EP main site.
7.     Click on Site Actions > Site Settings.
8.     Under Galleries, click on Master pages.
9.     Click on View all site content (top left).
10.  Click on Data Connections folder.
11.  Import the edited ODC file.
Issue:

DataSet panel is missing in Report Designer when creating reports in Visual Studio Server 2008 

Solution:

For Visual Studio 2008, apply the fix in 
KB947173
OR
apply 
Microsoft Visual Studio 2008 Service Pack 1.

Issue:

"Connection forcibly closed by remote host" in Dynamics setup log when trying to create an EP site in AX 2009 

Solution:

Download and install the Microsoft Analysis Management Objects:
·  for SQL Server 2005:  Microsoft SQL Server 2005 Management Objects Collection package
·  for SQL Server 2008:  Microsoft Analysis Management Objects package
Issue:

"Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'"

Solution:

Ensure SSRS service is running and are able to connect to instance via SQL Server Management Studio.
Note:  Additional information can be found in SSRS error log.

Issue:

Exception from HRESULT: 0X80041FFF

Solution:

Change Visual Studio project location to local drive if using a network share

Issue:

The Analysis extension is not seeing the SQL cluster name for Analysis Services when Analysis services is setup on a SQL cluster.

You will get an error similar to this when trying to install Analysis Extension in this environment:

Connecting to SQL Server 2005 Analysis Services on server 'SQL02' and instance 'MSOLAP$ANALYSIS'.
A connection cannot be made. Ensure that the server is running.
No connection could be made because the target machine actively refused it 
127.0.0.1:2383
An 
error occurred while Setup was connecting to SQL Server Analysis Services instance 'MSOLAP$ANALYSIS' on server 'SQL02'.

An 
error occurred while Setup was connecting to SQL Server Analysis Services instance 'MSOLAP$ANALYSIS' on server 'SQL02'. 

Solution:

The workaround is to manually run the script to create the Dynamics AX OLAP db from the AX 2009 CD.

Navigate to this folder \support\Analysis Services\Scripts on your AX 2009 installation CD.
Then run the dynamicsax.xmla script from within SQL Management Studio (connected to the SSAS instance).

This script will create the Dynamics AX OLAP database.

Issue:

BC Proxy account fails to start for the SSRS reports in Enterprise Portal with RPC exception 5

When Enterprise Portal starts for the first time and displays SSRS reports, normally two Business Connectors are started. After a period of time or if the impersonated web user logs out for the SSRS Proxy account you may experience an RPC error 5 access denied and the SSRS reports will no longer display in Enterprise Portal.

Example
Error:

Event Type: Error
Event Source: Dynamics .NET Business Connector 5.0
Event Category: None
Event ID: 180
Date: 10/7/2008
Time: 6:21:04 PM
User: N/A
Computer: AX2009
Description:
Microsoft Dynamics AX Business Connector Session 18.

RPC error: RPC exception 5 in Ping occurred in session 36

Solution:

RPC error 5 can occur if the SSRS Execution account is set in the Reporting Services Configuration Manager. If the account used is the Business Connector proxy account the first startup of the Business Connector will work, but not any subsequent startups unless the IIS application pool if recycled or an IIS reset is done.

SSRS 2005
Remove the SSRS execution account through Reporting Services Configuration Manager

SSRS 2008
Change the SSRS service to start as the Business Connector Proxy account and remove the SSRS execution account through Reporting Services Configuration Manager.
Note:  Changing the SSRS account would require a change in the registered SPN’s if you are using Kerberos authentication



This section lists the most common issues encountered when building the integration between Microsoft Dynamics® AXSSRS and OLAP and the solution recommended by the Microsoft Dynamics® AX Support team.

Issue:


Error trying to deploy reports
Microsoft 
Dynamics AX Reporting Project Deployment: The following components have not been installed or are not configured correctly: AL.exe

Solution:


Download and install the Windows SDK for Windows Server 2008 and .NET Framework 3.5 Ensure it is fully installed.
NOTE: Install regardless of operating system

Issue:


Error trying to deploy reports
System.InvalidOperationException: The following components have not been installed or are not configured correctly: Microsoft Domain-Specific Language Tools

Solution:


Download and install these required components. Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package

1. Save the download locally
2. Extract the package
3. Run the vs_appenvredist.msi

NOTE: Install regardless of operating system

Issue:


Error trying to deploy reports
Microsoft 
Dynamics AX Reporting Project Deployment: ClrBridgeLoader: fatal error :
Microsoft.
Dynamics.ClrBridge.dll cannot be loaded. Fatal error: ClrBridge is note loaded.

Solution:


Ensure you are trying to deploy reports from the 
SSRS server and that you can validate the SSRS server name in the Reporting Servers from within Microsoft Dynamics AX 2009. If this error appears right after installing the reporting extensions, launch the report deployment tool again.

Issue:


Enterprise Portal (EP) or 
SSRS Reports don’t run or stop working
An attempt has been made to use a data extension 'AXDATAMETHOD' that is not registered for this report server. (rsDataExtensionNotFound)
or
data extension 'AXQUERY' and 'AXADOMD'

Solution:


Installing or Reinstalling 
Reporting Extensions will resolve this issue. As a precaution make a Backup of:
Program Files\Microsoft SQL Server\MSSQL.\
Reporting Services\ReportServer folder

NOTE: 
SSRS updates or Service Packs may remove entries from rsreportserver.config file.

Issue:


Enterprise Portal (EP) Reports don’t run or stop working
A ProgressTemplate must be specified on UpdateProgress control with ID 'AxProgressControl'

Solution:


You can resolve the issue by using one of the three methods below:

1. Apply the hotfix from KB957312 to the RTM version
2. Upgrade to 
Dynamics AX 2009 SP1
3. Un-install Microsoft .NET 3.5 SP1 and reinstall Microsoft .NET 3.5 without SP1

Issue:


Report deployment tool Crashes
Attempted to read or write protected memory. This is often an indication that the memory is corrupt

Solution:


If multiple versions of 
Dynamics AX are installed on the same server you will need to change your AX 2009 Path in your environment variables ahead of your AX 4.0 path to avoid running the wrong version of DLL’s

Issue:


Error running reports
Error during processing of 'AX_CompanyName' report parameter. (rsReportParameterProcessingError).

Solution:


Process OLAP the cubes to supply data to the reports
or
An incorrect Execution account has been specified in the 
Reporting Services Configuration Manager

Note: For 
SSRS 2008 the BC proxy is required to be the Execution account and for SSRS 2005 an Execution account should not be used. Also look at application event log for details on other issues.

Important: Running 
SSRS in SharePoint integrated mode is not support with Microsoft Dynamics AX

Issue:


Enterprise Portal (EP) web site runs but not the reports in the EP web parts:
Dynamics Adapter LogonAs failed
or
Microsoft.
Dynamics.BusinessConnectorNet.LogonFailedException

Solution:


Leave the Execution account blank on 
SSRS 2005 or set to BC Proxy account on SSRS 2008 (Microsoft Dynamics AX 2009 SP1 only)

NOTE: 
SSRS Execution account is set to an account other than BC Proxy Account

Issue:


EP or 
SSRS Reports don’t run or stop working
Dynamics Adapter LogonAsGuest failed
or
FatalSessionException...

Solution:


The issue is caused by the 
Reporting Services web site set to anonymous Authentication. Changing the SSRS website to Integrated and/or un-marking Anonymous Authentication will resolve this issue.

Issue:


Double Hop \ Kerberos Authentication
An 
Error has occurred while establishing as connection to the Analysis Server
or
Reports don’t display in the EP website from a Client Browser not local to the IIS server
Cannot read information from SQL Server 
Reporting Services. Validate that the Report Manager URL is correct

Solution:


Setup Service Principle names (SPN) and Delegation to allow the passing of Kerberos certificate

References:
White Paper: Configuring Kerberos Authentication with Role Centers
KB917409: How to configure SQL Server 2005 Analysis 
Services to use Kerberos authentication
MSDN blog: Enterprise Portal Kerberos Delegation for connecting to 
Reporting/Analysis Services on a different box
TechNet blog: Understanding Kerberos Double Hop
TechNet webcast: How to understand, implement, and troubleshoot Kerberos double-hop authentication

Issue:


Office Data Connection (ODC) file deployment fails with SQL Server 2008
Microsoft 
Dynamics AX is searching for the SQL Server 2005 Microsoft.AnalysisServices.dll (v9.0.242.0)

Solution:


Apply one of the following hotfixes:

* For Microsoft 
Dynamics AX 2009 RTM: Apply the fix from KB957312
* For Microsoft 
Dynamics AX 2009 SP1: Apply the fix from KB960158

If the hotfix does not resolve the issue, make sure you are running a 
Dynamics AX 2009 client on the EP web server when deploying the ODC files. As a workaround you can manually deploy the ODC files by following these steps:

1. Click here to download a new ODC file (Dynamics_AX.odc).
2. Save the ODC on the SSAS server
3. Open the ODC file with Notepad or any other text editor
4. Edit the odc file with the following changes:
Data Source=OLAPServerName
Initial Catalog=OLAPDbName
Add SSPI=Kerberos after Initial Catalog if using Kerbersos (in red only required for Kerberos authentication)


….

Provider=MSOLAP.3;Integrated Security=SSPI;Persist Security Info=True;
DataSource=;Initial Catalog=
Dynamics AX;SSPI=Kerberos


5. Save the changed ODC file.
6. Go to EP main site.
7. Click on Site Actions > Site Settings.
8. Under Galleries, click on Master pages.
9. Click on View all site content (top left).
10. Click on Data Connections folder.
11. Import the edited ODC file.

Issue:


DataSet panel is missing in Report Designer when creating reports in Visual Studio Server 2008

Solution:


For Visual Studio 2008, apply the fix in KB947173
OR
apply Microsoft Visual Studio 2008 Service Pack 1.

Issue:


"Connection forcibly closed by remote host" in 
Dynamics setup log when trying to create an EP site in AX 2009

Solution:


Download and install the Microsoft Analysis Management Objects:

* for SQL Server 2005: Microsoft SQL Server 2005 Management Objects Collection package
* for SQL Server 2008: Microsoft Analysis Management Objects package

Issue:


"Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'"

Solution:


Ensure 
SSRS service is running and are able to connect to instance via SQL Server Management Studio.
Note: Additional information can be found in 
SSRS error log.

Issue:


Exception from HRESULT: 0X80041FFF

Solution:


Change Visual Studio project location to local drive if using a network share

Issue:


The Analysis extension is not seeing the SQL cluster name for Analysis 
Services when Analysis services is setup on a SQL cluster.

You will get an 
error similar to this when trying to install Analysis Extension in this environment:

Connecting to SQL Server 2005 Analysis 
Services on server 'SQL02' and instance 'MSOLAP$ANALYSIS'.
A connection cannot be made. Ensure that the server is running.
No connection could be made because the target machine actively refused it 
127.0.0.1:2383
An 
error occurred while Setup was connecting to SQL Server Analysis Services instance 'MSOLAP$ANALYSIS' on server 'SQL02'.

An 
error occurred while Setup was connecting to SQL Server Analysis Services instance 'MSOLAP$ANALYSIS' on server 'SQL02'.

Solution:


The workaround is to manually run the script to create the 
Dynamics AX OLAP db from the AX 2009 CD.

Navigate to this folder \support\Analysis 
Services\Scripts on your AX 2009 installation CD.
Then run the dynamicsax.xmla script from within SQL Management Studio (connected to the SSAS instance).

This script will create the 
Dynamics AX OLAP database.

Issue:


BC Proxy account fails to start for the 
SSRS reports in Enterprise Portal with RPC exception 5

When Enterprise Portal starts for the first time and displays 
SSRS reports, normally two Business Connectors are started. After a period of time or if the impersonated web user logs out for the SSRS Proxy account you may experience an RPC error 5 access denied and the SSRS reports will no longer display in Enterprise Portal.

Example
Error:


Event Type: 
Error
Event Source: 
Dynamics .NET Business Connector 5.0
Event Category: None
Event ID: 180
Date: 10/7/2008
Time: 6:21:04 PM
User: N/A
Computer: 
AX2009
Description:
Microsoft 
Dynamics AX Business Connector Session 18.

RPC 
error: RPC exception 5 in Ping occurred in session 36

Solution:


RPC 
error 5 can occur if the SSRS Execution account is set in the Reporting Services Configuration Manager. If the account used is the Business Connector proxy account the first startup of the Business Connector will work, but not any subsequent startups unless the IIS application pool if recycled or an IIS reset is done.

SSRS 2005
Remove the 
SSRS execution account through Reporting Services Configuration Manager

SSRS 2008
Change the 
SSRS service to start as the Business Connector Proxy account and remove the SSRS execution account through Reporting Services Configuration Manager.
Note: Changing the 
SSRS account would require a change in the registered SPN’s if you are using Kerberos authentication

Tips and Tricks

* Windows SDK for Windows Server 2008 and .NET Framework 3.5 – only Developer Tools / Windows Development Tools / .NET Development Tools needs to be installed.