I am trying to Print out selection in a .ppr report. I can get the row selected, but the selection print setting doesn't seem to be work. Could someone take a look at the code. Thanks
Dim objPPRep As Object
Dim objRepPrt As Object
Set objPPRep = CreateObject("CognosPowerPlay.Report")
objPPRep.Open "C:\gaapcons.ppr"
objPPRep.Visible = True
Set objRepPrt = objPPRep.Print
objRepPrt.PrintAllCharts = False
objRepPrt.PrintEntireReport = False
objRepPrt.PrintPageLayout = False
objRepPrt.PrintSelectedDisplay = True
objPPRep.Rows.Item(1).Select
objPPRep.Rows.Item(2).Select
objRepPrt.SetListOfRowsToPrint objPPRep.Rows(1)
objRepPrt.SetListOfLayersToPrint objPPRep.Layers
objRepPrt.SetChartToPrint objPPRep.Graphs.Item(1)
objRepPrt.PrintOut
Set objRepPrt = Nothing
Set objPPRep = Nothing
I am using generic
Dim objPPRep As Object
Dim objRepPrt As Object
Set objPPRep = CreateObject("CognosPowerPlay.Report")
objPPRep.Open "C:\gaapcons.ppr"
objPPRep.Visible = True
Set objRepPrt = objPPRep.Print
objRepPrt.PrintAllCharts = False
objRepPrt.PrintEntireReport = False
objRepPrt.PrintPageLayout = False
objRepPrt.PrintSelectedDisplay = True
objPPRep.Rows.Item(1).Select
objPPRep.Rows.Item(2).Select
objRepPrt.SetListOfRowsToPrint objPPRep.Rows(1)
objRepPrt.SetListOfLayersToPrint objPPRep.Layers
objRepPrt.SetChartToPrint objPPRep.Graphs.Item(1)
objRepPrt.PrintOut
Set objRepPrt = Nothing
Set objPPRep = Nothing
I am using generic