Specifies whether the Field will be rendered in the report.
Namespace:
C1.C1ReportAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
[DefaultValueAttribute(true)] public bool Visible { get; set; } |
Visual Basic |
---|
<DefaultValueAttribute(True)> _ Public Property Visible As Boolean Get Set |
Remarks
The default value for this property is True.
Examples
The following codes uses the field's Visible property to create special effects. For example, if you created a new field called "BoxCtl" and formatted it to look like a bold rectangle around the product name, then you could change the script as follows:
Copy CodeVisual Basic
Dim script As String = _ "If UnitsInStock < ReorderLevel Then" & vbCrLf & _ "ProductNameCtl.ForeColor = RGB(255,0,0)" & vbCrLf & _ "ProductNameCtl.Font.Bold = True" & vbCrLf & _ "BoxCtl.Visible = False" & vbCrLf & _ "Else" & vbCrLf & _ "ProductNameCtl.ForeColor = RGB(0,0,0)" & vbCrLf & _ "ProductNameCtl.Font.Bold = False" & vbCrLf & _ "BoxCtl.Visible = True" & vbCrLf & _ "End If" c1r.Sections.Detail.OnPrint = script |
Copy CodeC#
string script = "if (UnitsInStock < ReorderLevel) then\r\n" + "ProductNameCtl.ForeColor = rgb(255,0,0)\r\n" + "ProductNameCtl.Font.Bold = true\r\n" + "BoxCtl.Visible = false\r\n" + "else\r\n" + "ProductNameCtl.ForeColor = rgb(0,0,0)\r\n" + "ProductNameCtl.Font.Bold = false\r\n" + "BoxCtl.Visible = true\r\n" + "endif"; c1r.Sections.Detail.OnPrint = script; |