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

Can not pass prompts values to hotfile(.imr) through macro

Status
Not open for further replies.

dm21

Programmer
Feb 6, 2003
74
CA
Hi

I am trying to open a hotfile (imr type) through macro by passing prompt values. OpenReport property opens the report but does not accept prompt values. It opens the prompt window.

If I try to open the regular report the sameway it works fine.

Does anybody have idea on this issue?
 
dm21,

I think you do not use the correct parameters/syntax, send the macro so i can look at it.

Greetz,

Christenhusz
 
Thanks for your response.

The code I am using to open the hot file is as follows:

Sub Main()
Dim objImpApp As Object
Dim objImpRep As Object
Dim strReport As String
Dim strPromptValue As String

Set objImpApp = GetObject("CognosImpromptu.Application")

strReport = "c:\temp\test.imr"
strPromptValue = "27" & "|" & "4" & "|" & "2003-01-01"

Set objImpRep = objImpApp.OpenReport (strReport , strPromptValue )

End Sub


My original report is using the same parameter if I open the original report from this macro it opens fine with no problem.

 
dm21,

Are ALL of the hotfile report's prompts string prompts? They have to be in order for this to work.

Regards,

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ20-2863 first!
 
Yes they are all string and I have put them in same order.

Say test1.imr is my original report where I have three prompts Salesteam, Unit and Date they are all string.
I call test1.imr through macro, I don't have any promblems opening it, it accepts the values for prompts properly.

test.imr is created from test1.imr using it as a hot file.
When I open test.imr, it prompts for the same prompts from test1.imr. But through macro it does not accept the prompt values passed.
 
If I were you, I would try making two of the prompts into constants, and try passing the prompts one at a time to see if I could isolate which one (if any) was causing the problem. If all cases of a single prompt are causing the same problem, then it's time for a call to Cognos technical support.

Regards,

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ20-2863 first!
 
I tried with single prompt. I am having the same issue. I have contacted Cognos Technical support. I hope they will be of any help.

Thanks.
 
dm21,

Please post their suggestions as well as whether you have any luck with it for the rest of the Tek-Tips users.

Thanks,

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ20-2863 first!
 
Dave,

Cognos think that it is a bug which they will fix in future.

The workaround I am doing is inserting data into physical table through stroed procedure and report from table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top