• Skip to main content
  • Skip to primary sidebar
  • Home
  • About
  • Recommended Readings
    • 2022 Book Reading
    • 2023 Recommended Readings
    • Book Reading 2024
    • Book Reading 2025
  • Supply Chain Management Guide
  • PKM
  • Microsoft Excel

Ali Raza Zaidi

A practitioner’s musings on Dynamics 365 Finance and Operations

Dynamics Ax 2012 Reporting SSRS Reports.

Display methods in Report SSRS Dynamics Ax 2012 .

June 13, 2016 by alirazazaidi

Hi, All, today I have to modify the report. Interestingly this report was built on AOT Query, instead of Data provider class. Current Scenario I was working on Worker Report. The requirement was to show’s primary position and department. HCMWorker table has two display method returns these values.

We can add these display methods into reports by following way.

For example I am modify the out of the box HCMWorkersHiredInPeriod Report.

 

2016-06-13_15-25-16 2016-06-13_15-25-51

 

2016-06-13_15-47-15

 

ddd

 

 

 

 

 

Now Problem appears, we need different values then provided by out of the box display methods. For example we need Position Title instead of Primary Position Id. for this Add new display method that will return the Position Title instead of Position Id, compile table synchronize table, restore the AOT Query and refresh the report data Set. If there is no error in your working environment you will find required methods in report Data set.

 

An item with the same key has already been added. SSRS Dynamics Ax 2012

July 4, 2015 by alirazazaidi

Today I got this strange error “An item with the same key has already been added “, Very interestingly I got no error during compilation or deployment of report

when I run the report I got this error

An item with the same key has already been added.

 

On investigate I found this error is due to meta data of report. Report is based on Query. On Exploring Query I found that I added the same field two times, At report run time I got error due to duplication of same field. If you see the below screen shoot you  will found that “CustGroup” appears two times in Query, I removed the Duplicate field. compile the Query, Refresh the report data source, compile, deploy and add to AOT. Report run successfully.

 

AllFields

Query Based SSRS report from Scratch Dynamics Ax 2012 R3.

July 4, 2015 by alirazazaidi

In Microsoft Dynamics Ax 2012, we can create less complex reports with AOT Query or Static Query.

Simple or model based report is as follow.

QueryBased Report

http://dynamics-ax.blogspot.com/2011/12/ax-2012-ax-ssrs-report-design-concepts.html

 

The steps are as follow  We can create simple or model based report with following steps

  • Step 1: Create a Microsoft Dynamics AX query
  • Step 2: Create a new report in Visual Studio
  • Step 3: Apply Layout template
  • Step 4: Add Column sorting
  • Step 5: Group report data
  • Step 6: Filter report data
  • Step 7: Add a dynamic parameter
  • Step 8: Save and deploy the report
  • Step 9: View the report in Microsoft Dynamics AX

 

We can see these steps below

 

Now consider a scenario, where we have to display sales item detail with respect to its customer. As this report is not much complex and on exploring Dynamics Ax 2012 default tables we found that Sales order detail at Item level can be found on “SalesLine” table. Complexity is less so we decide to create this report with Static Query or AOT query based Report.

This Article is based on Contoso demo data, and Dynamics Ax 2012 R3 on demo licences

 

 

Open MS Dynamics Ax 2012 Client And press Ctrl+Shift+W to open dev environment or open the AOT.

When AOT open expand it and at AOT node add new query

CreatingAOTQuery

Rename Query to simple “QSalesLine”.

Expand its data Source Node, right click and add new data Source

Add DataSource

Rename the Data Source to SalesLine and select SalesLine table

SalesLineDataSource

Now expand the field Node and set its dynamic property to no

DynamicPropertyToNo

Right Click on Field and add new field and select salesId

 

SelectField

 

SalesId

Similarly you can add following fields

  • CustAccount
  • SalesId
  • OrderQty
  • SalePrice
  • LineAmount
  • ItemId,
  • Name,
  • CustGroup

