Can anybody tell why the following piece of code is not returning the folder path all the time. For some reports I get the folder path, for some reports, I don't.
thanks
kejalg
sub main()
Dim objApp as Object
Dim objCat as Object
Dim objRep as Object
Dim objQry as Object
Dim objFolder as Object
Dim i as integer
Dim StrCol , StrFol as String
Set objApp = GetObject("CognosImpromptu.Application"
Set objCat = objApp.ActiveCatalog
Set objRep = objApp.ActiveDocument
Set objQry = objRep.QueryItems
Set objFolder = objCat.folders
StrFol = "Folders Count = " & objFolder.Count & chr$(13) & chr$(13)
for i = 1 to objFolder.count
strFol = strFol & objFolder(i).name & chr$(13) ' & " | " & objFolder(i).name.formulaEx &
next i
strCol = "Report Columns Count = " & objQry.Count & chr$(13) & chr$(13)
For i = 1 to objQry.Count
strCol = strCol & chr$(13) & objQry(i).name & chr$(13) & objQry(i).folderpath & chr$(13)
Next i
'msgbox strFol
msgbox strCol
end sub
thanks
kejalg
sub main()
Dim objApp as Object
Dim objCat as Object
Dim objRep as Object
Dim objQry as Object
Dim objFolder as Object
Dim i as integer
Dim StrCol , StrFol as String
Set objApp = GetObject("CognosImpromptu.Application"
Set objCat = objApp.ActiveCatalog
Set objRep = objApp.ActiveDocument
Set objQry = objRep.QueryItems
Set objFolder = objCat.folders
StrFol = "Folders Count = " & objFolder.Count & chr$(13) & chr$(13)
for i = 1 to objFolder.count
strFol = strFol & objFolder(i).name & chr$(13) ' & " | " & objFolder(i).name.formulaEx &
next i
strCol = "Report Columns Count = " & objQry.Count & chr$(13) & chr$(13)
For i = 1 to objQry.Count
strCol = strCol & chr$(13) & objQry(i).name & chr$(13) & objQry(i).folderpath & chr$(13)
Next i
'msgbox strFol
msgbox strCol
end sub