GrapeCity ActiveReports for .NET 12.0J
Item(String) プロパティ
使用例 

コレクション内でのFieldオブジェクトの名前。
FieldCollection内の指定した名前を持つFieldオブジェクトを取得します。
構文
'宣言
 
Public Overloads ReadOnly Property Item( _
   ByVal fieldName As String _
) As Field
public Field Item( 
   string fieldName
) {get;}

パラメータ

fieldName
コレクション内でのFieldオブジェクトの名前。
使用例
private void UnboundGrp_FetchData(object sender, GrapeCity.ActiveReports.SectionReport.FetchEventArgs eArgs)
{
    try
    {
        m_reader.Read();
        Fields["CategoryID"].Value = m_reader["categories.CategoryID"].ToString();
        Fields["CategoryName"].Value = m_reader["CategoryName"].ToString();
        Fields["ProductName"].Value = m_reader["ProductName"].ToString();
        Fields["UnitsInStock"].Value = m_reader["UnitsInStock"].ToString();
        Fields["Description"].Value = m_reader["Description"].ToString();
        Fields["TotalLabel"].Value = m_reader["CategoryName"].ToString() + "の数" + ":";
        eArgs.EOF = false;
    }
    catch
    {
        eArgs.EOF = true;
    }
    System.Windows.Forms.MessageBox.Show (this.Fields["Description"].Value.ToString());
}
Private Sub rptUnboundGrp_FetchData(ByVal sender As Object, ByVal eArgs As GrapeCity.ActiveReports.SectionReport. _
    FetchEventArgs) Handles MyBase.FetchData
  Try    m_reader.Read()
    Me.Fields("CategoryID").Value = m_reader("categories.CategoryID")
    Me.Fields("CategoryName").Value = m_reader("CategoryName")
    Me.Fields("ProductName").Value = m_reader("ProductName")
    Me.Fields("UnitsInStock").Value = m_reader("UnitsInStock")
    Me.Fields("Description").Value = m_reader("Description")
    Me.Fields("TotalLabel").Value = m_reader("CategoryName") + "の数" + ":"
    eArgs.EOF = False
  Catch ex As Exception
    System.Windows.Forms.MessageBox.Show(ex.ToString())
    eArgs.EOF = True
  End Try
  MsgBox(Me.Fields.Item("Description").Value.ToString)
End Sub
参照

関連項目

FieldCollection クラス
FieldCollection メンバ
オーバーロード一覧

 

 


Copyright © 2003 GrapeCity inc. All rights reserved.