ActiveReports3 Request technical support
CanShrink Property
See Also  Example


Determines whether ActiveReports should decrease the height of the field based on its value.

Syntax

Visual Basic (Declaration) 
Public Property CanShrink As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SubReport
Dim value As Boolean
 
instance.CanShrink = value
 
value = instance.CanShrink
C# 
public bool CanShrink {get; set;}

Return Value

A Boolean value that determines the behavior. If False, ActiveReports does not change the height of the control based on the size of its content. If True, ActiveReports decreases the height of the control and shifts all controls below it to account for the decrease in height.

Example

C#Copy Code
private void detail_Format(object sender, System.EventArgs eArgs)
{
   
this.subReport1.CanGrow = true;
   
this.subReport1.CanShrink = false;
   
this.subReport1.ReportName = "Subreport1";

   ActiveReport rpt =
new rptSub1();
   
this.subReport1.Report = rpt;
}
Visual BasicCopy Code
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format
   Me.SubReport1.CanGrow = True
   Me.SubReport1.CanShrink = False
   Me.SubReport1.ReportName = "Subreport1"

   Dim rpt As New rptSub1()
   Me.SubReport1.Report = rpt
End Sub

Remarks

The decrease in height might cause the section height to decrease when the section's CanShrink property is set to True.  ActiveReports does not shift any controls below the shrinking control unless there are not intersecting controls along the shifting path.

See Also