Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I am impersonating and administrator logon for one of my visual basic.net applications. My problem comes in when I try to print the a report using the application, it keeps going to the default printer under the administrator account and not the user who is currently logged into the computer. I am working with Crystal Report 9.0, I am stopping the impersonation right before the print but it still goes to the administrator account for the default printer. How can I resolve this? Any help offered is greatly appreciated.
Posted

had the same problem a while back. i'm certain there's some option in crystal that can be set to fix this because it didn't happen to all my reports. however i could never find that option so i

 

System.Drawing.Printing.PrinterSettings printSettings= new System.Drawing.Printing.PrinterSettings();
string printerName = printSettings.PrinterName;
		
		
if(printerName!="")
{
     yourReportDoc.PrintOptions.PrinterName = printerName;
		
}
		
		
yourReportDoc.PrintToPrinter(1,false,0,0);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...