QSales

 

Now save the Query.

 

Open Visual studio and create a new report project

ModelReport

 

 

Open Visual studio environment and create a new Report and Rename It to SalesLineReport

 

From solution Explorer add new report

SolutionExplorer

Now expand report and right click on data Source to create a new data source Rename It to DSSaleLine

SalesLineDS

 

Right click on “DSSaleLine” it Edit it or click on properties and open property window

propertyWindow

From Property window select

 

Click on Query and from Brower window select Required Query

 

Click on next window

SelectionOfQSales

 

Select all fields and click on save

FieldSelection

 

 

ReportDetails

 

Now drag the data set and drop on designs node, It will create auto Design

AutoDesign

Right click on report designer and do the following

Rename AutoDesign to as “SalesLineDesign”

Select ReportLayoutTemple to ReportLayoutTemplate

Title to “CustomSalesLineReport”

and click on save.

ReportTitle

Now expand “SalesLineDesign” design and drop and drop CustAccount in Group and Sort node. This will create the records group and line according to CustAccount

SalesLineReport

 

Now Compile the report, Deploy it and At to AOT.

 

 

Now open the AOT. Change the legal entity to “USMF” expand the menuItem node, and create a new display menu item

NewMenuItem

 

 

 

Change its Name to mnuCustomSalesLineReport

Change object Type to SSRS report and select the object is SalesLinereport and Report Design to SalesLineDesign

MenuSalesLine

 

 

Now save the menu and let’s run the report

ReportDailog

Click on ok to run the preview

Reports

Adding Dynamic Parameter

Create another query in AOT name it QCustomer, and add AccountNum is in field. You have to follow the same step which we used to create QSalesLine Query. Save the Query

DynamicQuery

Now switch back to model project in Visual studio and add new Dataset and Name it DSCustomer and pointed to QCustomer query the same way we select the Query.

DsCustomer

Now expand parameter node of report

And add new Parameter with Name “CustomerParm”

Expand Values and set

Customer

DynamicParameterparamet

Now expand Report designer and under filter node add new node

AccountFilter

Right Click on AccountFilter and from property window

Click on expression  To select = Fields!CustAccount

Operator select “Like”

And Value select =Parameters!CustomerParm.Value

FilterProperties

 

 

 

 

 

Save the report and deploy it, and then Add to AOT.

 

Open Aot and from item display menu to run report

 

You will found a new drop down for parameter in

CustomerSelection

 

 

Form this parameter You can select and run the report for specific customer

CustomerSelectionReport

Microsoft.Dynamics.Framework.Metadata.AX, Version=6.2.0.0 SSRS Report Error

June 1, 2015 by alirazazaidi

Today I got very this error on deployment of customized SSRS report. The customization code was written in Dynamics AX 2012 R2 and it was successfully migrated to Dynamics Ax 2012 R3

 

System.Web.Services.Protocols.SoapException: Error while loading code module: ‘Microsoft.Dynamics.Framework.Metadata.AX, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. Details: Could not load file or assembly ‘Microsoft.Dynamics.Framework.Metadata.AX, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

at Microsoft.ReportingServices.Library.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Guid batchId, Warning[]& Warnings)

at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)

 

ReportError

Solution is open the report In Visual studio, compile it, deployed it and add to AOT.

Unable to find appropriate service endpoint information in the configuration object Dynamics Ax 2012.

October 12, 2014 by alirazazaidi

Recently installed the SSRS report extension on my VM Dynamics Ax 2012 R2 CU7. During installation, I continuously found following error message In log files.

 

“Unable to find appropriate service endpoint information in the configuration object”

Later I understand that SSRS reports communicate with AOS through WCF services and WCF service for Dynamics Ax was not running on AOS.

When I opened the Application Integration Framework è Inbound port, I found that BI service was deactivated.

10-12-2014 5-58-16 PM

 

I activate the service, and retry SSRS reporting extension installation, which installed successfully.

 

