Este es el codigo que manejo
Código:
Manejo IIS para Windows Server 2012 ReportDocument iReport = new ReportDocument(); ConnectionInfo iConnectionInfo = new ConnectionInfo(); iConnectionInfo.DatabaseName = "<Database>"; iConnectionInfo.UserID = "<UserId>"; iConnectionInfo.Password = "<Password>"; iConnectionInfo.ServerName = "<ServerName>"; iConnectionInfo.Type = ConnectionInfoType.SQL; iReport.Load(Server.MapPath("~/Reportes/rptF-DA-43.rpt")); SetLogoDBForReport(iConnectionInfo, iReport); crvReportes.SelectionFormula = "{PreInscripcion.IdPreInscripcion} = " + Convert.ToInt64(Request.Params["Id"].ToString()); iReport.OpenSubreport("rptCatalogoMaterias").RecordSelectionFormula = "{catalogo_materias.cuatrimestre} = '1' AND" + "{catalogo_materias.id_carrera} = '" + cmbCarreras.Value.ToString() + "'"; crvReportes.ReportSource = iReport; iReport.RecordSelectionFormula = "{PreInscripcion.IdPreInscripcion} = " + Convert.ToInt64(Request.Params["Id"].ToString()); iReport.PrintToPrinter(1, false, 0, 0);