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.
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.