Tuesday, 24 September 2013

Style Sheet Tool for Microsoft Dynamics NAV2013

The Style Sheet Tool for Microsoft Dynamics NAV2013 is available in Mibuso Downloads Section.

The Style Sheet Tool for Microsoft Dynamics NAV2013 enhances the Style Sheet feature in Microsoft Dynamics NAV 2013 by allowing you to easily and without programming knowledge create and modify style sheets in Microsoft Office Word.

Changes to Style Sheet tool for NAV 2013.

1.Multi-multiline support is added, so it is now possible to add several multiline records to the style sheet. Note though that records can not be indented, but added sequentially.

2.Setup page is modified to add Open/Save/Send options.

3.In NAV 2009, codeunit 50000 was released for automatic integration of the Style Sheet functionality with pages. Pages were then exported in xml format and modified by running codeunit 50000, to add style sheet actions.

This no longer works for NAV2013, as export /import of objects in xml format is no longer an option. Hence, adding Style Sheet Action (button) to each page must be done manually.

Follow the example below when adding the style sheet action to a page:

i. Add the action to the action designer (under appropriate group) with following properties:

Expanded Type SubType Name Caption
0 Action <Action680> Style Sheets

ii. OnAction trigger should contain following line:


where StyleSheetDataMgt is a variable of type codeunit, 682 (Style Sheet Data Management). 

Monday, 23 September 2013

Fixed No. of Lines in NAV 2013 RTC Reports

The Objectives of this video are:
 1.      Review a typical NAV 2013 reports preview.
 2.      Modify the report to show fixed No. of lines
 3.      Run the report to review the changes.

Please note that I have used Report 205 = Order Confirmation report in this demo.

The functions created in Visual Studio are

public Shared DocumentNo as Object
public Shared FixedLenth as integer
public Shared prevOutputNo as integer

Public Function SetDocLength(NewData as boolean,Group as object,Outputno as integer )
  If (NOT NewData) AND (prevOutputNo = OutputNo) AND (DocumentNo = Group) Then
      FixedLenth = FixedLenth + 1
      FixedLenth = 0
  End If
 DocumentNo = Group
 prevOutputNo = OutputNo
End Function

Public Function GetDocLength( ) As Integer
  Return FixedLenth
End Function

Expression Added in Invisible text box is

=Code.SetDocLength((Iif(Fields!Type_SalesLine.Value = " ", true, false)),Fields!No_SalesHeader.Value,Fields!OutputNo.Value)

You can also watch video at