SwapRowsAndLayers Method
Exchanges the positions of the Row objects and Layer objects.
Syntax
Report.SwapRowsAndLayers
Applies To
Discussion
Other methods exchange columns and layers, and rows and columns.
If you use this method on a report that does not have any layers, the rows will become layers and there will be no rows in the report.
References to the position of an object in the collection are not valid after you use this method.
Return Type
Nothing
Example
This example exchanges the positions of the rows and layers in an open report.
Sub Main()
Dim objPPRep as Object
Set objPPRep = GetObject(, "CognosPowerPlay.Report")
objPPRep.SwapRowsAndLayers
objPPRep.SaveAs "New Report.ppx"
Set objPPRep = Nothing
End Sub