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
  ELSE
      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

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi Mohana, How to do this for any other customize report.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete