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

Impr 6, CloseReport causes Runtime Error

Status
Not open for further replies.

ahstyx

Technical User
Mar 13, 2002
15
0
0
DE
Hello,

because of older posts in this forum I try to save an Impromptu 6 report with formats (depending on the boolean variable format) using the following code:

Set bericht = impromp.OpenReport(pathImp)
If format = False Then
bericht.exportexcel (pathXls)

Else
SendKeys "%D", 10000
SendKeys "U", 10000
SendKeys "{TAB}", 10000
SendKeys "{DOWN 8}", 10000
SendKeys "{ENTER}", 10000
SendKeys "+{TAB}", 1000
SendKeys "Test.xls", 1000
SendKeys "{ENTER}", 10000
SendKeys "{TAB}", 10000
SendKeys "{ENTER}", 10000
'SendKeys "{ENTER}", 10000

End If

bericht.CloseReport

Set bericht = Nothing
(Don't mind the specific letters at the SendKeys instructions. It's the german version.)
The CloseReport-instruction causes problems. But only if the SendKeys-part is used. With the exportExcel it works without any problems and the report ist closed correctly.

The error message is the following:
Microsoft Visual C++ Runtime Library
Runtime Error!
Program:C:\Programme\Cognos\...\ImpAdmin.exe
R6025
-pure virtual function call

Thanks in advance for any help to avoid this error or other tips to close the report after exporting.

Best regards,
Andreas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top