I have 2 related Impromptu reports which I want to save as 2 different worksheets in the same Excel workbook; i.e., just one file with sheets 1 and 2. Can it be done?
This can be done through VB and VBA, but I'm not sure how you would do it exactly in Cognos Script.
In theory you could do the following:
Declare Excel as an Application
Run and save both reports in separate excel files.
Launch Excel and open both workbooks.
Copy the sheet from one of the workbooks into the other one.
Save and close Excel.
If you have VBA experience, the syntax should be pretty easy, if not, you're in for a longer haul but I think it could be done.
I am what I am based on the decisions I have made.
tommyfs,
Once again, MrDD is "on the money". I have a macro that, in one part, does exactly what he describes.
As an aside, if you create an impromptu report with a main and a sub report, then in Impromptu 7.3, save as Excel creates 2 worksheets in the same workbook. Can your two reports be merged into one?
Ahh, that's what I was after. Already tired of the cut and paste method, although it works. But the report & sub-report idea bears a look-see. Yes, my 2 reports are same data, different view, lending themselves perfectly to this method. Many thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.