BNCianciolo
Technical User
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.
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.