Sets or returns a custom action following the rendering of the current record.
| Visual Basic (Declaration) | |
|---|---|
Public Property LayoutAction As LayoutAction | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public LayoutAction LayoutAction {get; set;} | |
Return Value
Current layout action. The default is LayoutAction.MoveLayout | LayoutAction.NextRecord | LayoutAction.PrintSection, which returns a value of 7.
- PrintSection has a value of 1.
- MoveLayout has a value of 2.
- NextRecord has a value of 4.
| C# | Copy Code |
|---|---|
int counter=0; | |
| Visual Basic | Copy Code |
|---|---|
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format | |
ActiveReports automatically performs the following actions for each record in the data source after each Detail section format:
- Prints the section.
- Moves the layout (sets the next print position for the rest of the report).
- 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 | 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). |