Wednesday, December 28, 2011

Update Records of Table With While Loop

If we have to update the records of the table one by one we should have to follow the syntax as below:

1. Get the records from the tables
2. Start While loop with the table
3.Write code to update the record (Or anything you have to with record)
4.At the End of While Loop Next TableName.
----------------------------------------------------------------------------
Syntax:

tablename = get records form table

while(tablename)
{
    tablename.fieldname=value;
   
    tablename.Update();

    Next Tablename;
}
------------------------------------------------------------------------------
Example:

salesTable  = SalesTable::custOpenOrders(this.AccountNum,true);
while (salesTable)
{
        if (salesTable.CurrencyCode == origCurrencyCode)
        {
            salesTable.convertCurrencyCode(this.Currency);
            salesTable.update();
        }
        next salesTable;
}

Friday, December 16, 2011

Remove red hand In vendors transactions

Following are the steps for removing "RED HAND FROM VENDOR TRANSACTION"

1. In vendor detail form select that particular vendor and note information like voucher,date,amount
2. Open VendTransOpen table
3. Select that vendor and note RecId
4. Open SpecTrans table
5. Select RefRecid of that RecId
6. Delete that record from table

Thursday, December 15, 2011

Dynamics AX 2009 - Calling X++ logic from SSRS and C#

Recently I wrote the following blog entry:
Calling a Custom Dynamics AX 2009 SSRS report and passing parameters - From X++

This was to address a set of questions from a reader, where he stated it was not clear about how to call a report from X++ and send in parameter data. The above post, shows you exactly how to do that.

This is the blog entry, in which those comments where left.:
Dynamics AX 2009 - Reporting Possibilites

The next thing in the readers comments, was making use of display methods, or methods in general from X++. This also can be done, an there is great examples of this through some of the out of the box Report's, and also the new Environmental Dashboard that came out during the spring.

I am going to pull from the environmental dashboard, and show an example of this being used.

So if we open our reports project, we will see something similar as follows, and notice the report, has a section for data methods.



Looking at these data methods that are part of the EnergyCost report, we see we have this one, with some parameters / variables that need to be sent in.

On double clicking of the method, takes us to the Business Logic section, and we see our C# code here, along with the .Net Business Connector Assembly, and AxaptaWrapper Object being used.



As you can see we have access to make calls to static methods, and normal non-static business logic. So this could easily be changed and made use of as a template for working with X++ methods, that we need access to for our report purposes.

Now moving back to the report design, I have highlighted the field in the report design, which happens to be a Matrix Cell, that makes use of this datamethod. The expression where this data method is called, is the following.:



=Cdbl(GetEnergyCost(Fields!SourceProcessId.Value, Fields!DestinationProcessId.Value, Fields!SubstanceId.Value, Parameters!EnergyCost_Filter.Value))


So we can see our datamethod being called, to fill this field, and see how the parameters are being sent in. Even one being referenced from the parameters that are sent in to this report.

This is a really good example, that can be expanded upon, and used as a template for such custom needs of datamethods, and access X++ business logic and display methods for a Dynamics AX 2009 SSRS Report.

I hope this helps, and look for more soon. See you next time!

Calling a Custom Dynamics AX 2009 SSRS report and passing parameters - From X++

The most recent post, was the following.: Dynamics AX 2009 - Reporting Possibilites

In that post there was a comment left by someone talking about some of the limits that still exist with the custom SSRS reports.

As I point out there are pro's and con's with the custom SSRS reports for Dynamics AX 2009, however one of the things the reader pointed out was passing parameters to the custom SSRS report.

So I thought it would be worth while to do a post on exactly how to do this.

In this example I have created a custom SSRS report for Dynamics AX 2009 instance.



In this you will see I have a Query, that was used for my report, and also a report library I created using Visual Studio 2008 Dynamics AX 2009 Reporting template.

The query, has a Range of SalesId, and in doing that, this was auto added to the report parameters, in the VS2008 projects. (see below image)



This is the name of the parameter in the report def., and therefore important to note for our exercise.

So the task was to take and pass values to reports from X++. I took and create a job that does exactly that. It takes and call my custom reports, output menu item, and pass it a value for the SalesId parameter. The code follows.:


MenuFunction CustRptMI;
Args Args;
;

CustRptMI = new MenuFunction(menuItemOutputStr(srsCustomRpt),MenuItemType::Output)
Args = new Args();
Args.parm("qryCustomSSRS_SalesId=*SO-100004*");
CustRptMI.run(Args);
CustRptMI.wait();


