Gets or sets the Section height, in twips.
Namespace:
C1.C1ReportAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
[DefaultValueAttribute()] public double Height { get; set; } |
Visual Basic |
---|
<DefaultValueAttribute()> _ Public Property Height As Double Get Set |
Remarks
The height of a section should be large enough to accommodate all fields in the section.
The Report Designer automatically adjusts section heights when fields are added, moved, or resized.
The default value for this property is 0.
Examples
When you add a field to a section's Fields collection, the field is automatically assigned to the section that owns the collection. For example, the code below adds a field to the Detail section:
Copy CodeVisual Basic
c1r.Sections.Detail.Fields.Add("new field", "CompanyLogo", rc) |
Copy CodeC#
c1r.Sections.Detail.Fields.Add("new field", "CompanyLogo", rc); |
The following code ensures that a section is tall enough to accommodate all of the fields it contains:
Copy CodeVisual Basic
' get section object Dim s As Section = c1r.Sections(SectionTypeEnum.Detail) ' scan all its fields Dim f As Field For Each f In s.Fields ' get field bottom Dim h As Double = f.Top + f.Height ' make sure section is tall enough for the field If h > s.Height Then s.Height = h + 200 End If Next |
Copy CodeC#
// get section object Section s = c1r.Sections[SectionTypeEnum.Detail]; // scan all its fields Field f; foreach (f In s.Fields) // get field bottom double h = f.Top + f.Height; // make sure section is tall enough for the field if (h > s.Height) s.Height = h + 200; |