open Cognos impromptu file


C# Forum Moderator
Staff member
Apr 23, 2011
Sydney, Australia
Programming Experience
I've never used Cognos and don't know what an impromptu file is but I can tell you with a fair degree of confidence that there's nothing in C# to handle that type of file natively. If you want to open any file in its default application then you can simply call Process.Start and pass the file path as an argument. For example, passing the path of a DOC file to Process.Start will open it in Word, assuming Word is installed.

If that's not what you want but rather you want to display the contents of the file in your app then, unless there's some third-party control that exists for such files, you're going to have to write code specifically to read the data from the file and display it in an appropriate format in your app. What that entails depends on what the file contains. You're going to need an understanding of the format for a start. You can then read the contents as binary data, text, XML or the like and process it manually in your code.
Top Bottom