.NET viewer is a "zero-client" DHTML viewer (it's just HTML generated on the web server) and unlike the ActiveX viewer, which is installed on the client, cannot print to a client printer. The alternative is either to print from the web browser or to export report to PDF format and then print from the PDF plug-in (there has to be Adobe Acrobate on the client, otherwise the user will be prompted to download the file). Here is a sample code on how to export a report to PFD and display it in the web browser:
string sPDFTempDirPath = "C:\\WebReportPDFs\\";
string sPDFTempFilePath = sPDFTempDirPath + DateTime.Now.Ticks.ToString() + ".pdf";
ExportOptions oExOptions = new ExportOptions();
DiskFileDestinationOptions oDestOptions = new DiskFileDestinationOptions();
oExOptions = yourReport.ExportOptions;
oExOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
oExOptions.ExportDestinationType = ExportDestinationType.DiskFile;
if(!System.IO.Directory.Exists(sPDFTempDirPath))
{
System.IO.Directory.CreateDirectory(sPDFTempDirPath);
}
oDestOptions.DiskFileName = sPDFTempFilePath;
oExOptions.DestinationOptions = oDestOptions;
yourReport.Export();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.WriteFile(sPDFTempFilePath);
Response.Flush();
Response.Close();
System.IO.File.Delete(sPDFTempFilePath);