PowerTools ActiveReports for .NET 9.0J
LayoutAction プロパティ
使用例 

現在のレコードの描画後のカスタムアクションを取得または設定します。以下のアクションを制御できます。
構文
'宣言
 
Public Property LayoutAction As LayoutAction
public LayoutAction LayoutAction {get; set;}

プロパティ値

現在のレイアウトアクション。デフォルトはLayoutAction.MoveLayout | LayoutAction.NextRecord | LayoutAction.PrintSectionです。

解説

ActiveReportsは、Detailセクションのフォーマット後、データソースの各レコードに対して、以下のアクションを実行できます。

  1. セクションの出力。
  2. レイアウトの移動(残りのレポートの次の印刷位置を設定します)。
  3. 次のレコードに移動。

このプロパティでは、これらのアクションそれぞれに対して、実行するかしないかを制御できます。レポート実行時にレイアウトアクションを組み合わせて使用すると、レポートのレイアウトを変更できます。このプロパティは、DetailセクションのFormatイベントでのみ使用できます。

次の表は、さまざまな組み合わせにおける出力結果の一覧です。

出力 次レイアウト 次レコード 説明
7 True True True 次の出力位置へ移動し、次のレコードを取得してデータを出力(デフォルト)
3 True True False 次の出力位置へ移動し、同じレコードのままでデータを出力
4 False False True 現在の出力位置で次のレコードへ移動
6 False True True 次のレコードへ移動し、レコードを飛ばした部分をページ上で空白にする
2 False True False 次のレコードへ移動せずに空白を設定
5 True False True 次のレコードをカレントレコードの上に重ねて出力

使用例
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 =  GrapeCity.ActiveReports.LayoutAction.LayoutAction.MoveLayout|GrapeCity.ActiveReports.LayoutAction.LayoutAction.PrintSection; 
    } 
    else 
    { 
        this.LayoutAction = GrapeCity.ActiveReports.LayoutAction.LayoutAction.MoveLayout|GrapeCity.ActiveReports.LayoutAction.LayoutAction.NextRecord|GrapeCity.ActiveReports.LayoutAction.LayoutAction.PrintSection; 
        counter = 0; 
    }
}
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.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
参照

関連項目

SectionReport クラス
SectionReport メンバ
Format イベント
LayoutAction 列挙体

 

 


©2003-2015 GrapeCity inc. All rights reserved.