See Also

ActiveReport Class  | ActiveReport Members  | Detail.Format  | LayoutAction Enumeration

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

LayoutAction Property

Sets or returns a custom action following the rendering of the current record.

[Visual Basic]
Public Property LayoutAction As LayoutAction
[C#]
public LayoutAction LayoutAction {get; set;}

Return Type

Current layout action.   The default is LayoutAction.MoveLayout | LayoutAction.NextRecord | LayoutAction.PrintSection, which returns a value of 7.

Remarks

ActiveReports automatically performs the following actions for each record in the data source after each Detail section format:

  1. Prints the section.
  2. Moves the layout (sets the next print position for the rest of the report).
  3. Moves to the next record.

The LayoutAction property allows you to control which of these steps should be performed or omitted. Using a combination of layout actions when the report is executed can change a report's layout.

This property can be used only in the Detail section's Format event.

The following table shows the results of different combinations of LayoutActions

Value Print Layout NextR Description
7 True True True (Default) Move to next print location, get next record, and print data.
3 True True False Move to the next print location, don't advance to the next record, but print the data.
4 False False True Skip a record without leaving a blank space on the page.
6 False True True Skip a record and leave a blank space on the page.
2 False True False Leave a blank space without skipping a record.
5 True False True Print the next record on top of the current record (UnderlayNext).

Example

[C#] 

int counter=0;  
private void Detail_Format(object sender, System.EventArgs eArgs) 

    //repeat each row five times 
    counter = counter + 1;  
    if (counter <= 4)  
    {  
        this.LayoutAction =  LayoutAction.MoveLayout|LayoutAction.PrintSection;  
    }  
    else  
    {  
        this.LayoutAction = LayoutAction.MoveLayout|LayoutAction.NextRecord|LayoutAction.PrintSection;  
        counter = 0;  
    } 
}

[Visual Basic] 

Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.Format
    'repeat each row five times
    Static counter As Integer
    counter = counter + 1
    If counter <= 4 Then
        Me.LayoutAction = 3
    Else
        Me.LayoutAction = 7
        counter = 0
    End If
End Sub

See Also

ActiveReport Class  | ActiveReport Members  | Detail.Format  | LayoutAction Enumeration

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.