Sunday, March 31, 2013

Print totals on last page of report

Sometime we want a requirement to print Totals on very last page of Morphx report instead of each page footer, I saw different blog and most of them just answered to use element.pagesTotal() method and use it on executeSection() method of footer section. But the problem is that element.pagesTotals() always return 0 when you called it explicitly. To overcome this issue and display totals on very last page declare a variable "lastPageNumber" of type int on class declaration section, then set the value of lastPageNumber = element.page(); in fetch() method just before the element.reset(true); call. I am refering SalesConfirmation report. Then on your footer Total section executeSection method write following logic to restrict the section to last page.

if (lastPageNumber == element.page())
{
    super();
} 

Sunday, September 9, 2012

Add ZipCode in Dynamics AX 2012

Claims-Based Flexible Authentication in Dynamics AX 2012

I had a scenario where we need to access the dynamics ax 2012 from external trusted user. Dynamics AX provide such a nice feature called Claims-Based Flexible Authentication in Dynamics AX 2012. Following article is very informative and helpful to implement this type of authentication.

http://community.dynamics.com/product/ax/axtechnical/b/axfortechies/archive/2012/05/01/claims-based-flexible-authentication-in-dynamics-ax-2012.aspx

Happy DAXing !!! 

Thursday, July 19, 2012

Display infolog in EP web part

To programmatically add messages to the Infolog, add the following namespace to your user control.

using Proxy = Microsoft.Dynamics.Framework.BusinessConnector.Proxy;

You can then add a message to the Infolog.

Proxy.Info objInfoLog = new Proxy.Info(this.AxSession.AxaptaAdapter);
objInfoLog.add(Proxy.Exception.Warning, "Hello World");