Notice the name of the parameter is exactly the name it is in the VS2008 project for the report def. 'qryCustomSSRS_SalesId'. Then simply and = and then . You can add multiple parameters here with commas, and there you have the report being called, ran, and from X++, parameters being passed and the report generated. (See image below)



So as you can see, you can make use of X++ to call custom SSRS reports, pass in paramaters, and do this pretty simply. You just have to know the exactly parameters names, and you can go from there.

Wednesday, December 14, 2011

insert_recordset with join query in Ax 2009

The ListOfFields in the destination table must match the list of fields in the source tables. Data is transferred in the order that it appears in the list of fields. Fields in the destination table that are not present in the list of fields are assigned zero-values as in other areas in X++. System fields, including RecId, are assigned transparently by the kernel in the destination table.

insert_recordset  DestinationTable  (  ListOfFields  )
select  ListOfFields1  from  SourceTable  [ where  WhereClause  ]
[ join  ListOfFields2  from  JoinedSourceTable 
[ where  JoinedWhereClause  ]]

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

The following X++ code example shows a join of three tables on an insert_recordset statement that has a sub-select. Also, a while select statement with a similar join is shown.

A variable is used to supply the inserted value for one column. The str variable must be declared with a length that is less than or equal to the maximum length of the corresponding database field.

X++ Sample code

static void InsertJoin42Job(Args _args)
{
    GmTabDepartment tabDept2;
    GmTabEmployee tabEmpl3;
    GmTabProject tabProj4;
    GmTabEmployeeProject tabEmplProj5;
    str 64 sDescriptionVariable = "From variable.";
    ;
    DELETE_FROM tabEmplProj5;

    INSERT_RECORDSET tabEmplProj5 (Description, EmployeeRecId, ProjectRecId)    Select  sDescriptionVariable, RecId   from    tabEmpl3
      join   tabDept2    where tabEmpl3 .DepartmentGuid == tabDept2 .DepartmentGuid
        join RecId   from tabProj4 where tabDept2 .DepartmentGuid == tabProj4 .DepartmentGuid
    ;
    info(int642str(tabEmplProj5 .rowCount())
        + " ==Number of rows inserted.");
    WHILE SELECT *
        from
            tabEmplProj5
            join tabEmpl3
                where tabEmplProj5 .EmployeeRecId == tabEmpl3 .RecId
            join tabProj4
                where tabEmplProj5 .ProjectRecId == tabProj4 .RecId
    {
        info(
            tabEmpl3 .EmployeeName
            + "  --works on--  "
            + tabProj4 .ProjectName
            + " (" + tabEmplProj5 .Description + ")."
            );
    }
/*****************  Actual Infolog output
Message (01:05:41 pm)
4 ==Number of rows inserted.
Alice  --works on--  Project ZZZ (From variable.).
Alice  --works on--  Project YY (From variable.).
Beth  --works on--  Project ZZZ (From variable.).
Beth  --works on--  Project YY (From variable.).
*****************/
}

Creating SSRS Reports with Visual Studio 2008 for DAX 2009

To develope SSRS Reports in Visual Studio 2008 following requisite should be install on your machine.

1. Reporting Extensions ( From Ax Setup)
2. Visual Studio 2008
3. Reporting Tools ( From Ax Setup)
~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~

Creating SSRS Reports for Microsoft Dyanamics Ax 2009 with Visual Studio 2008.

1. Open VS 2008
2. New --> Project --> Visual C# -->Dynamics-->Dynamics Ax Reporting Project
3. Develop Reports
4. Right click and Save to AOD
5.Or deploy
6. fom ax application goto Reports Libraries-->Select report project and deploy.

To show report on the content pane in the reports column

1. create new output menu for displaying reports
2. In properties select ObjectType as  SQLReportLibraryReport
3. select developed report
4. Place the output menu on your reports pane to be display.

Thursday, December 8, 2011

AX 2009 - Installing Reporting Extensions on Windows server 2008 steps

hi friends,

The below are the steps which i followed while installing reporting extensions on Windows server 2008.

1. Install SQL Server 2008 with Reporting Services.
2. Install Ax - 2009 Application files,AOS, Client,
3. Install All the prerequisite for Reporting Extensions
    To install these software components, see Install prerequisites on the report server.
