Monday, September 21, 2015

Publish-AxReport parameters

Publish-AXReport

Deploys reports from Microsoft Dynamics AX to a Microsoft SQL Server Reporting Services instance.

Syntax

Parameter Set: Default
Publish-AXReport -Id <String> [-ModifiedAfter <DateTime> ] [-ReportName <String> ] [-RestartReportServer] [-ServicesAOSName <String> ] [-ServicesAOSWSDLPort <Int32> ] [-ServicesFilePath <String> ] [-SkipDeletingExistingReport] [-SkipReportServerAdminCheck] [ <CommonParameters>]

Detailed description

The Publish-AXReport cmdlet deploys reports from Microsoft Dynamics AX to a Reporting Services instance. By default, previously deployed report metadata is deleted and replaced when reports are deployed.

Parameters

-Id<String>

Specifies the identifier of the configuration to use to connect Microsoft Dynamics AX and Reporting Services.

Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ModifiedAfter<DateTime>

Limits the reports to be deployed to those modified after a specified date. Use the date format specified by your operating system. If you do not know the format, you can run the Get-AXReport cmdlet to see the format of ChangedDate.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ReportName<String>

Specifies the names of the reports to be deployed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-RestartReportServer

Forces the Reporting Services service to restart after a report is deployed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesAOSName<String>

Specifies the name of a Microsoft Dynamics AX Application Object Server (AOS) instance to connect to instead of the default value.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesAOSWSDLPort<Int32>

Specifies the web service (WSDL) port of an AOS instance to connect to instead of the default value.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesFilePath<String>

Specifies a client configuration parameter file (.axc) to use instead of the configuration that is stored in the registry.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-SkipDeletingExistingReport

Specifies that the cmdlet should not delete existing report design metadata when executed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-SkipReportServerAdminCheck

Specifies that the cmdlet should be executed without checking whether the user has administrator rights on Reporting Services.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see about_CommonParameters http://go.microsoft.com/fwlink/?LinkID=113216

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.
  • None

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.
  • None

    The cmdlet does not generate any output.

Examples

This example publishes reports whose names start with CustomReports and that were modified after October 10, 2011 to the report server configuration ReportServer01, and then forces the server to restart.

C:\PS>Publish-AXReport -Id ReportServer01 -ModifiedAfter 2011-10-10 -ReportName CustomReports* -RestartReportServer

Source: https://msdn.microsoft.com/en-us/library/jj720262.aspx



Deploy report to a specific AOS instance

Publish-AXReport –ReportName * -id AXSSRS –servicesAOSname AXServer –servicesAOSWSDLPort 8101

Here AXSSRS is the SSRS configurationID name and AXServer is the system name not AOS name.

Thursday, September 10, 2015

Add KPI to Role Center AX2012

It's easy to add KPI/Indicators to the Role Centers but it's a time consuming & tiring task to add multiple KPI/Indicators to the role center. But today I have found out a quick way to do so.

Firstly just add a KPI web part to the role center page.
Go to the Page Definition in AOT, right click on it and click "View Code". Then add a small piece of code just after the ending line of KPI webpart code:

&lt;ArrayOfIndicator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;

After the above line add the below given code and change the Cube name & Indicator Name or other required properties of the KPI accordingly. Most importantly change the Id for every KPI.

&lt;Indicator&gt;
    &lt;Id&gt;ae413b36-9f55-40d5-ae21-a8d3ceaa83cc&lt;/Id&gt;
    &lt;CubeName&gt;General ledger cube&lt;/CubeName&gt;
    &lt;MeasureName&gt;Accounts receivable turnover&lt;/MeasureName&gt;
    &lt;DisplayTitle /&gt;
    &lt;SliceDimensionAttribute /&gt;
    &lt;TimePeriodsName /&gt;
    &lt;RolePlayingTimeDimension /&gt;
    &lt;ReportPath /&gt;
    &lt;ValueType&gt;Amount&lt;/ValueType&gt;
    &lt;IsDecreasingBetter&gt;false&lt;/IsDecreasingBetter&gt;
    &lt;Visible&gt;true&lt;/Visible&gt;
    &lt;IsValid&gt;true&lt;/IsValid&gt;
    &lt;EnableFilters&gt;false&lt;/EnableFilters&gt;
    &lt;DateFilters&gt;
      &lt;DateFilterItem&gt;
        &lt;DateTimeDimension&gt;Acknowledgement date&lt;/DateTimeDimension&gt;
        &lt;TimePeriod&gt;Current_KPI&lt;/TimePeriod&gt;
      &lt;/DateFilterItem&gt;
    &lt;/DateFilters&gt;
    &lt;NonDateFilters /&gt;
    &lt;ReportClientMenuItem /&gt;
    &lt;ReportWebMenuItem /&gt;
    &lt;CompareMeasureName /&gt;
    &lt;CompareMeasureCaption /&gt;
    &lt;SplitOrder&gt;Top&lt;/SplitOrder&gt;
    &lt;NonEmpty&gt;true&lt;/NonEmpty&gt;
    &lt;SplitCount&gt;10&lt;/SplitCount&gt;
  &lt;/Indicator&gt;

Wednesday, September 9, 2015

Ax2012 Number Sequence with year

Source:

http://dev.goshoom.net/en/2013/10/year-in-number-sequence/

Reset Number sequence Ax2012

Whenever you need to reset the number sequence in AX2012 you can use the below job code. You just need to pass the company name for which you want to reset.

static void resetNumSeq(Args _args)
{
    NumberSequenceTable numseqtab;
    info(curext());
    changecompany ('test')
    {
        ttsbegin;
        while select forupdate numseqtab
        {
            numseqtab.NextRec = numseqtab.Lowest;
            numseqtab.update();
        }
        ttscommit;
    }
}

Monday, September 7, 2015

Dynamics AX client crashing/closing automatically

Today I faced a very weird issue where Dynamics Ax client was getting closed just after displaying the splash screen. I thought maybe the client is corrupt so I tried reinstalling the Ax client but it didn't work.

I even tried clearing the AUC files, restarting AOS, restarting server but all went vain. And then I noticed that a windows service named "User Access Logging Service" was in stopped state. So I restarted it and things started working perfectly.

As the service was stopped so AX wasn't able to authenticate the user trying to login.

Install Sharepoint on non server machine

If you want to install Sharepoint on a non server OS i.e. Windows 7, Windows 8 then you can use below mentioned methods:

Sources:
http://www.disruptivei.com/Blogg/Inl%C3%A4gg/6/Install-SharePoint-2013-on-Windows-7-8-8-1

http://www.codeproject.com/Articles/155805/Install-Sharepoint-2010-in-a-non-Server-OS