ActiveReports6 Assembly > DataDynamics.ActiveReports Namespace > TextBox Class : OutputFormat Property |
The formatting mask can only be used to format numbers and dates. There is no support for formatting alphanumeric strings.
Setting the OutputFormat in the Format event of a control's section does not catch the first record. The reason for this behaviour is that the database values are applied to the the control BEFORE the Format event. If you change the OutputFormat in the Format event, set Control.Value=Control.Value so that the OutputFormat gets reapplied.
The OutputFormat property of the TextBox control includes four sections delimited by a semicolon. Each section contains the format specifications for a different type of number:
private void detail_Format(object sender, System.EventArgs eArgs) { this.txtShippedDate.OutputFormat = "MMMM"; this.txtShippedDate.Value = this.txtShippedDate.Value; }
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format Me.txtShippedDate.OutputFormat = "MMMM" Me.txtShippedDate.Value = Me.txtShippedDate.Value End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2