4. Install Reporting Extensions and .Net business connector.
3. Configure Report server with the Microsoft SQL SERVER 2008 >> Configuration and Tools >> Reporting Services configuration Manager
4. Deploy Reports using the path Microsoft Dynamics Ax 2009 >> Microsoft Dynamics Ax 2009 Reports Deployment.

Tuesday, December 6, 2011

box::yesno syntax in Dynamics ax 2009

A simple way to let the user deside what is going to happen.
1
2
3
4
5
6
7
if(box::yesNo("Do you want something to happen?", 
      dialogbutton::Yes) == dialogbutton::Yes)
   {         
 
          somethingHappens = this.callTosSomeReturnMethod();
 
   }

Tuesday, November 15, 2011

Enterprise Portal Deployment



                             Enterprise Portal Deployment
Microsoft Dynamics AX 2009

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

Blogs to help about EP Portal Deployment.


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

EP deployment Steps

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();
}

Dimension Lookup on Report dialog

I received a requirement to show the Department dimension on the report dialog, there are couple of ways to achieve this functionality,
but in my opinion, the easiest way to create a new EDT called DepartmentDimension and make a relations to DepartmentDimension == Dimension.num. And 0 == Dinemsions.DimensionCode; where 0 is the dimension you want to use. Finally add following code in the dialog() method of the class:

dialog.addFieldValue(typeid(DepartmentDimension ) ,departmentDimensionVariable ,"Label - if required","help text - if required");

Monday, November 7, 2011

Form templates in Dynamics AX 2012

A primary focus in Dynamics AX 2012 was to increase a developer's productivity by automating common tasks. As part of this initiative, a new feature was introduced in Dynamics AX 2012 in the AOT. This is the creation of new forms using form templates.

If you right click on the form node, you can see an extra option there - New Form from template
As seen in the image above, you have an option to create seven different form based on the pre-defined templates, these are
  • ListPage
  • DetailsFormMaster
  • DetailsFormTransaction
  • SimpleListDetails
  • SimpleList
  • TableOfContents
  • Dialog
  • DropDialog
Let us look at these in more details.

ListPage - A list page is a form that displays a list of data related to a particular entity or business object. A list page provides provisions for displaying data and taking actions on this data. Every module has at least a couple of list pages. List pages are further classified as primary and secondary list pages. A secondary list page will only display a subset of data from the primary list page. Example, CustTableListPage, VendTableListPage, ProjProjectsListPage. Best practice is to have ListPage as a suffix in the name of the form for all list pages.

DetailsFormMaster - This template is used for forms which displays data for stand-alone entities or business objects. Example, Customers, Vendors, Projects etc. If you look at the forms for these, i.e., CustTable, VendTable, ProjTable, their style property will be set to DetailsFormMaster.

DetailsFormTransaction - This template is used for forms which displays data for entities which have child records associated with it. In other words, if the data being displayed is header-lines type in nature, use this template. Example, Sales orders, Purchase orders etc. If you look at the style property of SalesTable, VendTable, their properties will be set to DetailsFormTransaction.

SimpleListDetails - This template is used to display primary fields in a list and detailed data in a tab page. This style is useful to view all records in a form and selecting a particular record will bring up their details. Example, MainAccount

SimpleList - This template is a very basic form which displays data in a grid. No extra or fancy detail is displayed. This style is best suited for forms where data being shown is not very detailed in nature or has limited fields. Example, AifAction.

TableOfContents - This template is the new style which should be adopted for all parameter forms in Dynamics AX 2012. Take a look at any parameters form and its style property will be set to TableOfContents. This style sets all the tabs as a hot link in the left hand side navigation pane. Clicking on the link will bring up the controls on that tab page. This style is a very neat and appealing UI design which is surely welcome.

Dialog - This template is used on forms which shows static data or are intended to capture some user input for further actions. These forms are mostly modal in nature and should be dismissed before any further actions can be taken.

DropDialog - This template is used for forms that are used to gather quick user inputs to perform an action. Drop dialog forms are generally attached to an action pane button. They appear to be dropping from the menu button when clicked.

Whenever going for a new form development, always ensure that you use the template to create a new form. The template almost does 40% of your design work for you. All you have to do is add the data sources and fields and add business logic.

Microsoft has taken a lot of customer feedback and invested a lot in the UI design. There are reasons why the buttons and navigations are laid out like they are. If you are deviating from the recommended best practices, not only are you introducing best practice deviations, you may be complicating the design and navigation for your users.

