LabelFontName Property
Syntax
object.LabelFontName
Applies To
Discussion
Use this property to determine the name of the font applied to a row, column, or layer label, especially for a crosstab that uses multiple fonts to emphasize specific categories. A report author may choose to use different fonts for category labels to make the report easier to read.
When you return the font name setting a row, column, or layer, the LabelFontName property applies to the active Report object only. The property does not apply to other reports in the Reports Collection. The default font name setting for the other reports remains unchanged, unless previously set in the application.
Default: Arial
Type
String
Access
Read
Example
This example returns the name of the font applied to the second row, third column, and first layer labels.
Sub Main()
Dim objPPRep as Object
Set objPPRep = CreateObject ("CognosPowerPlay.Report")
objPPRep.Open "C:\Cubes and Reports\Sample1.ppx"
MsgBox "The name of the font for the second row label
is " _
&objPPRep.Rows.Item(2).LabelFontName
MsgBox "The name of the font for the third column
label is " _
&objPPRep.Columns.Item(3).LabelFontName
MsgBox "The name of the font for the first layer label
is " _
&objPPRep.Layers.Item(1).LabelFontName
Set objPPRep = Nothing
End Sub