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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to fill multiple prompt windows in Imrpomptu

Status
Not open for further replies.

Xantix

IS-IT--Management
Sep 18, 2002
25
0
0
BE
Dear all,

I know how to pass prompt values to a "simple" Impromptu report using something like:

Set ImpRep = ObjImp.OpenReport("C:\reportfolder\Reportname.imr","prompt_answer_1|prompt_answer_2|prompt_answer_3_1,prompt_answer_3_2")

This works fine as long as there is only one prompt window.
I mean, when I use a report picklist in Impromptu, it first runs the prompt from that report picklist, I enter the correct prompt answers, it runs the report picklist and only then do I get the second prompt window (the one from the "main" report). I do not know how to fill these 2 prompt windows using a macro in Cognos Script.

Can someone help me?
 
All right,

I finally figured how to achieve this.
Here is the solution:
In the main report, the prompt is composed of 3 fields and the third one uses the report picklist (which also contains a prompt).
So even if, in Impromptu, the first prompt that shows is the prompt from the report picklist, it is not the same from the macro point of view, it goes like this:
The main prompt pops up, you enter the first 2 prompt answers and as the third one needs the report picklist, it is only then that the prompt from that picklist appears, and when it is answered you can finally fill in the third prompt from the main report, so my code now looks like this and it works:
Set ImpRep = ObjImp.OpenReport('C:\reportfolder\Reportname.imr','main_prompt_1|main_prompt_ _2|report_picklist_prompt|main_prompt_3').
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top