In case, you already have designed forms without using the pre defined templates, you can run the form style best practices checker from add-ins. This will list out all deviations your form has and you can fix them by clicking a button.

Also, you may see some best practice warnings when designing forms using the templates. These can be safely ignored. Examples of such best practice warnings are
  • An Action Pane should not be present on a form that is not a list page or other content page.
  • Expected: @SYS316708 (Attachments) | Actual: @SYS114630 (Attachments)
Even though, these are listed as best practice warnings, there are numerous samples in standard AX forms where these deviations have been made.

For more details on the new Dynamics AX 2012 forms and their design guidelines, check the Form User Experience Guidelines page on MSDN.

I hope this post was useful and you will start using the new templates in your development.

Create first SSRS report in Dynamics AX 2012

Today, let us learn how to quickly create report models and report in Visual studio and add to AOT[Dynamics AX 2012] and see a running report.
Some information:
SQL Server Reporting Services is the primary reporting platform for Microsoft Dynamics AX. Reporting Services is a server-based reporting platform that includes a complete set of tools to create, manage, and deliver reports, and APIs that enable you to integrate or extend data and report processing in custom applications. Reporting Services tools work within the Microsoft Visual Studio environment and are fully integrated with SQL Server tools and components.
In a Visual Studio reporting project for Microsoft Dynamics AX, you can define a report in a report model. A report consists of a collection of items, such as datasets, parameters, images, and report designs. A model can contain more than one report.
Also, for this post I am assuming that all report services are configured in the system.
Let us create a query in AOT as a dataset source for our report.
Create a new query by name – “SR_InventTableQuery” and add InventTable as datasource and add ItemId range to it. I will let you know the significance of adding the range as I proceed further..
So, your new query should like below :

Please note: we can use already existing queries which are in AOT for report as datasource, for better understanding I have created new query above.
Lets proceed further. Open visual studio 2010 and lets us create a new Dynamics AX project.
Once visual studio is launched >> click on file menu >> New project as shown below

Select Microsoft Dynamics AX from the installed templates >> report model and name the model as SR_ReportNewModel as shown below

Now let us add a new report to the newly created report Model as shown below. Right click on the SR_ReportNewModel from the solution explorer, Add >> Report

Rename the report to SR_InventTable by right click and rename option on the newly added report.
Then we need to add the dataset to the newly created report. Right click on the datasets node and chose the option New datset. Rename it to InventTable and go to query property and click on the ellipsis (…) button to select the query which we have created as shown below [picture explains better than 1000 words]

It will open with list of Dynamics AX Queries from which we should select our query “SR_InventTableQuery” and click on next button as shown below

Now , you can select the list of fields and display methods you want to see on your report.
I have selected few fields form the fields and also couple of display methods like site Id and location Id as shown below and click on Ok Button.

wow..There you go… we are done with the datasets part and lets work on the design part real quick now…
Its very simple..Select the InventTable dataset and drag and drop on to your designs node as shown below. It will create autodesign for you :)

In my case, when I expand the designs node, i see my fields and the data methods added in the data nodes. we will look in to other nodes in detail later.
Well there are now some important [not mandatory] properties but beautification properties which make your report look good with style. Once you expnad the designs node, you will find InventTableTable with the dataset name. Right click on it and go to properties and set the style template to “TableStyleTemplate” as shown below.

On to autodesigns, we also need to set an important property called Layout Template – set it to ReportLayoutStyleTemplate as shown below

Now, lets switch to parameters node in the report. If you expand the parameters node , you will find some parameters. Lets work on AX_CompanyName parameter. By default it is hidden. Lets unhide or make it visible it as we want to display the items based on the company [dataaread id] selection by the user.
See the screen shot below

wow..we are getting closer. Now we can preview the data by right clicking the autodesign and by chosing option preview as shown below

Note: you can select the company parameter and click on the report tab to view the report. But our main aim is to deploy back this report model to AX.
To deploy the report to AOT, we have a very simple option. Right click on the SR_ReportNewModel from the soultion explorer and select option Add SR_ReportNewModel to AOT as shown below.

We are done with visual stuido development part. Now lets us switch to AX and see whether the report model has been saved to AOT or not. To do so, open your AX client and ogo to AOT >> Visual studio projects >> Dynamics AX Model projects . you should see SR_ReportNewModel project.
Also, In AOT >> SSRS Reports >> Reports >> you should see SR_InventTable report.
Now we are left out with final thing, creating menuitem for this report. This can be easily done by following hthe below process.
Go to AOT >> Menu items >> Output >> Right click and Select New Menu item and set the following properties as shown below.

