lmorgansky
IS-IT--Management
I am trying to create a simple PowerPlay macro that opens a report, changes in the dimension filter, and saves as a PDF. I have tried the simple example in the documentation, but I continue to get the error:
R440 "PowerPlay: The macro could not find the dimension matching passed code."
Here is the code:
Sub Main()
Dim objPPRep as Object
Set objPPRep = GetObject ("C:\test.ppr"
objPPRep.DimensionLine.Item("All Time".Change "2002/Apr"
msgbox(objPPRep.DimensionLine.Item("All Time".Name)
objPPRep.Close
Set objPPRep = Nothing
End Sub
The msgbox appropriately prints out the correct month that the report was last saved (2002/Jun). But the line before this fails.
I have tried both the source value (200204) and the Cognos category code value (20020401-20020430) as the Change parameter with no luck.
Any help is appreciated?
Thanks,
Lonnie
R440 "PowerPlay: The macro could not find the dimension matching passed code."
Here is the code:
Sub Main()
Dim objPPRep as Object
Set objPPRep = GetObject ("C:\test.ppr"
objPPRep.DimensionLine.Item("All Time".Change "2002/Apr"
msgbox(objPPRep.DimensionLine.Item("All Time".Name)
objPPRep.Close
Set objPPRep = Nothing
End Sub
The msgbox appropriately prints out the correct month that the report was last saved (2002/Jun). But the line before this fails.
I have tried both the source value (200204) and the Cognos category code value (20020401-20020430) as the Change parameter with no luck.
Any help is appreciated?
Thanks,
Lonnie