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!

Cognos Script Export with "<All=true>" method

Status
Not open for further replies.

BNCianciolo

Technical User
Jun 30, 2016
1
US
I have a macro that is supposed to export several files as .xlsx. Each file has three prompts: a picklist, start date, and end date. Here is my code for one of them:

dim objimpApp as object
dim objimpRep as object
dim strFileName as string
dim rptName as string
set objimpApp = getobject("cognosimpromptu.application")
objImpApp.OpenCatalog "FILEPATH", "Creator"
prompts = "<All=true>|<>" & startDate & "|<>" & endDate

rptName = "REPORTNAME"
Set objImpRep = objImpApp.OpenReportExa(rptPath & rptName & ".imr",prompts)
strFileName = savePath & companyName & "\" & companyName & " " & year & " " & rptName
objimpRep.exportexcelwithformat strFileName & ".xlsx"
objImpRep.CloseReport

"startDate" and "endDate" are both strings. I using using version 7.5. All of the files will save correctly, but they only contain the column headings. A few of the files will work correctly, but most are blank. What am I doing wrong? Any help is greatly appreciated.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top