If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

converting report from *.imr to *.iqd

Started by idanh, 03 Oct 2013 11:07:43 AM

Previous topic - Next topic

idanh

hello,

I have a folder with 20 imr file. I try to convert the whole files in this folder to iqd with macro.

my macro work until it get a report that have to get a prompt value. then it show me this error massage:
"prompt value are invalid or specifies for this report"
this is my macro so far:
----------------------------------------------------------------
Dim ImpAppObject as Object
Dim ImpRepObject as Object
Dim strPath as String
Dim strExtension as String
Dim strFolder as String
Dim PromptVal As String
Dim strPath1 as String

Sub Main()
strPath = "\\LIBI-SRVR\emun2001_LiBi\"
strFolder = dir("\\LIBI-SRVR\emun2001_LiBi\*.IMR")
strPath1 = "C:\Reports_To_Migrate\"
Set ImpAppObject = CreateObject("CognosImpromptu.Application")
ImpAppObject.Visible 0


Do While StrFolder <>""


Set ImpRepObject = ImpAppObject.OpenReport(strpath & strfolder)

strIQDFileName = Left$(ImpRepObject.FullName, Len(ImpRepObject.FullName) - 4)
ImpRepObject.ExportTransformer strIQDFileName & ".iqd"
ImpRepObject.CloseReport
strFolder = Dir

loop

ImpAppObject.Quit
Set ImpAppObject = Nothing
End Sub
------------------------------------------------------------------------------------------------------

so I try to remove the prompt of any reoport that have this with macro.
I also try to change the statment "OpenReport" to "Openreportnoexecute" but then the IQD file have SQL that not available.. and it's not what I looking for

how can I solved that???

note: it's have to be done by macro! I know how to solve it manually!

Grim

You'll have to provide the report(s) that contain prompts with actual prompt values, or remove the prompts.

Technote on using macro to provide prompt values
http://www-01.ibm.com/support/docview.wss?uid=swg21349362
"Honorary Master of IBM Links"- MFGF
Certified IBM C8 & C10 Admin, Gamer, Geek and all around nice guy.
<-Applaud if my rant helped! 8)

idanh

hey,
thank you for the respond

there are 3 problems with the solution you that offer to me in the attach link:
1. the user have to choose a value in every report.  so the process willl not be automatic like I want.
2. not all the report have the same type of promt value. like some of then are a date, other  are a name of workers.
3. not all the report have the same number of the promt value that we need to execute the report.

I  think the only way to solve this problem is to remove the prompts.
there is any way to remove the prompts by macro code?
if not- there is any other way to do it without open the report?