This post is machine-translated. The original post in german language can be found here.

Requesting information on SSRS reports via the Microsoft Dynamics AX 2012 Management Shell

Microsoft Dynamics AX 2012 Management ShellWith the Microsoft Dynamics AX 2012 Management Shell you can get a lot of information about your Dynamics AX 2012 instance.

For example, you can use the command below to display a list of all SSRS reports or just one specific report (for example, SalesInvoice).

get-AXReport -reportname *
get-AXReport -reportname salesinvoice

The output looks like this and may not be what you need. Therefore, there are a number of other commands that can be used to optimize the output.

ChangedBy      : -AOS-
ChangedDate    : 11/25/2017 12:00:00 PM
CreatedBy      : -AOS-
CreatedDate    : 11/25/2017 12:00:00 PM
DataSources    : {}
Designs        : {ReportEE, ReportLT, ReportHU, ReportLV...}
Name           : SalesInvoice
VSProjectNames : {SalesInvoiceReport.BusinessLogic, SRSDrillThroughCommon}
Output         : Report name: SalesInvoice
                 Changed by: -AOS-
                 Changed date: 11/25/2017 12:00:00 PM
                 Created by: -AOS-
                 Created date: 11/25/2017 12:00:00 PM
                 Data sources:
                 Designs: ReportEE, ReportLT, ReportHU, ReportLV, ReportCZ,
                 ReportPL, Report, ReportTH, ReportFull_MY, ReportSimplified_MY
                 Visual Studio projects: SalesInvoiceReport.BusinessLogic,
                 SRSDrillThroughCommon

For example, you can use the following command to display only the names of the reports:

get-AXReport -reportname * | Select-Object name

Of course, you can also display more than one property, for example, the name and the last change date:

get-AXReport -reportname * | Select-Object Name, ChangedDate

This can look as follows:

Name                                    ChangedDate
----                                    -----------
...
TaxList                                 4/4/2014 12:00:00 PM
TaxList_BE                              4/4/2014 12:00:00 PM
TaxPackagingTaxItem                     4/4/2014 12:00:00 PM
TaxPurchaseTaxReport                    4/4/2014 12:00:00 PM
TaxPurchLedger                          9/19/2017 12:00:00 PM
TaxReconciliationReport                 11/8/2015 12:00:00 PM
...

Glücklicherweise kann man das ganze auch noch in eine Textdatei schreiben lassen:

get-AXReport -reportname * | Select-Object Name, ChangedDate | out-file c:	emplistchangedreports.txt

Fortunately, you can also write the whole thing into a text file:

get-AXReport -reportname * | Select-Object Name, ChangedDate | out-file c:	emplistchangedreports.txt

If you only want to display a certain selection, you can also use a where-clause, e.g. display only those reports in a file that have been changed in the last 30 days...

get-AXReport -reportname * | Select-Object Name, ChangedDate | Where{$_.ChangedDate -gt (Get-Date).AddDays(-30)} | out-file c:	emplistchangedreports.txt

...or after a certain date:

get-AXReport -reportname * | Select-Object Name, ChangedDate | Where{$_.ChangedDate -gt [datetime]::parse("26/08/2016")} | out-file c:	emplistchangedreports.txt

 

These post applies to following version:
Dynamics AX 2012

Add comment
 
 

 

 
 
 
Posts of the actual month
März 2024
MoTuWeThFrSaSu
 123
45678910
11121314151617
18192021222324
25262728293031
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.