I implemented the code from the below mentioned link to print the RDLC report directly to the printer via C# windows application.
All went well till test phase, but in actual production phase, the end user don't have write permissions to any of folder (except user profile folders).
When they are trying to print, the process tries to create EMF file in the app folder and giving the access denied error.
Is there anyway I can overcome this.. Can we generate report layout in memory stream and directly send the stream to printer or can we specify the path to where the EMF file
will be created?
You can generate pdf file by programmatically and then you can print it.
search this code and emplment. It may be helpfull for you.
In the code that you used (in the MSDN article) the function CreateStream contains the path for saving the EMF files - you can change it from here.
private Stream CreateStream(string name,
string fileNameExtension, Encoding encoding,
string mimeType, bool willSeek)
Stream stream = new FileStream(@"..\..\" + name +
"." + fileNameExtension, FileMode.Create);
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?