PrintColorsAsPatterns Property

Sets or returns whether colors print as patterns or as colors.

Syntax

Print.PrintColorsAsPatterns

Applies To

Print Object

Discussion

If True, colors print as patterns. If False, colors print as they appear (if you have a color printer).

Default: False

Type

Boolean

Access

Read/Write

Example

This example opens a report and prints one copy of all displays in the report including all rows and layers. It also includes the legend, prints colors as patterns, and turns on the collating option.

Sub Main()
   Dim objPPRep as Object
   Dim objRepPrt as Object
   Set objPPRep = CreateObject("CognosPowerPlay.Report")
   objPPRep.Open "C:\Cubes and Reports\Sample2.ppx"
   Set objRepPrt = objPPRep.Print
   objRepPrt.PrintAllCharts = False
   objRepPrt.SetListOfRowsToPrint objPPrep.Rows
   objRepPrt.SetListOfLayersToPrint objPPRep.Layers
   objRepPrt.SetChartToPrint objPPRep.Graphs.Item(2)
   objRepPrt.IncludeLegend = True
   objRepPrt.PrintColorsAsPatterns = True
   objRepPrt.ChartTitleOnAllPages = True
   objRepPrt.SummariesOnAllPages = True
   objRepPrt.AxisOnAllPages = True
   objRepPrt.Collate = True
   objRepPrt.Copies = 1
   objRepPrt.PrintOut
   Set objRepPrt = Nothing
   Set objPPRep = Nothing
End Sub

Related Topics