Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

folder path of queryitems

Status
Not open for further replies.

kejalg

Technical User
Sep 14, 2003
12
0
0
IN
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top