Cool.. we are done and hope you are excited to view the report now. Well you can add this menu item to relevant menu and I hope you knw this process.
Now , lets open the report, Right click on the newly created menu item and select open.[You should see the following as shown below]

Since we have made the company parameter visible- we have option of generating the report based onthe dataareaid and since we have added range ItemId to the query – we get twow ranges as shown above.
I have selected ceu as my company and I am leaving ItemId as blank to view all the items in the report. Now lets run the report and see how it renders the data. [Below is the report]

Note: AX uses SysOperationTemplateForm and SysOperationDialog classes for this report integration. we shall look in to details in next posts.

Sunday, November 6, 2011

Error messages returned by Setup of Dynamics Ax

The following table lists the error messages that Setup can return, and possible causes for each.


Error message
Possible cause
You must be an administrator on the local computer to run Microsoft Dynamics AX SetupYour domain account is not a member of the local computer group Administrators.
An error occurred while the log file {0} was initializing. Confirm that you have rights to the folder that contains the log file. You might need to be an administrator to access some folders. The following messages would have been written to the log if you had rights to it:Your domain account does not have rights to write to the directory where the log files are placed (Documents and Settings\All Users\Application Data\Microsoft\Dynamics AX\Dynamics AX Setup Logs\Date Time\AxSetupLog.txt). Contact a system administrator.
An unexpected exception occurred. See the log file {0} for details.An unexpected error occurred. Review the messages below this line to determine the problem.
The parameter {0} was not recognized.A parameter sent to the Setup program was not recognized. Review the syntax you are using.
The parameter {0} contains the invalid value {1}. Cause: {2}.A value included for a Setup parameter was incorrect. Review the syntax you are using.
The parameter file {0} was not found.The location of the file in the parmfile parameter passed to the Setup program could not be found.
An error occurred while parameter file {0} was being read. Error:The parameter file passed by the parmfile parameter could not be read. Review the file to identify the error.
Setup cannot install from this location because the.NET security level for this security zone is not set to Full Trust. You can change the .NET security level for a zone in .NET Framework Configuration in Control Panel.Setup cannot install from this location because the .NET security level for this security zone is not set to Full Trust. You can change the .NET security level for a zone in Control Panel > .NET Framework Configuration.
The parameter {0} contains the invalid value {1}. Specify 0 for False or No. Specify 1 for True or Yes.An invalid value has been passed to a parameter. Specify 0 for false or no. Specify 1 for true or yes.
The parameter {0} contains the invalid value {1}. The value must be one of the following: {2}.An invalid value has been passed to a parameter. Review the syntax you are using to pass the parameter values.
The parameter {0} contains the invalid value {1}.An invalid value has been passed to a parameter. Review the syntax you are using to pass the parameter values.
You must set a value for the parameter {0} if the parameter {1} is set to {2}.The parameter you set is dependent on the value of another parameter. Review the Setup parameters documentation.
The required Lists file {0} was not found.The AxSetupLists.txt file could not be found. It is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
An error occurred while reading the AxSetup Lists file {0}. Error:The AxSetupLists.txt file could not be read. It is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
An invalid record format was found in file {0}, line {1}. The line should contain {2} values separated by tabs. Found: {3}The file contains an invalid record format. Re-create the file and try again.
An invalid record format was found in file {0}, record {1}, section '{2}'. Field {3} cannot be: '{4}'The file contains an invalid record format. Re-create the file and try again.
The LicenseTerms section is missing from file {0}.The LicenseTerms required for this installation could not be found in the AxSetupLists.txt file. It is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
The license file {0} was not found.The License file could not be found. It is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
An error occurred while reading License file {0}. Reason {1}The License file could not be read. It is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
The LicenseTermsVersion code {0} is not valid. Valid codes can be found in the LicenseTerms section of file {1}The parameter file contains an invalid LicenseTermVersion code. Refer to the AxSetupLists.txt file on the DVD for valid codes.
The ClientLanguage code {0} is not valid. Valid codes can be found in the Language section of file {1}.The parameter file contains an invalid ClientLanguage code. Refer to the AxSetupLists.txt file on the DVD for valid codes.
The ApplicationRegion code {0} is not valid. Valid codes can be found in the Region section of file {1}.The parameter file contains an invalid ApplicationRegion code. Refer to the AxSetupLists.txt file on the DVD for valid codes.
The ClientHelpLanguages code {0} is not valid. Valid codes can be found in the Language section of file {1}The parameter file contains an invalid ClientHelpLanguages code. Refer to the AxSetupLists.txt file on the DVD for valid codes.
The Language section is missing from file {0}.The Language section is missing from the AxSetupLists.txt file. The file is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
The Region section is missing from file {0}.The Region section is missing from the AxSetupLists.txt file. The file is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
The name of the SQL Server instance cannot include blanks or spaces.The name of the Microsoft SQL Server instance cannot include blanks or spaces. Review the name of the SQL Server you are connecting to, and try again.
You do not have permission to create a new database. For more information, contact the database administrator.To create a database, you must be a member of the DBCreators role on the database server.
You do not have permission to configure the database server {0} to allow the Application Object Server (AOS) to connect to it. For more information, contact the database administrator.To allow another user to connect to a database, you must be a member of the Security Administrators role on the database.
The database name cannot include blanks, spaces, or any of the following characters: \ / . , : [ ] ( ) - ;The name of the SQL Server instance cannot include blanks, spaces, or any of the following characters: \ / . , : [ ] ( ) - ;. Review the name of the SQL Server you are connecting to, and try again.
The DbConnectionTimeout value must be from 10 through 999.The SQL Server database connection time out value is invalid. Contact the database administrator for help.
The path {0} contains invalid characters.The path contains invalid characters. Review what you have entered, and try again.
You must enter a complete path for the application file installation directory. Valid formats for the path include: c:\\pathname \\\\MyServer\\SharedPathThe path you entered for the application file installation directory was incomplete. Valid formats for the path include:
C:\\ pathname
\\\\ MyServer \\ SharedPath
The application files installation path is not valid. The root location of the path ({0}) must exist before you install the application files.The root location of the path for the application file installation directory must exist before you install.
The application files installation folder does not exist. The path must reference a location where application files have been installed.You are attempting to connect to an application files folder that does not exist. The path must refer to a location where application files have been installed.
Setup detected existing files in the application files installation folder. The folder must be empty for Setup to proceed. To ensure that the folder is completely empty, in Windows Explorer, on the Tools menu, click Options. Select the View tab, and in the list of advanced settings, select the Show hidden files and folders option and clear the Hide protected operating system files check box. Then open the installation folder.The application files directory you are installing to contains files. To install using a parameter file, the directory must be empty. Copy the application files to another location if you want to save them.
Setup detected existing files in the installation folder for the application files. The folder must be empty for Setup to proceed. Deleting the existing application files will remove all application customizations. To save your customizations, move the application files to a different folder. Do you want to delete the files currently in the folder?The application files directory you are installing to contains files. If you continue to install, they are deleted. Application files contain all customizations.
The name of an application instance cannot include any of the following characters: \ / . , : [ ] ( ) -The application instance name contains one of the following invalid characters \ / . , : [ ] ( ) -. Review what you have entered, and try again.
You must provide a value for {0}.You cannot proceed with Setup without providing a value for this parameter.
A database named {0} already exists on the server {1}. Enter another name.You have attempted to create a database that has the same name as an existing database. Enter a new database name, delete the existing database and begin again, or in the Setup wizard select the option to connect to an existing database.
Setup cannot find the database {0} on the server {1}. Check that the name is correct.Setup cannot locate the database you entered. Validate the name, and try again.
The Application Object Server cannot be installed on this operating system. Install it on a server running Windows Server 2003.You cannot install the role you selected on a computer running this operating system. For details, see Hardware and software requirements.
Setup has detected that this computer is running Windows Server 2003 without Service Pack 1. We strongly recommend that you install Service Pack 1.Service Pack 1 for Windows Server 2003 provides security enhancements. We strongly recommend that you install it. Installing on Windows Server 2003 without Service Pack 1 is not a supported configuration.
The Application Object Server (AOS) port number must be four digits long.The TCP/IP value you provided is not valid.
An Application Object Server (AOS) instance name cannot have more than {0} characters and may not contain spaces or the characters / or \.The name you entered contains invalid characters. Review what you have entered, and try again.
Setup detected an existing Application Object Server (AOS) instance named {0}. Instance names must be unique. Enter another name.Setup detected an existing Application Object Server (AOS) instance named {0}. Instance names must be unique. Enter another name.
Setup cannot install another Application Object Server (AOS) instance on this computer. No more than {0} AOS instances can be installed on a single computer.Setup cannot install another Application Object Server (AOS) instance on this computer. No more than {0} AOS instances can be installed on a single computer.
Bitmap
You must enter a fully qualified path for the {0} installation directory. Valid formats for the path include: c:\\pathname.
You must enter a fully qualified path for the {0} installation directory. Valid formats for the path include: C:\\pathname.
Note 
You cannot install to the root directory—you must install to a named folder. 
The Application Object Server (AOS) installation path is not valid. The root location of the path ({0}) must exist before you install the AOS.The root location of the path for the AOS installation directory must exist before you install.
Warning: Setup could not connect the Application Object Server (AOS) instance to the database because it could not add the AOS account {0} to the database server as a login account. Installation of the AOS instance was completed, but the AOS instance cannot run without a connection to the database. You might not have permission to modify security on the database server. A database administrator can grant permission manually, and then AOS setup will be complete. For more information, see the installation log file for the error message returned by the database.Setup could not connect the Application Object Server (AOS) instance to the database because it could not add this computer’s AOS account (a domain account, or the Network Service account of the computer running the AOS instance) to the database server as a login account. Installation of the AOS instance was completed, but the AOS instance cannot run without a connection to the database. You might not have permission to modify security on your selected database server. A database administrator can grant permission manually, and then AOS setup is complete. For more information, see the installation log file for the error message returned by the database.
Setup has detected that this computer is not running the recommended service pack for this operating system. We strongly recommended that you run this computer on Windows 2000 Server with Service Pack 4 or Windows XP with Service Pack 1.Service Packs provide security enhancements. We strongly recommend that you keep your computers fully up-to-date with the Service Packs for the operating system you are running. Installing on a system without the appropriate service pack is not a supported configuration.
The client installation path is not valid. The root location of the path ({0}) must exist before you install the client.The root location of the path for the client installation directory must exist before you install.
The name of the Application Object Server (AOS) instance to connect to {0} cannot include blanks, spaces, or any of the following characters: ` ~ ! # $ ^ & * ( )The name of the Application Object Server (AOS) instance to connect to {0} cannot include blanks, spaces, or any of the following characters: ` ~ ! # $ ^ & * ( )
To install a client, .NET or COM Business Connector, or any application that uses Business Connector, you must provide the name of an Application Object Server instance (AOS) to connect to.To install a client, .NET or COM Business Connector, or any application that uses Business Connector, you must provide the name of an Application Object Server instance (AOS) to connect to.
Setup cannot find the client configuration file {0}.Setup cannot find the client configuration file specified in the setup parameters you passed. Check to be sure that the file is in the location specified.
SQL Server Reporting Services must be installed before a Microsoft Dynamics AX reporting server can be set up.Microsoft SQL Server 2005 Reporting Services was not detected on this computer.
Setup cannot find the SQL Server Reporting Services instance. Check that the name is correct.Setup cannot find the SQL Server Reporting Services instance. Check that the name is correct.
You must configure the Report Server virtual directory and Report Manager virtual directory for SQL Server Reporting Services instance {0} before you install a Microsoft Dynamics AX reporting server. Use the SQL Server Reporting Services Configuration Tool.You must configure the Report Server virtual directory and Report Manager virtual directory for SQL Server Reporting Services instance {0} before you install a Microsoft Dynamics AX reporting server. Use the SQL Server Reporting Services Configuration Tool. For more information, see Install and configure a reporting server for ad hoc reporting.
Setup could not connect to the database server {0}.The database server may be unavailable. Check with the database administrator.
The database to be referenced by the reporting server {0}, does not exist on the server {1}.The database that the reporting server is attempting to connect to cannot be found. Check that you have entered the path correctly.
The database server {0} does not contain any databases.The database that the reporting server is attempting to connect to cannot be found. Check that you have entered the path correctly.
Setup could not add the account {0} to the database server {1}as a login. The reporting server was installed on this computer without permission to access this database. It cannot run without a connection to the database. You might not have permission to modify security on the database server. A database administrator can grant permission manually, and then the reporting server setup will be complete. For more information, see the installation log file for the error message returned by the database.Setup could not add the account {0} to the database server {1} as a login. The reporting server was installed on this computer without permission to access this database. It cannot run without a connection to the database. You might not have permission to modify security on the database server. A database administrator can grant permission manually, and then the reporting server setup is complete. For more information, see the installation log file for the error message returned by the database.
An error occurred during registration of the data source in SQL Server Reporting Services. See the log for details.An error occurred during registration of the data source in SQL Server Reporting Services. See the log for details.
Setup could not find an installation of Windows SharePoint Services to support Enterprise Portal. Either it is not installed, or the version is outside the expected range of 6.0.2 to 7.0.0. If you continue, Enterprise Portal will not function until you have set up Windows SharePoint Services.Setup could not find an installation of Windows SharePoint Services to support Enterprise Portal. Either it is not installed, or the version is outside the expected range of 6.0.2 to 7.0.0. If you continue, Enterprise Portal will not function until you have set up Windows SharePoint Services.
Enter the {0} domain account {1} in the format domain\account.The domain account you entered was not recognized.
The {0} account {1} cannot be your own account. Contact your system administrator to create a dedicated account.You cannot use your own domain account to connect to databases. Contact a system administrator for a domain account to use.
You cannot set the account for {0} to a local computer account {1} when the Microsoft Dynamics AX database is not located on the same computer. Use a domain account instead.If the Microsoft Dynamics AX database is not located on the same computer as the AOS, you cannot use a local computer account to connect to it.
The {0} account {1} was not found on the local computer, or the password is incorrect.The domain account you entered was not recognized by the local computer, or the password is incorrect.
The {0} account {1} was not found, or the password is incorrect.The domain account you entered was not recognized, or the password is incorrect.
The application integration server installation path is not valid. The root location of the path ({0}) must exist before you install the application integration server.The root location of the path for the application integration server directory must exist before you install.
Setup could not create the local Windows security group {0} on this computer. This group must exist, contain the current user {1}, and have rights to update the folder {2} before the application integration server can run. See the log for related messages.Setup could not create the local Windows security group {0} on this computer. This group must exist, contain the current user {1}, and have rights to update the folder {2} before the application integration server can run. Setup completes without setting up this account.
The application integration framework (AIF) Windows security group {0} already exists. No changes will be made to it.During installation Setup found that the application integration framework (AIF) Windows security group {0} already exists. No changes are made to it.
The application integration framework (AIF) Windows security group {0}, user {1} already exists. No changes will be made.During installation Setup found that the application integration framework (AIF) Windows security group {0}, user {1} already exists. No changes are made.
Setup could not create the shared folder /security {0} which the application integration framework (AIF) tools must use when copying files from a client to the AIF VRoot folder. You can set this up manually. The folder on the client is {1}, and the user or group being given access is {2}. See the log for related messages.Setup could not create the shared folder /security {0} which the application integration framework (AIF) tools must use when copying files from a client to the AIF VRoot folder. You can set this up manually. The folder on the client is {1}, and the user or group being given access is {2}. See the log for related messages.
The shared folder already exists. No changes will be made to it.The shared folder already exists. No changes are made to it.
Setup could not create the shared folder {0} (code {1}).Setup could not create the shared folder.
The shared folder was not deleted because it does not exist.The shared folder was not deleted because it does not exist.
Setup could not delete the shared folder {0} (code {1}).Setup could not delete the shared folder.
Provide the name of a SQL Server. To specify an instance, use the format MyServer\MyInstance. To specify the SQL Server instance on this computer, enter (local).Provide the name of a SQL Server. To specify an instance, use the format MyServer\MyInstance. To specify the SQL Server instance on this computer, enter (local).
Setup could not connect to the database server {0}.Setup could not connect to the database server specified.
If you install files in a location other than the default, work with your system administrator to ensure that access to the folders is appropriately restricted.If you install files in a location other than the default, work with your system administrator to ensure that access to the folders is appropriately restricted.
A required file is missing from the source location {0}.Setup could not find a required file. It is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
A required folder is missing from the source location {0}.Setup could not find a required file. It is part of a standard Microsoft Dynamics AX installation, and should be available on the DVD. Copy the file to the share you are installing from.
A required folder for region {0} is missing. It should be under {1} and have a name that starts with the letter {2}. See the file AxSetupLists.txt for a list of regional files that should be included in the installer files.A required folder for the region is missing. See the file AxSetupLists.txt for a list of regional files that should be included in the installer files.
The default Application Object Server (AOS) instance has previously been installed as name {0}The default Application Object Server (AOS) instance has previously been installed with a different name.
An Application Object Server (AOS) instance {0} has previously been installed as name {1}. Enter another name.AOS instances cannot be installed on the same computer with the same name.