private void rptPDF_Ingresos(String Reporte, object[] Parametros, string NombreReporte) { System.Web.UI.Page p = new System.Web.UI.Page(); CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); try { ConnectionInfo connectionInfo = new ConnectionInfo(); p = new System.Web.UI.Page(); report.Load(p.Server.MapPath("~") + "\\" + Reporte); for (int i = 0; i <= Parametros.Length - 1; i++) { report.SetParameterValue(i, Parametros[i]); } connectionInfo.ServerName = "dsia"; connectionInfo.UserID = "ingresos"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, report); report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, NombreReporte); } catch (Exception ex) { throw new Exception(ex.Message); } finally { CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); GC.Collect(); } }
private void rptPDFReferencia(String Reporte, String Nombre, String Referencia) { System.Web.UI.Page p = new System.Web.UI.Page(); CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); try { // ConnectionInfo connectionInfo = new ConnectionInfo(); //string J = System.AppDomain.CurrentDomain.BaseDirectory + Reporte; report.Load(p.Server.MapPath("~") + Reporte); //report.Load(System.AppDomain.CurrentDomain.BaseDirectory + Reporte); report.SetParameterValue(0, Referencia); report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "FichaReferenciada-" + Nombre.Substring(0, 15)); } catch (Exception ex) { } finally { CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); GC.Collect(); } }
private void rptPDF_Observaciones(String Reporte, Int32 Ejercicio, String Usuario) { try { ConnectionInfo connectionInfo = new ConnectionInfo(); p = new System.Web.UI.Page(); report.Load(p.Server.MapPath("~") + "\\" + Reporte); report.SetParameterValue(0, Ejercicio); report.SetParameterValue(1, Usuario); report.PrintOptions.PaperSize = PaperSize.PaperLegal; connectionInfo.ServerName = "dsia"; connectionInfo.UserID = "pifi"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, report); report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "ProyectosPIFI"); } catch (Exception ex) { } finally { CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); } }
private void rptCheque(String Reporte, Int32 IdMovimiento) { try { ConnectionInfo connectionInfo = new ConnectionInfo(); p = new System.Web.UI.Page(); report.Load(p.Server.MapPath("~") + "\\" + Reporte); report.SetParameterValue(0, IdMovimiento); report.PrintOptions.PaperSize = PaperSize.PaperLetter; connectionInfo.ServerName = "dsia"; //connectionInfo.DatabaseName = "pifi"; connectionInfo.UserID = "pifi"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, report); report.ExportToHttpResponse(ExportFormatType.Excel, Response, false, "ProyectosPIFI"); } catch (Exception ex) { } finally { CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); //clsRepPolizayCheque cheque = new clsRepPolizayCheque(); //cheque.ActualizaStatusCheque(IdMovimiento, lblMsgError); } }
private void rptExcelSiga09(String Reporte, Int32 Anio, Int32 Quincena, string TPersonal, string Concepto) { try { ConnectionInfo connectionInfo = new ConnectionInfo(); p = new System.Web.UI.Page(); report.Load(p.Server.MapPath("~") + "\\" + Reporte); report.SetParameterValue(0, Anio); report.SetParameterValue(1, Quincena); report.SetParameterValue(2, TPersonal); report.SetParameterValue(3, Concepto); report.PrintOptions.PaperSize = PaperSize.PaperLetter; connectionInfo.ServerName = "dsia"; connectionInfo.UserID = "pifi"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, report); } catch (Exception ex) { } finally { CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); } }
private void rptPDFSiga09(String Reporte, Int32 Anio, Int32 Quincena, string TPersonal) { try { ConnectionInfo connectionInfo = new ConnectionInfo(); p = new System.Web.UI.Page(); report.Load(p.Server.MapPath("~") + "\\" + Reporte); report.SetParameterValue(0, Anio); report.SetParameterValue(1, Quincena); report.SetParameterValue(2, TPersonal); report.PrintOptions.PaperSize = PaperSize.PaperLetter; connectionInfo.ServerName = "dsia"; //connectionInfo.DatabaseName = "pifi"; connectionInfo.UserID = "pifi"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, report); report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "Siga09"); } catch (Exception ex) { } finally { CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); } }
private void rptPDFSiga09FoliosCheques(String CveReporte, String TipoPago, Int32 CP_Ini, Int32 CP_Fin, string TipoFolios, Int32 NumNomina, string Reporte) { try { ConnectionInfo connectionInfo = new ConnectionInfo(); p = new System.Web.UI.Page(); report.Load(p.Server.MapPath("~") + "\\" + Reporte); report.SetParameterValue(0, NumNomina); report.SetParameterValue(1, TipoPago); report.SetParameterValue(2, CP_Fin); report.SetParameterValue(3, CP_Ini); report.SetParameterValue(4, TipoFolios); report.PrintOptions.PaperSize = PaperSize.PaperLetter; connectionInfo.ServerName = "dsia"; connectionInfo.UserID = "pifi"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, report); report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "Siga09"); } catch (Exception ex) { } finally { CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); } }
private void rptPDFAdjunto(String Reporte, String Nombre, String Referencia, Double Importe, String Vigencia, String Concepto, String Observaciones) { System.Web.UI.Page p = new System.Web.UI.Page(); CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); try { // ConnectionInfo connectionInfo = new ConnectionInfo(); //string J = System.AppDomain.CurrentDomain.BaseDirectory + Reporte; report.Load(p.Server.MapPath("~") + Reporte); //report.Load(System.AppDomain.CurrentDomain.BaseDirectory + Reporte); report.SetParameterValue(0, Nombre); report.SetParameterValue(1, Referencia); report.SetParameterValue(2, Importe); report.SetParameterValue(3, Vigencia); report.SetParameterValue(4, Concepto); report.SetParameterValue(5, Observaciones); report.PrintOptions.PaperSize = PaperSize.PaperLetter; //connectionInfo.ServerName = "ucad"; //connectionInfo.UserID = "ingresos"; //connectionInfo.Password = "******"; //SetDBLogonForReport(connectionInfo, report); string archivo = p.Server.MapPath("~") + "/ArchivoReferencia/Referencia - " + Referencia + ".PDF"; //report.SaveAs(archivo); report.ExportToDisk(ExportFormatType.PortableDocFormat, archivo); // "FichaReferenciada-" + Nombre.Substring(0, 15)); //report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "Referencia - " + Referencia); } catch (Exception ex) { } finally { CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); GC.Collect(); } }
private void rptReporte_FE(String Reporte, object[] Valores) { System.Web.UI.Page p = new System.Web.UI.Page(); CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); try { ConnectionInfo connectionInfo = new ConnectionInfo(); p = new System.Web.UI.Page(); report.Load(p.Server.MapPath("~") + "\\" + Reporte); for (int i = 0; i <= Valores.Length - 1; i++) { report.SetParameterValue(i, Valores[i]); } report.PrintOptions.PaperSize = PaperSize.PaperLetter; connectionInfo.ServerName = "dsia"; connectionInfo.UserID = "felectronica"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, report); report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "RepComprobanteFiscal"); //CR_Reportes.ReportSource = report; //report.Close(); //report.Dispose(); } catch (Exception ex) { } finally { //CR_Reportes.Dispose(); CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); GC.Collect(); } }
private void rptPDF2(String Reporte, string Evento, string Matricula) { ConnectionInfo connectionInfo = new ConnectionInfo(); System.Web.UI.Page p = new System.Web.UI.Page(); CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); try { report.Load(p.Server.MapPath("~") + Reporte); report.SetParameterValue(0, Matricula); report.SetParameterValue(1, Evento); report.PrintOptions.PaperSize = PaperSize.PaperLetter; connectionInfo.ServerName = "dsia"; connectionInfo.UserID = "ingresos"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, report); report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "FichaReferenciada"); //CR_Reportes.ReportSource = report; //report.Close(); //report.Dispose(); } catch (Exception ex) { } finally { //CR_Reportes.ReportSource = report; //CR_Reportes.Dispose(); CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); CR_Reportes.Dispose(); GC.Collect(); } }