10-12-2014 11-13-28 PM

List of functions used in Dynamics AX 2012 SSRS Reports Expressions

October 10, 2014 by alirazazaidi

During working in SSRS reports I have to handle division by Zero error for calculating accumulated cost by dividing Amount by Quantity.

 

This expression works for me.

 

IIf(Sum(Fields!xyz.Value) = 0, “N/A”, Sum(Fields!abc.Value) / IIf(Sum(Fields!abc.Value) = 0, 1,Sum(Fields!xvz.Value)))

I did little research on Expressions and function used in these SSRS expressions

 

 

Expressions:

Expressions are used for manipulate or update the value, for example, cost show by dividing amount by Quantity. Rounding of decimal. Similarly Expression can be used to highlight the filed if condition meets. Style font can be changed, even you can uses switch statement, to change the display value of report.

 

Types of Expressions

Globals
Operators – Arithmetic, Comparison, Logical
Common Functions – Text, Date & Time, Math, Inspection, Program Flow, Aggregate, Financial, Conversion, Miscellaneous

We can see each and every one very detail in following.

 

 

Globals

Global expressions executes/works in Page Header and Footer parts only.

ExecutionTime shows date and time at when report executes
PageNumber shows page number of each and every page but allowed only in page header and footer
ReportName displays name of the active report what name we have assigned to the active report
UserId shows current user name like company/alirazazaidi
Language displays language like US-English…

Operators

Arithmetic
^ power of
* multiplication
/ divides two numbers and returns a floating point result
\ divides two numbers and returns a integer result
Mod divides two numbers and returns remainder only
+ adds two numbers and concatenation for two strings
– subtraction and indicates negative value for numeric values
Comparison
Known operators : < <= > >= <> 
Like compares two strings and return true if matched or else returns False. Ex: =Fields!Title.Value Like Fields!LoginID.Value
Is compare two object reference variables Ex: = Fields!Title.Value Is Null
Concatenation
+ and & symbols uses for concatenation
Logical
Known: And, Not, Or 
Xor SELECT * FROM users where firstname = ‘Larry’ XOR lastname = ‘Smith’
AndAlso First condition will check first and if it is true only, goes to next or else it won’t need to check. Because our execution time is saving in a logical operation in which more conditions is combined using AndAlso function.
OrElse same like above

Common Functions

Text

Asc, AscW returns an integer value represents character code corresponding to a character

Chr, chrw returns the character associated with the specified character code

