Hello!
I am just preparing a report displayed on console and as well as stored on
a text file.
If the user wishes, console output is to be redirect to printer
If the user wishes, he can open the report file through C# application and
print it
The requirements you have sound like that you need probably two
applications: one for the console and one for the possible GUI (if I
understood you correctly). Displaying the report on the console is easy: you
just write the text you want using System.Console.WriteLine. Printing might
be possible using a simple redirect, or you could implement printing in the
GUI application only.
If you need to implement the same functionality in the console and GUI
applications, then you might want to use command-line parameters in the
console application to select whether you want to view or print, for
example. Of course, if the console application is to be interactive in
nature, then you can simply ask the user's input.
Hope this helps!
--
Regards,
Jani Järvinen
C# MVP
Vantaa, Finland
(e-mail address removed)