Hi,
I am new to Csharp and using C# for my application development and I need to load Cognos Impromptu application and run a report from my application automatically and run the report to create ascii text file. Is there any code is available? I have vb.net code but I do not know how to write it is in C#. If you have please send me, your help is really appreciated.
for your reference I am sending vb.net code, I need the below code in CSharp.
Call Cognos("C::AccountsPayable DOWNLOAD.IMR", "c:\APDownload.txt")
Function
Private Sub Cognos(ByRef StrReport As String, ByRef StrText As String)Dim objImpApp As New Object
Dim objImpRep As New Object
objImpApp = CreateObject("CognosImpromptu.Application")
'Open Impromptu catalog
objImpApp.OpenCatalog("C:\Program Files\cognos\cer5\Deltek\IMP74GCSP41\Catalog\All Tables.cat")
'Open the report that will be exported to text format
objImpRep = objImpApp.OpenReport(StrReport)
objImpRep = objImpApp.ActiveDocument
' objImpRep.ExportAscii(StrText, , -1)
objImpRep.ExportAscii(StrText, 0, -1, , 0)
objImpRep = Nothing
objImpApp = Nothing
MsgBox("Cognos Done")
End Sub
Thanks