Filter =Filter(Fields!Title.Value,”Pr”,true,0

Format
=Format(Fields!Price.Value, “#,##0.00”), Format(Fields!Date.Value, “yyyy-MM-dd”)

FormatCurrency =formatcurrency(Fields!SickLeaveHours.Value,3)

FormatDateTime =FormatDateTime(Fields!BirthDate.Value,Integer)
Examples:
0 returns 10/10/2014
1 returns Friday, October 10, 2014
2 returns 6/3/2014
3 returns 12:00:00AM
4 returns 00:00

FormatNumber =FormatNumber(Fields!EmployeeID.Value,2)
Examples: 4.00

FormatPercent =”Percentage : ” & formatpercent(Fields!SickLeaveHours.Value)

GetChar =GetChar(Fields!Title.Value,5)

InStr =InStr(Fields!Title.Value,”a

InStrRev =Instrrev(Fields!Title.Value,”a

LCase Change strings into lower case
=Lcase(Fields!Title.Value)

Left Returns left side characters from a string
=Left(Fields!Title.Value,4)

Len Finds length of a string
=Len(Fields!Title.Value)

LSet Returns some length of a string from left
=Lset(Fields!Title.Value,5)

LTrim Trim left side of a string
=Ltrim(” “&Fields!Title.Value)

Mid Returns characters from the mentioned starting position
=Mid(Fields!Title.Value,InSTrRev(Fields!Title.Value,”T

Replace Replaces one string with another
=Replace(Fields!Title.Value,”a”,”A

Right Returns right side characters from a string
=Right(Fields!Title.Value,10)

RSet Returns some length of a string from left
=Rset(Fields!Title.Value,5)

RTrim Trim left side of a string
=Rtrim(Fields!Title.Value & ” “)

Space Specifies some spaces within strings
=Fields!Title.Value & Space(5) & Fields!Title.Value

StrComp Returns a value indicating the result of a string comparison

vbBinaryCompare 0 Perform a binary comparison.
vbTextCompare 1 Perform a textual comparison.
string1 is less than string2 -1
string1 is equal to string2 0
string1 is greater than string2 1
string1 or string2 is Null Null

StrConv
=Strconv(Fields!Title.Value,vbProperCase)
=Strconv(Fields!Title.Value,vbLowerCase)
=Strconv(Fields!Title.Value,vbUpperCase)

StrDup Returns a string or object consisting of the specified character repeated the specified number of times.
=StrDup(3,”M”)

StrReverse =StrReverse(Fields!Title.Value)

Trim =Trim(” “& Fields!Title.Value & ” “)

UCase =Ucase(Fields!Title.Value)

Date & Time

CDate Converts a object into date format
=Format(CDate(Fields!BirthDate.Value),”MMMM”)

DateAdd Returns a datetime that is the result of adding the specified number of time interval units to the original datetime.

=dateadd(“m”,12,Fields!BirthDate.Value)

DateDiff Find number of days, months and years between two dates
=datediff(“d”,Fields!BirthDate.Value,Now)

DatePart DatePart(DateInterval.Weekday, CDate(“2009/11/13”), FirstDayOfWeek.Monday) returns 5 (Friday)

DateSerial for first day of the month
=DateSerial(Year(Now), Month(Now), 1)
for the last day of the month
=DateSerial(Year(Now), Month(Now)+1, 0)

DateString Returns string value of system date
=datestring()

DateValue Returns current date

Day Returns day value from date
=day(Fields!BirthDate.Value)

FormatDateTime =FormatDateTime(Fields!BirthDate.Value,Integer)
Examples:
0 returns 6/3/2014
1 returns Friday, June 03, 2014
2 returns 6/3/2014
3 returns 12:00:00AM
4 returns 00:00

Hour =Hour(Fields!BirthDate.Value)

Minute =Minute(Fields!BirthDate.Value)

Month =Month(Fields!BirthDate.Value)

MonthName =MonthName(Month(Fields!BirthDate.Value))

Now Indicates current month
=Now() or =Now

Second =Second(Fields!BirthDate.Value)

TimeOfDay =TimeOfDay()
Returns a date value containing the current time of day according to your system

Timer =Timer()
Returns number of seconds elapsed since midnight

TimeSerial =TimeSerial(24,60,60)
Returns a date value representing a specified hour, minute and second

TimeString =TimeString()
Returns string value representing the current time of day according to your system

TimeValue Returns a date value set to jan 1 of year 1
=TimeValue(Fields!BirthDate.Value)

Today Returns Current date

Weekday Returns an integer value representing day of week
=WeekDay(Fields!BirthDate.Value)

WeekdayName =WeekdayName(Weekday(Fields!BirthDate.Value))
Returns name of the day of week

Year =year(Fields!BirthDate.Value)
Returns year of specified date

Math

Abs Returns the absolute value
=Abs(-2.36)

BigMul Returns multiplication value of two specified numbers
=BigMul(2,3)

Ceiling Returns next highest value
=Ceiling(2.67)

Cos
=Cos(2.33)
Returns cos value for specified number

Cosh
Returns hyperbolic cos value
=Cosh(2.33)

DivRem
=DivRem(23,2,5)

Fix
=Fix(23.89)
Returns integer portion

Floor
=Floor(24.54)
Returns largest integer

Int
=Int(24.78)
Returns integer portion of a number

Log
=Log(24.78)
Returns logarithm value

Log10
=Log10(24.78)
Returns the base 10 logaritm value

Max
=Max(Fields!EmployeeID.Value)
Returns larger value in the specified values

Min
=Min(Fields!EmployeeID.Value)
Returns smaller value in the specified values

Pow
=Pow(Fields!EmployeeID.Value,2)
Returns power of value for specified number

Rnd
=Rnd()
Returns a random number

Round
=Round(43.16)
Returns rounded value to the nearest integer

Sign
=Sign(-34534543)

Sin
=Sin(Fields!EmployeeID.Value)
Returns the sin value

Sinh
=Sinh(Fields!EmployeeID.Value)
Returns the hyperbolic sin value

Sqrt
=Sqrt(Fields!EmployeeID.Value)
Returns square root value

Tan
=Tan(Fields!EmployeeID.Value)
Returns the tan value

Tanh
=Tanh(Fields!EmployeeID.Value)
Returns the hyperbolic tan value

Inspection
IsArray
=IsArray(Fields!EmployeeID.Value)
Returns a boolean value indicating whether the specified object is array or not

IsDate
=IsDate(Fields!BirthDate.Value)
Returns a boolean value indicating whether the specified object is Date or not

IsNothing
=IsNothing(Fields!EmployeeID.Value)
Returns a boolean value depends on specified object is Nothing or not

IsNumeric
=IsNumeric(Fields!EmployeeID.Value)
Returns a boolean value depends on specified object is Numeric value or not

Program Flow

Choose
=CHOOSE(3, “Red”, “Yellow”, “Green”, “White”)
Returns a specific value using index in a list of arguments

IIf
=IIF(Fields!EmployeeID.Value>10,”Yes”,”No
Returns any one value depends on condition

Switch
=Switch(Fields!EmployeeID.Value<10,”Red
Fields!EmployeeID.Value>10,”Green
Evaluates list of expressions

Aggregate

Avg
=Avg(Fields!EmployeeID.Value)
Returns average value for all specified values

Count
=Count(Fields!EmployeeID.Value)
Returns count of all specified values

CountDistinct
=CountDistinct(Fields!EmployeeID.Value)
Returns count of all distinct values

CountRows
=CountRows()
Returns count of rows

First
=First(Fields!EmployeeID.Value)
Returns first for all specified values

Last
=Last(Fields!EmployeeID.Value)
Returns last for all specified values

Max
=Max(Fields!EmployeeID.Value)
Returns max for all specified values

Min
=Min(Fields!EmployeeID.Value)
Returns min for all specified values

StDev
=StDev(Fields!EmployeeID.Value)
Returns standard deviation value

StDevP
=StDevP(Fields!EmployeeID.Value)
Returns Population standard deviation value

Sum
=Sum(Fields!EmployeeID.Value)
Returns sum of all values

Var
=Var(Fields!EmployeeID.Value)
Returns variance of all values

VarP
=Var(Fields!EmployeeID.Value)
Returns population variance of all values

RunningValue
=RunningValue(Fields!EmployeeID.Value,sum,nothing)
Returns running aggregate of the specified
expression

Financial

DDB DDB (Double Declining Balance) method computes depreciation of an asset for a specified period.
Syntax: DDB (Cost, Salvage, life, period, factor)

FV FV (Future Value) of an investment based on periodic, constant payments and a constant interest rate.
Syntax: FV (rate, nper, pmt, pv, type)

IPmt IPmt (Interest Payment) for a given period for an investment based on periodic, constant payment and a constant interest rate
IPMT (rate, per, nper, pv, fv, type)

IRR IRR (Interest Rate of Return) for a series of cash flows represented by the numbers in values.
IRR(values,guess)

MIRR MIRR ( Modified internal rate of return ) for a series of periodic cash flows
MIRR(values,finance_rate,reinvest_rate)

NPer Returns the number of periods for an investment based on periodic, constant payments and a constant interest rate.
NPER (rate, pmt, pv, fv, type)

NPV Calculates the net present value of an investment by using a discount rate and a series of future payments (negative values) and income (positive values).
Syntax: NPV(rate,value1,value2, …)

Pmt Calculates the payment for a loan based on constant payments and a constant interest rate.
PMT(rate,nper,pv,fv,type)

PPmt Returns the payment on the principal for a given period for an investment based on periodic, constant payments and a constant interest rate.
PPMT(rate,per,nper,pv,fv,type)

PV Returns the present value of an investment. The present value is the total amount that a series of future payments is worth now. For example, when you borrow money, the loan amount is the present value to the lender.
PV(rate,nper,pmt,fv,type)

Rate Returns the interest rate per period of an annuity. RATE is calculated by iteration and can have zero or more solutions.
RATE(nper,pmt,pv,fv,type,guess)

SLN Returns the straight-line depreciation of an asset for one period.
SLN(cost,salvage,life)

SYD Returns the sum-of-years’ digits depreciation of an asset for a specified period.
SYD(cost,salvage,life,per)

Conversion

CBool Convert to boolean
=CBool(fields!EmployeeID.Value)
CByte Convert to byte
CChar Convert to char
CDate Convert to date
CDbl Convert to double
CDec Convert to decimal
CInt Convert to integer
CLng Convert to long
CObj Convert to object
CShort Convert to short
CSng Convert to single
CStr Convert to string
Fix =Fix(32.342143)
Returns integer portion of a number
Hex =Hex(Fields!EmployeeID.Value)
Returns a hexadecimal value of a number
Int =Int(43.44)
Returns integer portion of a number
Oct =Oct(Fields!EmployeeID.Value)
Returns a octal value of a number
Str =Str(Fields!EmployeeID.Value)
Returns string value of a number
Val =Val(“32.43”)
Returns numeric value in string format

Miscellaneous

Previous =Previous(Fields!EmployeeID.Value)
Returns the previous value

 

Reference : http://krishhdax.blogspot.com/2012/10/expressions-or-functions-used-in-ax.html

Exploring Drill-down SSRS Reports in Dynamics Ax 2012 R3.

June 23, 2014 by alirazazaidi

Drill drown reports in Dynamics Ax 2012 R3 are very Easy. For this purpose I have to create a new AOT/Static Query AOT. This query is join between CustTable and SalesTable. I want to create Inner Join so Only those Customer came who have Sales Orders. Consider following Steps to create A new report
Create a new Query with Name “DyWorldCustSales”
Drop or add Data Source with CustTable
6-21-2014 9-02-30 PM

 

Right click on Fields and add following fields from Customer table.

CustomerFileds

 

 

Expand Data Source inside Custtable, Add or create DataSource with SalesTable and fields

 

SalesOrder

 

Right Click on  SalesTables Data Source and set its join properties as follow

DataSetProperties

 

Expand Relationship node of SalesTable_1  Add Following relationship

Relations

 

Set it properties as follow

RelationshipDetail

 

New create a new report In existing or New DataModel Report in Visual Studio project

NewReport Project

 

Add New report with DyCustSalesOrderList

Add Dataset with Name DSCustomer and Point to Query which we create in above steps

 

PointToQuery QueryDataSet

Now drag and drop the dataset on designer to create a designer

And Update rename it to  DyCustSalesOrderList

 

Set DataTable’s Propeties visible to set false

DataTable

Add a List and set its name to CustList

Create two groups there one for CustomerGroup and second for AccountNum

Groups

 

Now drop the fields from dataset which  you want to display on report

Fields

 

Right click on CustList and set Data Navigation Style to DrillDown from properties window

DrillDownProperties

Now right click add report to aot and then deploy to Report Server

 

When you run the report  from meu Item you will find following

CustomerGroupClick

 

Click on Customer group this will open it

reportCustomerLevel

 

Click on Customer account it will drill down report on Detail level

Details

 

Exploring Report Controller class in dynamics AX 2012 R3

June 21, 2014 by alirazazaidi

In Dynamics AX 2012 Reports can be called from Class, and it is import part of MVC pattern implementation for reports
The report created from following link is called from controller class
http://tech.alirazazaidi.com/exploring-drill-through-reports-in-dynamics-ax-2012-r3/
Create a new class and extends it with “SRSReportRunController” class.
Add New method, and update it with following code

public static void main(Args args)
{
DyWorldDrillThroughReportController _Con= new DyWorldDrillThroughReportController();
    _Con.parmReportName(ssrsReportStr(DynamicCustomerList,DesignCustomerList));
    _Con.parmArgs(args);
    _Con.startOperation();
    
}


When you run the class report will be open.

ReportController

 

Very interestingly if you did not want to show report dialog, and just run the report form default parameter value you have to add following statement in above code

_con.parmShowDialog(false);

Exploring Drill through Reports in Dynamics Ax 2012 R3.

June 19, 2014 by alirazazaidi

Creating basic drill through reports in Dynamics Ax 2012 R3 is really simple. Consider following scenario where we have to show the list of customer and their sales Orders in particular legal Entity.  In this report when User click on customer account, a new report open which contains list of all possible sales Order.

For this Purpose I created two Static/AOT queries. First for Customer, and second for Sales Order.

 

Customer Query is as follow.

  • Create a new AOT query with Name DyWorldCustomerList.
  • In DataSource add CustTable table.
  • In fields dynamic to true.

CustListTable

 

Similarly Create another Query “DyWorldSalesTable” for SalesTable. With Name DyWorldSalesTable

 

SalesTable

Now Open a Visual studio and create a new Dynamics Ax Report Project

 

Report Project

Add a new report with name

  • DynamicCustomerList

 

  • Add New dataset with Name
  • DynamicCustomerList set its properties as follow

CustomerDataSet

  • Select Following fields
    •   AccountNum
    •    CustGroup
    •    Party

 

  • Drag this DSCustomerList data set on Report Designer to create an AutoDesign.
  • Change the AutoDesign1 properties as follow

o   Name to DesignCustomerList

o   LayoutStyle to ReportLayoutStyleTemplate

 ReportDesinger2

 

Now create another report inside same Dynamics Ax Model Project, this report will call from customer Report

SalesOrderReport

Create and DataSet with DSSaleOrder with query  “DyWorldSalesTable”

SalesOrderDataSet

Drag this dataset on Report Designer and update newly Designer as follow.

SalesOrderDesignerProperties

 

 

Now open the parameter Section of report and add new parameter as “CustId” of string type

CustIdParameter

Now expand report designer and expand Table and add filter with following Properties

NewParameter

Set following Properties of filter

o   From  Expression select “=Fields!CustAccount.Value”

o   Name= Customer

o   Operator =Equals

o   Value “=Parameters!CustId.Value”

Properties

 

Save the report.

 

Now Open the first report “DynamicCustomerList”. And expend the reports design, “DSCustomerListTable” and then Data and select AccountNum.

Right click on AccountNum and select “Report Drill Through Action”

AddDrillThrough

 

Now Double click and Select the report designer which will open against the click on field

ActionProperties

Select SalesOrderReport and its Desinger form dialog

ReportSelectionSalesOrderList

It will create, number of parameters, all belongs to  DynamicSalesOrderList Report as follow

DrillThroughParameters

 

Delete all parameters except AX_CompanyName and CustId. If any other parameter remains, you definitely got following error when you call Sales Order report form drill through option.

“The Microsoft Dynamic AX parameter ID should be a RECID. The exception is System.FormatException: Input string was not in a correct format.”

AfterDeleteParameters

 

Please Select following Values for these Properties AX_CompanyName

Select its value “=Parameters!AX_CompanyName.Value

CompanyNameValue

Please select the following value for CustId as “=Field!AccountNum.Value”

SaleIdValue

Now saves the reports and right click on Report Project to Add to AOT and then deploy on Report Server

 

AOT and Deploy

Now Go to AOT, and refresh the Select the Visual Studio Model Project and SSRS reports into Dynamics Ax project so it will easy to edit or locate easily

Menu2

Now create a Menu Item of Display type and set its following Properties

Menu

Now run the report as follow

 

CusttomerList

As click on first Customer “CNMF-000001” To its salesOrderList , The second report successfully open as follow

SaleOrderList

A call to the Microsoft Dynamics AX SRSFramework Service failed.

June 13, 2014 by alirazazaidi

Today while deploying Dynamics AX 2012 R3 SSRS reports on window 7 I got following when I run Report deployment command on publish-AXReport -ReportName *.

“A call to the Microsoft Dynamics AX SRSFramework Service service failed. An existing connection was forcibly closed by the remote host.“.

Errors

I perform following steps to solve this problem.
1. Stop reporting services,
2. Stop AOS.
3. Goto: C:\Users\\AppData\Local\

UAC files
4. Take the backup of all AUC files,
5. Remove them from there
6. Start reporting services
7. Start AOS.
8. Again run publish-AXReport -ReportName *. In powershell.

Reports are successfully deploy on my machine.

References:

http://dynamics-ax.blogspot.no/2013/03/ax-2012-fatal-axrdce-exception-error.html

https://community.dynamics.com/ax/f/33/t/115327.aspx

« Previous Page
Next Page »

Primary Sidebar

About

I am Dynamics AX/365 Finance and Operations consultant with years of implementation experience. I has helped several businesses implement and succeed with Dynamics AX/365 Finance and Operations. The goal of this website is to share insights, tips, and tricks to help end users and IT professionals.

Legal

Content published on this website are opinions, insights, tips, and tricks we have gained from years of Dynamics consulting and may not represent the opinions or views of any current or past employer. Any changes to an ERP system should be thoroughly tested before implementation.

Categories

  • Accounts Payable (2)
  • Advance Warehouse (2)
  • Asset Management (3)
  • Azure Functions (1)
  • Books (6)
  • Certification Guide (3)
  • Customization Tips for D365 for Finance and Operations (62)
  • D365OF (59)
  • Data Management (1)
  • database restore (1)
  • Dynamics 365 (58)
  • Dynamics 365 for finance and operations (135)
  • Dynamics 365 for Operations (165)
  • Dynamics AX (AX 7) (134)
  • Dynamics AX 2012 (274)
  • Dynamics Ax 2012 Forms (13)
  • Dynamics Ax 2012 functional side (16)
  • Dynamics Ax 2012 Reporting SSRS Reports. (31)
  • Dynamics Ax 2012 Technical Side (52)
  • Dynamics Ax 7 (65)
  • Exam MB-330: Microsoft Dynamics 365 Supply Chain Management (7)
  • Excel Addin (1)
  • Favorites (12)
  • Financial Modules (6)
  • Functional (8)
  • Implementations (1)
  • Lifecycle Services (1)
  • Logseq (4)
  • Management Reporter (1)
  • Microsoft Excel (4)
  • MS Dynamics Ax 7 (64)
  • MVP summit (1)
  • MVP summit 2016 (1)
  • New Dynamics Ax (19)
  • Non Defined (9)
  • Note taking Apps (2)
  • Obsidian (3)
  • Personal Knowledge Management (2)
  • PKM (13)
  • Power Platform (6)
  • Procurement (5)
  • procurement and sourcing (5)
  • Product Information Management (4)
  • Product Management (6)
  • Production Control D365 for Finance and Operations (10)
  • Sale Order Process (10)
  • Sale Order Processing (9)
  • Sales and Distribution (5)
  • Soft Skill (1)
  • Supply Chain Management D365 F&O (3)
  • Tips and tricks (278)
  • Uncategorized (165)
  • Upgrade (1)
  • Web Cast (7)
  • White papers (4)
  • X++ (7)

Copyright © 2025 · Magazine Pro On Genesis Framework · WordPress · Log in