VSView Reporting Edition Reference > VSReport Control > VSReport Properties > Font Property |
Returns or sets the default font for new fields.
[form!]VSReport.Font[ = Font ]
The Font property is not used directly when rendering the report. It is used as the default font for new fields.
For example, the code below adds four fields to the report. The font for the first two fields is 9pt Arial, and for the last two it is 12pt Tahoma:
vsr.Font.Name = "Arial"
vsr.Font.Size = 9
vsr.Fields.Add "New1", "Hello", 0, 0, 1000, 300
vsr.Fields.Add "New2", "World", 1000, 0, 1000, 300
vsr.Font.Name = "Tahoma"
vsr.Font.Size = 12
vsr.Fields.Add "New3", "Hello", 0, 3000, 1000, 300
vsr.Fields.Add "New4", "World", 1000, 3000, 1000, 300
You can change the field's font after it's been created using the field's own Font property:
vsr.Fields("New1").Font.Size = 24
Font