private void rptPDFAdjunto(String Reporte, String Nombre, String Referencia, String 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 { report.Load(p.Server.MapPath("~") + 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; string archivo = p.Server.MapPath("~") + "/ArchivoReferencia/Referencia - " + Referencia + ".PDF"; report.ExportToDisk(ExportFormatType.PortableDocFormat, archivo); // "FichaReferenciada-" + Nombre.Substring(0, 15)); } catch (Exception ex) { lblMensajeCorreo.Text = ex.Message; } finally { //CR_Reportes.ReportSource = report; report.Close(); report.Dispose(); //CR_Reportes.Dispose(); } }
private void cmdExcel_Click(object sender, System.EventArgs e) { string sFileName = ""; try { SaveFileDialog SaveFileDlg = new SaveFileDialog(); SaveFileDlg.Title = "VSS-->Save to Excel file"; SaveFileDlg.Filter = "Excel files|*.XLS"; if (SaveFileDlg.ShowDialog() == DialogResult.OK) { sFileName = SaveFileDlg.FileName; if (sFileName.Contains(".XLS")) { } else { sFileName += ".XLS"; } this.Text = "Đang lưu dữ liệu ra file: " + sFileName; RptDoc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.Excel, sFileName); this.Text = "In dữ liệu"; if (Utility.AcceptQuestion("Đã xuất dữ liệu thành công ra file Excel ở đường dẫn: " + sFileName + Constants.vbCrLf + "Bạn có muốn mở file Excel ra xem không?", "Thông báo", true)) { System.Diagnostics.Process.Start(sFileName); } } } catch (Exception ex) { } }
protected void generarrpt(object sender, EventArgs e) { string select = "SELECT MEMP.MEMP_CODIEMPL,MNIT.MNIT_NOMBRES,MNIT.MNIT_NOMBRE2,MNIT.MNIT_APELLIDOS,MNIT.MNIT_APELLIDO2,MNIT.MNIT_DIGITO,MNIT.MNIT_DIRECCION,MNIT.MNIT_EMAIL,MNIT.MNIT_TELEFONO,MNIT.MNIT_CELULAR, MEMP.MEMP_FECHNACI,PCIU.PCIU_NOMBRE,MNIT.MNIT_NIT,MNIT.MNIT_DIGITO,MEMP.MEMP_NUMELIBRMILI,MEMP.MEMP_CLASELIBRMILI,DBXSCHEMA.TSEXO.TSEX_NOMBRE,YEAR(CURRENT DATE) - YEAR(MEMP.MEMP_FECHNACI),MEMP.MEMP_NUMEHIJOS,MEMP.TRES_VIVIENDA,MEMP.MEMP_FECHINGRESO,MEMP.MEMP_SUELACTU,MEMP.MEMP_SUELANTER,TCON.TCON_NOMBRE,TSUBT.TSUB_NOMBRE, PDEPTO.PDEP_NOMBDPTO,TESTEMP.TEST_NOMBRE,DBXSCHEMA.TFORMAPAGO.TFOR_DESCRIPCION,DBXSCHEMA.PBANCO.PBAN_NOMBRE,MEMP.MEMP_CUENNOMI,DBXSCHEMA.PEPS.PEPS_NOMBEPS,DBXSCHEMA.PARP.PARP_NOMBARP,PFCESA.PFON_NOMBFOND,PFPENS.PFON_NOMBPENS,DBXSCHEMA.TRETEFTE.TEST_DESCRIPCION, MEMP.MEMP_PORCRETE,TSANGRE.TTIP_TIPOSANG ,PCAR.pcar_nombcarg,TCIVIL.test_nombre,MEMP.memp_fecsuelanter,memp_peripago,TPAGO.TPER_DESCP,TFPAGO.tfor_descripcion,MEMP.memp_cuennomi,PFPENS2.pfon_nombpens as pensvol"; string from = " FROM DBXSCHEMA.MEMPLEADO MEMP,DBXSCHEMA.MNIT MNIT,DBXSCHEMA.PCIUDAD PCIU,DBXSCHEMA.TSEXO,DBXSCHEMA.TCONTRATONOMINA TCON,DBXSCHEMA.TSUBSIDIOTRANSPORTE TSUBT ,DBXSCHEMA.PDEPARTAMENTOEMPRESA PDEPTO,DBXSCHEMA.TESTADOEMPLEADO TESTEMP, DBXSCHEMA.TFORMAPAGO,DBXSCHEMA.PBANCO,DBXSCHEMA.PEPS,DBXSCHEMA.PARP,DBXSCHEMA.PFONDOPENSION PFPENS,DBXSCHEMA.PFONDOPENSION PFPENS2, DBXSCHEMA.PFONDOCESANTIAS PFCESA,DBXSCHEMA.TRETEFTE,DBXSCHEMA.TTIPOSANGRE TSANGRE,DBXSCHEMA.PCARGOEMPLEADO PCAR,dbxschema.testadocivil TCIVIL,dbxschema.TPERIPAGO TPAGO,DBXSCHEMA.TFORMAPAGO TFPAGO"; string where = " WHERE MEMP.MEMP_CODIEMPL='" + DDLEMPLEADO.SelectedValue + "' AND PFPENS.pfon_codipens=MEMP.pfon_codipens AND PFPENS2.pfon_codipens=MEMP.pfon_codipensvolu AND TFPAGO.tfor_pago=memp.memp_formpago AND TPAGO.tper_peri=MEMP.memp_peripago AND TCIVIL.test_estacivil=memp.test_estacivil AND MEMP.PCAR_CODICARGO=PCAR.PCAR_CODICARGO AND MEMP.MNIT_NIT=MNIT.MNIT_NIT and memp.ttip_secuencia= TSANGRE.ttip_secuencia AND MEMP.PCIU_LUGANACI=PCIU.PCIU_CODIGO AND MEMP.TSEX_CODIGO=DBXSCHEMA.TSEXO.TSEX_CODIGO AND MEMP.TCON_CONTRATO= TCON.TCON_CONTRATO AND MEMP.TSUB_CODIGO=TSUBT.TSUB_CODIGO AND MEMP.PDEP_CODIDPTO= PDEPTO.PDEP_CODIDPTO AND MEMP.TEST_ESTADO= TESTEMP.TEST_ESTADO AND MEMP.MEMP_FORMPAGO=DBXSCHEMA.TFORMAPAGO.TFOR_PAGO AND MEMP.PBAN_CODIGO=DBXSCHEMA.PBANCO.PBAN_CODIGO AND MEMP.PEPS_CODIEPS=DBXSCHEMA.PEPS.PEPS_CODIEPS AND MEMP.PARP_CODIARP=DBXSCHEMA.PARP.PARP_CODIARP AND MEMP.PFON_CODICESA=PFCESA.PFON_CODIFOND AND MEMP.MEMP_TESTRETE=DBXSCHEMA.TRETEFTE.TEST_RETE"; string nomEmpleado = DBFunctions.SingleData("SELECT NOMBRE FROM VMNIT VM, MEMPLEADO ME WHERE VM.MNIT_NIT = ME.MNIT_NIT AND ME.MEMP_CODIEMPL = '" + DDLEMPLEADO.SelectedValue + "'"); DataSet ds = new DataSet(); DBFunctions.Request(ds, IncludeSchema.NO, select + from + where + ";select cemp_nombre,cemp_nombcome,mnit_nit from dbxschema.cempresa"); if (ds.Tables[0].Rows.Count > 0) { ds.WriteXmlSchema(Path.Combine(Request.PhysicalApplicationPath, "schemas/Nomina.InfyConsultas.rpte_ImpHojaVida.xsd")); reporte = new ReportDocument(); reporte.Load(Path.Combine(Request.PhysicalApplicationPath, "rpt/Nomina.InfyConsultas.rpte_ImpHojaVida.rpt")); reporte.SetDataSource(ds); visor.ReportSource = reporte; visor.DataBind(); reporte.ExportToDisk(ExportFormatType.WordForWindows, Path.Combine(Request.PhysicalApplicationPath, "rptgen/Nomina.InfyConsultas.rpte_ImpHojaVida.doc")); Response.Clear(); Response.ContentType = "application/msword"; Response.AddHeader("Content-Disposition", "attachment; filename= " + nomEmpleado + ".doc"); Response.ContentType = "application/msword"; Response.WriteFile(Path.Combine(Request.PhysicalApplicationPath, "rptgen/Nomina.InfyConsultas.rpte_ImpHojaVida.doc")); Response.Flush(); Response.Close(); } else { Utils.MostrarAlerta(Response, "Existe un prolema con la consulta, el vendedor no tiene la información completa"); } }
private void ItemClickEventHandler_Excel(object sender, EventArgs e) { string filename = @"X:\\BaoCaoCongNo_" + FrDate.ToString().Substring(0, 10).Replace("/", "") + "_" + ToDate.ToString().Substring(0, 10).Replace("/", "") + ".xls"; rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.Excel, filename); //Open excel file System.Diagnostics.Process.Start(filename); }
protected void MostrarReporte(string ruta) { //mostrar el reporte en la pagina. reporte = new ReportDocument(); reporte.Load(Path.Combine(Request.PhysicalApplicationPath, "rpt/" + ruta + ".rpt")); reporte.SetDataSource(ds); visor.ReportSource = reporte; visor.DataBind(); reporte.ExportToDisk(ExportFormatType.WordForWindows, Path.Combine(Request.PhysicalApplicationPath, "rptgen/" + ruta + ".doc")); }
protected void generarreporte() { ds = new DataSet(); DBFunctions.Request(ds, IncludeSchema.NO, "select distinct D.mqui_codiquin,D.memp_codiempl,D.pcon_concepto,P.pcon_nombconc,D.dqui_valevento,D.dqui_canteventos,D.dqui_apagar,D.dqui_adescontar,D.dqui_saldo,M.mnit_nombres,M.mnit_apellidos,M.mnit_nit,E.memp_suelactu,mqui_anoquin ,mqui_mesquin , mqui_tpernomi from dbxschema.dquincena D,dbxschema.mnit M,dbxschema.mempleado E, dbxschema.mquincenas MQUI , dbxschema.tmes T ,dbxschema.pconceptonomina P where D.mqui_codiquin=" + DDLQUINCENA.SelectedValue.ToString() + " and E.mnit_nit=M.mnit_nit and E.memp_codiempl=D.memp_codiempl and D.mqui_codiquin=MQUI.mqui_codiquin and P.pcon_concepto=D.pcon_concepto"); ds.WriteXmlSchema(Path.Combine(Request.PhysicalApplicationPath, "schemas/Nomina.Impresion.rpte_comppagogen.xsd")); //mostrar el reporte en la pagina. reporte = new ReportDocument(); reporte.Load(Path.Combine(Request.PhysicalApplicationPath, "rpt/Nomina.Impresion.rpte_comppagogen.rpt")); reporte.SetDataSource(ds); visor.ReportSource = reporte; visor.DataBind(); reporte.ExportToDisk(ExportFormatType.WordForWindows, Path.Combine(Request.PhysicalApplicationPath, "rptgen/Nomina.Impresion.rpte_comppagogen.doc")); }
private string generatefiles(DataSet ds, string fromdate, string todate, string FirstPath, DataTable mailsetting) { try { DataTable dt1 = ds.Tables[0]; DataView dv = new DataView(ds.Tables[1]); string strAttachFirst = string.Empty; string strAttachSecond = string.Empty; bool isSendData = false; System.Collections.ArrayList objList = new ArrayList(); objList.Add(MailSetting(mailsetting)); CrystalDecisions.CrystalReports.Engine.ReportDocument crystalReport; foreach (DataRow Row in dt1.Rows) { MailDetails objMails = new MailDetails(); dv.RowFilter = "CustID = " + Row["custid"].ToString(); crystalReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); crystalReport.Load(Server.MapPath("../Report/AutoOSMailCustomer.rpt")); crystalReport.SetDataSource(dv.ToTable()); isSendData = dv.ToTable().Rows.Count > 0 ? true : false; strAttachFirst = Server.MapPath(FirstPath + "CustomerOS_" + Convert.ToDateTime(fromdate).ToString("dd-MMM-yyyy") + "_" + Convert.ToDateTime(todate).ToString("dd-MMM-yyyy") + "_" + Row["custid"].ToString() + ".pdf"); crystalReport.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, strAttachFirst); crystalReport.Close(); crystalReport.Dispose(); crystalReport = null; objMails.Attachment = strAttachSecond != "" ? strAttachFirst + "," + strAttachSecond : strAttachFirst; objMails.Name = Row["custName"].ToString(); objMails.EmailId = Row["EmailID"].ToString(); string makesubject = "Chetana Publications :: Outstanding Statement :: from " + Convert.ToDateTime(fromdate).ToString("dd-MMM-yyyy") + " to " + Convert.ToDateTime(todate).ToString("dd-MMM-yyyy"); objMails.Subject = makesubject; objMails.Desc = makesubject; if (isSendData) { objList.Add(objMails); } objMails = null; } return(JsonConvert.SerializeObject(objList)); } catch (Exception ex) { throw; } }
protected void btnmostrar(object sender, EventArgs e) { DataSet ds = new DataSet(); DBFunctions.Request(ds, IncludeSchema.NO, "SELECT DQUI.pcon_concepto,MQUI.mqui_mesquin,SUM(DQUI.dqui_apagar),SUM(DQUI.dqui_adescontar),MQUI.mqui_anoquin FROM dbxschema.mempleado MEMP,dbxschema.dquincena DQUI,dbxschema.mquincenas MQUI,dbxschema.pconceptonomina PCON,dbxschema.pmes PMES WHERE MEMP.memp_codiempl=DQUI.memp_codiempl AND DQUI.pcon_concepto=PCON.pcon_concepto AND MQUI.mqui_codiquin=DQUI.mqui_codiquin AND MQUI.mqui_mesquin=PMES.pmes_mes and mqui_anoquin=" + DDLANO.SelectedValue + " GROUP BY DQUI.pcon_concepto,MQUI.mqui_mesquin,MQUI.mqui_anoquin;select pmes_mes, pmes_nombre from dbxschema.pmes;select cemp_nombre,cemp_nombcome,mnit_nit from dbxschema.cempresa"); ds.WriteXmlSchema(Path.Combine(Request.PhysicalApplicationPath, "schemas/Nomina.Acumulado.rpte_ImpAcumuladoConceptoGeneral.xsd")); reporte = new ReportDocument(); reporte.Load(Path.Combine(Request.PhysicalApplicationPath, "rpt/Nomina.Acumulado.rpte_ImpAcumuladoConceptoGeneral.rpt")); reporte.SetDataSource(ds); visor.ReportSource = reporte; visor.DataBind(); reporte.ExportToDisk(ExportFormatType.WordForWindows, Path.Combine(Request.PhysicalApplicationPath, "rptgen/Nomina.Acumulado.rpte_ImpAcumuladoConceptoGeneral.doc")); Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "application/msword"; Response.WriteFile(Path.Combine(Request.PhysicalApplicationPath, "rptgen/Nomina.Acumulado.rpte_ImpAcumuladoConceptoGeneral.doc")); }
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(); } }
protected void generarrptdetallado(object sender, EventArgs e) { TableLogOnInfo InfoConexBd; ExportOptions exportOpts = new ExportOptions(); PdfRtfWordFormatOptions PDFFormatOpts = new PdfRtfWordFormatOptions(); DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions(); string tem = ""; //SACAR EL NIT string nit = DBFunctions.SingleData("select MNIT.mnit_nit from dbxschema.mempleado MEMP, dbxschema.mnit MNIT where MEMP.mnit_nit=MNIT.mnit_nit and MEMP.memp_codiempl='" + DDLEMPLEADO.SelectedValue + "'"); string select = "SELECT MEMP.MEMP_CODIEMPL,MNIT.MNIT_NOMBRES,MNIT.MNIT_NOMBRE2,MNIT.MNIT_APELLIDOS,MNIT.MNIT_APELLIDO2,MNIT.MNIT_DIGITO,MNIT.MNIT_DIRECCION,MNIT.MNIT_EMAIL,MNIT.MNIT_TELEFONO,MNIT.MNIT_CELULAR, MEMP.MEMP_FECHNACI,PCIU.PCIU_NOMBRE,MNIT.MNIT_NIT,MNIT.MNIT_DIGITO,MEMP.MEMP_NUMELIBRMILI,MEMP.MEMP_CLASELIBRMILI,DBXSCHEMA.TSEXO.TSEX_NOMBRE,YEAR(CURRENT DATE)- YEAR(MEMP.MEMP_FECHNACI),MEMP.MEMP_NUMEHIJOS,MEMP.TRES_VIVIENDA,MEMP.MEMP_FECHINGRESO,MEMP.MEMP_SUELACTU,MEMP.MEMP_SUELANTER,TCON.TCON_NOMBRE,TSUBT.TSUB_NOMBRE, PDEPTO.PDEP_NOMBDPTO,TESTEMP.TEST_NOMBRE,DBXSCHEMA.TFORMAPAGO.TFOR_DESCRIPCION,DBXSCHEMA.PBANCO.PBAN_NOMBRE,MEMP.MEMP_CUENNOMI,DBXSCHEMA.PEPS.PEPS_NOMBEPS,DBXSCHEMA.PARP.PARP_NOMBARP,PFCESA.PFON_NOMBFOND,PFPENS.PFON_NOMBPENS,DBXSCHEMA.TRETEFTE.TEST_DESCRIPCION, MEMP.MEMP_PORCRETE,TSANGRE.TTIP_TIPOSANG ,PCAR.pcar_nombcarg,TCIVIL.test_nombre,MEMP.memp_fecsuelanter,memp_peripago,TPAGO.TPER_DESCP,TFPAGO.tfor_descripcion,MEMP.memp_cuennomi,PFPENS2.pfon_nombpens as pensvol"; string from = " FROM DBXSCHEMA.MEMPLEADO MEMP,DBXSCHEMA.MNIT MNIT,DBXSCHEMA.PCIUDAD PCIU,DBXSCHEMA.TSEXO,DBXSCHEMA.TCONTRATONOMINA TCON,DBXSCHEMA.TSUBSIDIOTRANSPORTE TSUBT ,DBXSCHEMA.PDEPARTAMENTOEMPRESA PDEPTO,DBXSCHEMA.TESTADOEMPLEADO TESTEMP, DBXSCHEMA.TFORMAPAGO,DBXSCHEMA.PBANCO,DBXSCHEMA.PEPS,DBXSCHEMA.PARP,DBXSCHEMA.PFONDOPENSION PFPENS,DBXSCHEMA.PFONDOPENSION PFPENS2, DBXSCHEMA.PFONDOCESANTIAS PFCESA,DBXSCHEMA.TRETEFTE,DBXSCHEMA.TTIPOSANGRE TSANGRE,DBXSCHEMA.PCARGOEMPLEADO PCAR,dbxschema.testadocivil TCIVIL,dbxschema.TPERIPAGO TPAGO,DBXSCHEMA.TFORMAPAGO TFPAGO"; string where = " WHERE MEMP.MEMP_CODIEMPL='" + DDLEMPLEADO.SelectedValue + "' AND PFPENS.pfon_codipens=MEMP.pfon_codipens AND PFPENS2.pfon_codipens=MEMP.pfon_codipensvolu AND TFPAGO.tfor_pago=memp.memp_formpago AND TPAGO.tper_peri=MEMP.memp_peripago AND TCIVIL.test_estacivil=memp.test_estacivil AND MEMP.PCAR_CODICARGO=PCAR.PCAR_CODICARGO AND MEMP.MNIT_NIT=MNIT.MNIT_NIT and memp.ttip_secuencia= TSANGRE.ttip_secuencia AND MEMP.PCIU_LUGANACI=PCIU.PCIU_CODIGO AND MEMP.TSEX_CODIGO=DBXSCHEMA.TSEXO.TSEX_CODIGO AND MEMP.TCON_CONTRATO= TCON.TCON_CONTRATO AND MEMP.TSUB_CODIGO=TSUBT.TSUB_CODIGO AND MEMP.PDEP_CODIDPTO= PDEPTO.PDEP_CODIDPTO AND MEMP.TEST_ESTADO= TESTEMP.TEST_ESTADO AND MEMP.MEMP_FORMPAGO=DBXSCHEMA.TFORMAPAGO.TFOR_PAGO AND MEMP.PBAN_CODIGO=DBXSCHEMA.PBANCO.PBAN_CODIGO AND MEMP.PEPS_CODIEPS=DBXSCHEMA.PEPS.PEPS_CODIEPS AND MEMP.PARP_CODIARP=DBXSCHEMA.PARP.PARP_CODIARP AND MEMP.PFON_CODICESA=PFCESA.PFON_CODIFOND AND MEMP.MEMP_TESTRETE=DBXSCHEMA.TRETEFTE.TEST_RETE"; DataSet ds = new DataSet(); //original //string detalle1 = "select MNOM.mnom_fecha,PEXA.pexa_nombre,MNOM.mnom_descripc,MNOM.mnom_resultado,MNOM.mnom_comentario,MNOM.mnom_evaluador from dbxschema.mnominaseleccion MNOM,dbxschema.pexamen PEXA where MNOM.mnit_nit='" + nit + "' and MNOM.pexa_codigo=PEXA.pexa_codigo;"; //string detalle2 = "SELECT MNOM.mnom_nombre,PPAR.ppar_detalle,MNOM.mnon_nitfami,MNOM.tres_sino,PPROF.ppro_nombre,MNOM.mnom_direccion,PCIU.pciu_nombre,MNOM.mnom_telefono FROM dbxschema.mnominafamilia MNOM,dbxschema.pciudad PCIU,dbxschema.mnit MNIT,dbxschema.pprofesion PPROF,dbxschema.pparentesco PPAR,dbxschema.trespuestasino TRES WHERE MNOM.mnit_nit='" + nit + "' and MNOM.mnit_nit=MNIT.mnit_nit and MNOM.pciu_codigo=PCIU.pciu_codigo and MNOM.ppro_codigo=PPROF.ppro_codigo and MNOM.ppar_codigo=PPAR.ppar_codigo and MNOM.tres_sino=TRES.tres_sino;"; //string detalle3 = "select PPROF.ppro_nombre,MNOM.mnon_estanivel,MNOM.tres_sino,MNOM.mnom_fechnaci,MNOM.mnom_universidad,PCIU.pciu_nombre from dbxschema.mnominanivelacademico MNOM, dbxschema.pciudad PCIU, dbxschema.mnit MNIT,dbxschema.pprofesion PPROF,dbxschema.trespuestasino TRES where MNOM.mnit_nit='" + nit + "' AND MNIT.mnit_nit=MNOM.mnit_nit AND MNOM.pciu_codigo=PCIU.pciu_codigo AND PPROF.ppro_codigo=MNOM.ppro_codigo AND MNOM.tres_sino=TRES.tres_sino;"; //string detalle4 = "select MSEG.mnom_fecha, MSEG.mnom_descripc from dbxschema.mnominaseguimiento MSEG,dbxschema.paccionnomina PACC,dbxschema.palmacen PALM,dbxschema.mnit MNIT where MSEG.mnit_nit='" + nit + "' and MNIT.mnit_nit=MSEG.mnit_nit and PACC.pacc_codiacci=MSEG.pacc_codiacci and MSEG.palm_codigo=PALM.palm_almacen;"; //string detalle5 = "select dvac_fechinic,dvac_fechfinal,dvac_tiem,dvac_dine from dbxschema.dvacaciones DVACA, dbxschema.mvacaciones MVACA where DVACA.mvac_secuencia=MVACA.mvac_secuencia and MVACA.memp_codiemp='" + DDLEMPLEADO.SelectedValue + "';"; //string detalle6 = "select MPRE.mpre_numelibr,MPRE.mpre_fechprest,MPRE.mpre_valorpres,MPRE.mpre_numecuot,MPRE.mpre_porcinte,MPRE.mpre_valopaga from dbxschema.mprestamoempleados MPRE,dbxschema.testadoprestamo TPRES where TPRES.test_estprestamo=1 and MPRE.memp_codiempL='" + DDLEMPLEADO.SelectedValue + "'";s string detalle1 = "select MNOM.mnom_fecha,PEXA.pexa_nombre,MNOM.mnom_descripc,MNOM.mnom_resultado,MNOM.mnom_comentario,MNOM.mnom_evaluador from dbxschema.mnominaseleccion MNOM,dbxschema.pexamen PEXA where MNOM.MEMP_CODIEMPL='" + DDLEMPLEADO.SelectedValue + "' and MNOM.pexa_codigo=PEXA.pexa_codigo;"; string detalle2 = "SELECT MNOM.mnom_nombre,PPAR.ppar_detalle,MNOM.mnon_nitfami,MNOM.tres_sino,PPROF.ppro_nombre,MNOM.mnom_direccion,PCIU.pciu_nombre,MNOM.mnom_telefono FROM dbxschema.mnominafamilia MNOM,dbxschema.pciudad PCIU,dbxschema.pprofesion PPROF,dbxschema.pparentesco PPAR,dbxschema.trespuestasino TRES WHERE MNOM.MEMP_CODIEMPL='" + DDLEMPLEADO.SelectedValue + "' and MNOM.pciu_codigo=PCIU.pciu_codigo and MNOM.ppro_codigo=PPROF.ppro_codigo and MNOM.ppar_codigo=PPAR.ppar_codigo and MNOM.tres_sino=TRES.tres_sino;"; string detalle3 = "select PPROF.ppro_nombre,MNOM.mnon_estanivel,MNOM.tres_sino,MNOM.mnom_fechnaci,MNOM.mnom_universidad,PCIU.pciu_nombre from dbxschema.mnominanivelacademico MNOM, dbxschema.pciudad PCIU, dbxschema.pprofesion PPROF,dbxschema.trespuestasino TRES where MNOM.MEMP_CODIEMPL='" + DDLEMPLEADO.SelectedValue + "' AND MNOM.pciu_codigo=PCIU.pciu_codigo AND PPROF.ppro_codigo=MNOM.ppro_codigo AND MNOM.tres_sino=TRES.tres_sino;"; string detalle4 = "select MSEG.mnom_fecha, MSEG.mnom_descripc from dbxschema.mnominaseguimiento MSEG,dbxschema.paccionnomina PACC,dbxschema.palmacen PALM where MSEG.MEMP_CODIEMPL='" + DDLEMPLEADO.SelectedValue + "' and PACC.pacc_codiacci=MSEG.pacc_codiacci and MSEG.palm_codigo=PALM.palm_almacen;"; string detalle5 = "select dvac_fechinic,dvac_fechfinal,dvac_tiem,dvac_dine from dbxschema.dvacaciones DVACA, dbxschema.mvacaciones MVACA where DVACA.mvac_secuencia=MVACA.mvac_secuencia and MVACA.memp_codiemp='" + DDLEMPLEADO.SelectedValue + "';"; string detalle6 = "select MPRE.mpre_numelibr,MPRE.mpre_fechprest,MPRE.mpre_valorpres,MPRE.mpre_numecuot,MPRE.mpre_porcinte,MPRE.mpre_valopaga from dbxschema.mprestamoempleados MPRE,dbxschema.testadoprestamo TPRES where TPRES.test_estprestamo=1 and MPRE.memp_codiempL='" + DDLEMPLEADO.SelectedValue + "'"; DBFunctions.Request(ds, IncludeSchema.NO, select + from + where + ";select cemp_nombre,cemp_nombcome,mnit_nit from dbxschema.cempresa;" + detalle1 + detalle2 + detalle3 + detalle4 + detalle5 + detalle6); ds.WriteXmlSchema(Path.Combine(Request.PhysicalApplicationPath, "schemas/Nomina.InfyConsultas.rpte_ImpHojaVidaDetallada2.xsd")); reporte = new ReportDocument(); reporte.Load(Path.Combine(Request.PhysicalApplicationPath, "rpt/Nomina.InfyConsultas.rpte_ImpHojaVidaDetallada2.rpt")); reporte.SetDataSource(ds); visor.ReportSource = reporte; visor.DataBind(); reporte.ExportToDisk(ExportFormatType.WordForWindows, Path.Combine(Request.PhysicalApplicationPath, "rptgen/Nomina.InfyConsultas.rpte_ImpHojaVidaDetallada.doc")); //TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo(); //ConnectionInfo crConnectionInfo = new ConnectionInfo(); //crConnectionInfo.ServerName = ConfigurationManager.AppSettings["DataBase" + GlobalData.getEMPRESA()];// para 2015 //CrystalDecisions.CrystalReports.Engine.Database crDatabase; //CrystalDecisions.CrystalReports.Engine.Tables crTables; //crDatabase = reporte.Database; //crTables = crDatabase.Tables; //foreach (CrystalDecisions.CrystalReports.Engine.Table tabla1 in reporte.Database.Tables) //{ // tem = tabla1.Name.ToString(); // InfoConexBd = tabla1.LogOnInfo; // //InfoConexBd.ConnectionInfo.ServerName = ConfigurationManager.AppSettings["DataBase"]; // InfoConexBd.ConnectionInfo.ServerName = ConfigurationManager.AppSettings["DataBase" + GlobalData.getEMPRESA()]; // para 2015 // InfoConexBd.ConnectionInfo.UserID = "db2admin"; // InfoConexBd.ConnectionInfo.Password = "******"; // InfoConexBd.TableName = "DBXSCHEMA." + tem; // tabla1.ApplyLogOnInfo(InfoConexBd); //} //exportOpts.ExportFormatType = ExportFormatType.WordForWindows; //exportOpts.FormatOptions = PDFFormatOpts; //exportOpts.ExportDestinationType = ExportDestinationType.DiskFile; //string nomA = "_" + HttpContext.Current.User.Identity.Name.ToLower() + ".doc"; //string documento = ConfigurationManager.AppSettings["PathToPreviews"] + nomA; //diskOpts.DiskFileName = ConfigurationManager.AppSettings["PathToReports"] + nomA; //exportOpts.DestinationOptions = diskOpts; //reporte.Export(); //reporte.SetDatabaseLogon("db2admin", ".ecas2010.", "AUTOPRUE", "AUTOPRUE"); Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "application/msword"; Response.WriteFile(Path.Combine(Request.PhysicalApplicationPath, "rptgen/Nomina.InfyConsultas.rpte_ImpHojaVidaDetallada2.doc")); }
// <JG> 03/08/2017 externalisation méthode export PDF static internal void ExportPDF(string report_path, Model.Sage.Piece Piece, uint TypeDoc, String CT_Num, string temp_file) { #region PDF CrystalDecisions.CrystalReports.Engine.ReportDocument Etat = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); Etat.Load(report_path); if (Etat.ParameterFields.Count == 0) { Etat.RecordSelectionFormula = "{Commande.DO_Piece} = '" + Piece.DO_Piece + "'"; } // fonctions avec application sur les sous-états Core.PrintCrystal.Logon(Etat, Core.Global.GetConnectionInfos().SageServer, Core.Global.GetConnectionInfos().SageIntegratedSecurity, Core.Global.GetConnectionInfos().SageDatabase, Core.Global.GetConnectionInfos().SageSQLUser, Core.Global.GetConnectionInfos().SageSQLPass); Etat.Refresh(); if (Etat.ParameterFields.Count > 0) { Etat.SetParameterValue("piece", Piece.DO_Piece); } Etat.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, temp_file); Etat.Close(); if (Core.Global.GetConfig().ModuleAECInvoiceHistoryArchivePDFActive && System.IO.Directory.Exists(Core.Global.GetConfig().ModuleAECInvoiceHistoryArchivePDFFolder)) { string path = null; if (!string.IsNullOrWhiteSpace(CT_Num)) { path = System.IO.Path.Combine(Core.Global.GetConfig().ModuleAECInvoiceHistoryArchivePDFFolder, CT_Num); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } switch (TypeDoc) { case 1: path = System.IO.Path.Combine(path, "Order"); break; case 7: path = System.IO.Path.Combine(path, "Invoice"); break; default: break; } if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } path = System.IO.Path.Combine(path, Piece.DO_Piece + ".pdf"); } if (path != null) { System.IO.File.Copy(temp_file, path, true); } } #endregion }
public string ReportExportToFile(string reportTemplateFileName, string ExportFormat, bool IsLocalize) { if (reportTemplateFileName != string.Empty) { CrystalDecisions.CrystalReports.Engine.ReportDocument rptDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); rptDocument.Load(reportTemplateFileName); LoadReportDocument(rptDocument); } CrystalDecisions.CrystalReports.Engine.ReportDocument result = GenerateReport(); if (result.ParameterFields["ChineseFontName"] != null) { //System.Drawing.FontFamily chineseFontFamily = AppUtils.GetChineseFontFamily(dbConn); //if (chineseFontFamily != null) // result.SetParameterValue("ChineseFontName", chineseFontFamily.Name); //else result.SetParameterValue("ChineseFontName", string.Empty); } // result.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.CrystalReport, System.IO.Path.GetTempPath() + @"\" + OutputFilenamePrefix + "_" + AppUtils.ServerDateTime().ToString("yyyyMMddHHmmss")); //result.Load(System.IO.Path.GetTempPath() + @"\" + OutputFilenamePrefix + "_" + AppUtils.ServerDateTime().ToString("yyyyMMddHHmmss")); if (reportTemplateFileName == string.Empty && IsLocalize) { ReportSectionsLocalization(!ExportFormat.Equals("EXCEL", StringComparison.CurrentCultureIgnoreCase)); } // Do NOT set the papersize by default for customized paper size //result.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4; CrystalDecisions.Shared.ExportFormatType exportFormatType; string exportFileName = System.IO.Path.GetTempFileName(); System.IO.File.Delete(exportFileName); string exportFileNameExtension = string.Empty; if (ExportFormat.Equals("EXCEL", StringComparison.CurrentCultureIgnoreCase)) { result.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperEsheet; //ExcelLibrary.SpreadSheet.Workbook workbook = ExcelLibrary.SpreadSheet.Workbook.Load(result.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Excel)); //foreach (ExcelLibrary.SpreadSheet.Worksheet workSheet in workbook.Worksheets) //{ // ExcelLibrary.SpreadSheet.CellCollection cellCollection = new ExcelLibrary.SpreadSheet.CellCollection(); // int count = 1; // foreach (int key in workSheet.Cells.Rows.Keys) // { // ExcelLibrary.SpreadSheet.Row row = workSheet.Cells.Rows[key]; // cellCollection.Rows.Add(count, row); // count++; // } // workSheet.Cells.Rows.Clear(); // foreach (int key in cellCollection.Rows.Keys) // { // workSheet.Cells.Rows.Add(key, cellCollection.Rows[key]); // } //} //string exportFileName = System.IO.Path.GetTempFileName(); //System.IO.File.Delete(exportFileName); //exportFileName += ".xls"; //workbook.Save(exportFileName); //WebUtils.TransmitFile(Response, exportFileName, OutputFilenamePrefix + "_" + AppUtils.ServerDateTime().ToString("yyyyMMddHHmmss") + ".xls", true); //result.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.Excel, Response, true, OutputFilenamePrefix + "_" + AppUtils.ServerDateTime().ToString("yyyyMMddHHmmss")); exportFileNameExtension = ".xls"; exportFormatType = CrystalDecisions.Shared.ExportFormatType.Excel; } else if (ExportFormat.Equals("WORD", StringComparison.CurrentCultureIgnoreCase)) { exportFileNameExtension = ".doc"; exportFormatType = CrystalDecisions.Shared.ExportFormatType.RichText; } else //if (ExportFormat.Equals("PDF", StringComparison.CurrentCultureIgnoreCase)) { exportFileNameExtension = ".pdf"; if (UsePDFCreator) { exportFormatType = CrystalDecisions.Shared.ExportFormatType.NoFormat; try { PDFCreaterPrinter printer = new PDFCreaterPrinter(); string outputFile = printer.printCrystalReportsToPDF(result); System.IO.File.Move(outputFile, exportFileName + exportFileNameExtension); } catch (Exception ex) { throw ex; // if any error occurs or driver not installed, use crystal report export function // exportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat; } } else { exportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat; } //ReportSectionsIncreaseFontSize(result); } exportFileName += exportFileNameExtension; if (exportFormatType != CrystalDecisions.Shared.ExportFormatType.NoFormat) { if (exportFormatType == CrystalDecisions.Shared.ExportFormatType.PortableDocFormat) { if (reportTemplateFileName == string.Empty) { SetChineseFont(result, IsLocalize); } else { SetChineseFont(result, false); } } //result.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.CrystalReport, exportFileName); result.ExportToDisk(exportFormatType, exportFileName); } if (exportFileNameExtension == ".rtf" || exportFileNameExtension == ".doc") { string exportFileName_modified = exportFileName + "_modified" + exportFileNameExtension; System.IO.StreamReader oStrRdr = new System.IO.StreamReader(exportFileName); System.IO.StreamWriter oStrWrt = new System.IO.StreamWriter(exportFileName_modified); while (!oStrRdr.EndOfStream) { string content = oStrRdr.ReadLine(); content = content.Replace(@"{\rtf1\ansi\ansicpgA.R..", @"{\rtf1\ansi\ansicpg"); oStrWrt.WriteLine( content ); } oStrRdr.Close(); oStrWrt.Close(); System.IO.File.Delete(exportFileName); exportFileName = exportFileName_modified; } //if (exportFileNameExtension == ".rtf") //{ // string newExportFilename = exportFileName + ".pdf"; // // iTextSharp.text.Document document = new iTextSharp.text.Document(); // // iTextSharp.text.pdf.PdfWriter writer = iTextSharp.text.pdf.PdfWriter.GetInstance(document, System.IO.File.Create(newExportFilename)); // // document.Open(); // // iTextSharp.text.rtf.parser.RtfParser parser = new iTextSharp.text.rtf.parser.RtfParser(null); // // System.IO.FileStream rtfStream = System.IO.File.OpenRead(exportFileName); // // parser.ConvertRtfDocument(rtfStream, document); // // rtfStream.Close(); // // document.Close(); // System.IO.File.Delete(exportFileName); // exportFileName = newExportFilename; //} result.Close(); result.Dispose(); LoadReportDocument(null); return(exportFileName); }
private void LoadReport() { try { this.Cursor = Cursors.WaitCursor; ParameterFieldDefinition _paramF = null;; ParameterDiscreteValue _disValue = new ParameterDiscreteValue(); ParameterValues _cValues = null; if (m_struct.Action == SReport.EAction.SAVE_TO_DISK) { this.Visible = false; } //Test call report by old or new method if (m_ReportName.Substring(m_ReportName.Length - 6, 2).Equals("NT")) { //New Code m_ReportDoc.Load(m_ReportPath, OpenReportMethod.OpenReportByTempCopy); //clsReportEngine objReportEngine = new clsReportEngine(this.DBEngine, m_ReportName,m_ParamNames,m_ParamValues); clsReportEngine objReportEngine = new clsReportEngine(this.DBEngine, m_ReportName, m_ParamsNameAndValue); m_ReportDoc.SetDataSource(objReportEngine.getDataSetValue()); m_ReportView.ReportSource = m_ReportDoc; this.Cursor = Cursors.Default; m_ReportView.Zoom(1); //Fix //End New Code } else { // * OLD CODE //m_ReportDoc.Load(m_ReportPath); m_ReportDoc.Load(m_ReportPath, OpenReportMethod.OpenReportByTempCopy); /* * LogonToReport(DBEngine.DataSourceName, * "", * DBEngine.User, * DBEngine.Password); */ LogonToReport(DBEngine.Server, DBEngine.Database, DBEngine.User, DBEngine.Password); // ============================================================ // Get the ParameterFieldDefinition object by name. if (m_PLength != 0) { for (int i = 0; i < m_PLength; i++) { _paramF = m_ReportDoc.DataDefinition.ParameterFields[m_ParamNames[i].ToString()]; _cValues = _paramF.CurrentValues; _disValue.Value = (object)m_ParamValues[i]; _cValues.Add(_disValue); _paramF.ApplyCurrentValues(_cValues); } } if (m_struct.Action == SReport.EAction.SAVE_TO_DISK) { m_ReportDoc.ExportToDisk(ExportFormatType.PortableDocFormat, m_struct.SaveToFileName); m_ReportDoc.Dispose(); this.Close(); return; } //m_ReportDoc.SaveAs("test.rpt", ReportFileFormat.VSNetFileFormat); m_ReportView.ReportSource = m_ReportDoc; this.Cursor = Cursors.Default; if (m_struct.Action == HPA.Common.SReport.EAction.PREVIEW) { m_ReportView.Zoom(1); } else if (m_struct.Action == HPA.Common.SReport.EAction.PRINT) { m_ReportView.PrintReport(); this.Close(); } //* END OLD CODE } } catch (Exception e) { MessageBox.Show(e.ToString()); throw e; } }
protected void Page_Load(object sender, EventArgs e) { //System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("th-TH"); //lblError.Text = string.Empty; if (!IsPostBack) { getQueryString(); printData(); crConnectionInfo.DatabaseName = strDbname; crConnectionInfo.ServerName = strServername; crConnectionInfo.UserID = strDbuser; crConnectionInfo.Password = strDbpassword; crTables = oRpt.Database.Tables; //apply logon info foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in oRpt.Database.Tables) { crTableLogOnInfo = crTable.LogOnInfo; crTableLogOnInfo.ConnectionInfo = crConnectionInfo; crTable.ApplyLogOnInfo(crTableLogOnInfo); } //apply logon info for sub report foreach (Section crSection in oRpt.ReportDefinition.Sections) { foreach (ReportObject crReportObject in crSection.ReportObjects) { if (crReportObject.Kind == ReportObjectKind.SubreportObject) { SubreportObject crSubReportObj = (SubreportObject)(crReportObject); foreach (CrystalDecisions.CrystalReports.Engine.Table oTable in crSubReportObj.OpenSubreport(crSubReportObj.SubreportName).Database.Tables) { crTableLogOnInfo = oTable.LogOnInfo; crTableLogOnInfo.ConnectionInfo = crConnectionInfo; oTable.ApplyLogOnInfo(crTableLogOnInfo); } } } } string strReportDirectoryTempPhysicalPath = Server.MapPath(this.ReportDirectoryTemp); Helper.DeleteUnusedFile(strReportDirectoryTempPhysicalPath, ReportAliveTime); string strFilename; strFilename = "report_" + DateTime.Now.ToString("yyyyMMddHH-mm-ss-fff"); var pathPdf = "~/temp/" + strFilename + ".pdf"; oRpt.ExportToDisk(ExportFormatType.PortableDocFormat, Server.MapPath(pathPdf)); var pathExcel = "~/temp/" + strFilename + ".xls"; oRpt.ExportToDisk(ExportFormatType.ExcelRecord, Server.MapPath(pathExcel)); Session["ExportPdfUrl"] = pathPdf; Session["ExportExcelUrl"] = pathExcel; if (Helper.CStr(Session["ExportExcel"]) == "true") { Session["ExportExcel"] = null; //var strMyScript = "window.opener.__doPostBack('ctl00$ASPxRoundPanel1$ASPxRoundPanel2$ContentPlaceHolder1$LinkButton1','');window.close();return false;"; var strMyScript = "window.opener.__doPostBack('ctl00$ASPxRoundPanel1$ASPxRoundPanel2$ContentPlaceHolder1$LinkButton1','');window.close();"; Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", strMyScript, true); } else { Response.Redirect(pathPdf); } //Server.Transfer(path); //lnkPdfFile.NavigateUrl = "~/temp/" + strFilename + ".pdf"; //imgPdf.Src = "~/images/icon_pdf.gif"; //lnkExcelFile.Visible = false; //CrystalReportViewer1.ReportSource = oRpt; } }
private string generatefiles(DataSet ds, DataSet ds1, DataTable dt1, string fromdate, string todate, string s_fromdate, string s_todate, string FirstPath, string SecondPath, DataTable mailsetting) { try { bool isSecondDataPresent = false; DataView dv = new DataView(ds.Tables[0]); DataView dv1 = new DataView(); bool isSendFirstData = false; bool isSendSecondata = false; if (ds1 != null) { isSecondDataPresent = true; dv1.Table = ds1.Tables[0]; } string strAttachFirst = string.Empty; string strAttachSecond = string.Empty; System.Collections.ArrayList objList = new ArrayList(); objList.Add(MailSetting(mailsetting)); CrystalDecisions.CrystalReports.Engine.ReportDocument crystalReport; foreach (DataRow Row in dt1.Rows) { MailDetails objMails = new MailDetails(); #region First Data dv.RowFilter = "Superzone = " + Row["SuperZoneID"].ToString(); crystalReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); crystalReport.Load(Server.MapPath("../Report/CollectionReport.rpt")); crystalReport.SetDataSource(dv.ToTable()); isSendFirstData = dv.ToTable().Rows.Count > 0 ? true : false; strAttachFirst = Server.MapPath(FirstPath + "Wkly_Col_" + Convert.ToDateTime(fromdate).ToString("dd-MMM-yy") + "_" + Convert.ToDateTime(todate).ToString("dd-MMM-yyyy") + "_" + Row["SuperZoneID"].ToString() + ".pdf"); crystalReport.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, strAttachFirst); crystalReport.Close(); crystalReport.Dispose(); crystalReport = null; #endregion #region "Second Data" if (isSecondDataPresent) { dv1.RowFilter = "Superzone = " + Row["SuperZoneID"].ToString(); crystalReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); crystalReport.Load(Server.MapPath("../Report/CollectionReport.rpt")); crystalReport.SetDataSource(dv1.ToTable()); isSendSecondata = dv1.ToTable().Rows.Count > 0 ? true : false; strAttachSecond = Server.MapPath(SecondPath + "_Wkly_Col_" + Convert.ToDateTime(s_fromdate).ToString("dd-MMM-yy") + "_" + Convert.ToDateTime(s_todate).ToString("dd-MMM-yy") + "_" + Row["SuperZoneID"].ToString() + ".pdf"); crystalReport.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, strAttachSecond); crystalReport.Close(); crystalReport.Dispose(); crystalReport = null; } #endregion objMails.Attachment = strAttachSecond != "" ? strAttachFirst + "," + strAttachSecond : strAttachFirst; objMails.Name = Row["SuperZoneName"].ToString(); objMails.EmailId = Row["Email"].ToString(); string makesubject = "Collection from " + (isSecondDataPresent == true ? Convert.ToDateTime(fromdate).ToString("dd-MMM-yyyy") + " TO " + Convert.ToDateTime(todate).ToString("dd-MMM-yyyy") + " & " + Convert.ToDateTime(s_fromdate).ToString("dd-MMM-yyyy") + " TO " + Convert.ToDateTime(s_todate).ToString("dd-MMM-yyyy") : Convert.ToDateTime(fromdate).ToString("dd-MMM-yyyy") + " TO " + Convert.ToDateTime(todate).ToString("dd-MMM-yyyy")); objMails.Subject = makesubject; objMails.Desc = makesubject; if (isSendFirstData) { objList.Add(objMails); } objMails = null; } return(JsonConvert.SerializeObject(objList)); } catch (Exception ex) { throw; } }
public static void loadDayEndReport(ref int id, ref string sPath = "", ref bool bFAIL = false) { int lTotal = 0; ADODB.Recordset rs = default(ADODB.Recordset); ADODB.Recordset rsBanking = default(ADODB.Recordset); ADODB.Recordset rsPayout = default(ADODB.Recordset); ADODB.Recordset rsSupplier = default(ADODB.Recordset); ADODB.Recordset rsShrink = default(ADODB.Recordset); ADODB.Recordset rsCustomer = default(ADODB.Recordset); ADODB.Recordset rsQuote = default(ADODB.Recordset); ADODB.Recordset rsConsignment = default(ADODB.Recordset); string sql = null; //Dim Report As New cryDayEnd CrystalDecisions.CrystalReports.Engine.ReportDocument Report = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); int gParameters = 0; const short gParChannel = 1; const short gParStock = 2; const short gParShrink = 4; const short gParSupplier = 8; const short gParCustomer = 16; const short gParQuote = 32; const short gParConsignment = 64; const short gParPastelReport = 128; //Pastel Variable Report.Load("cryDatEnd"); //UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"' System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; rs = modRecordSet.getRS(ref "SELECT * FROM Company"); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtCompanyName. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtCompanyName", rs.Fields("Company_Name")); gParameters = Convert.ToInt32(0 + rs.Fields("Company_DayEndBit").Value); rs.Close(); //change translation for report // modRecordSet.rsLang.filter = "LanguageLayoutLnk_LanguageID=" + 1974; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport1_Text9. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (modRecordSet.rsLang.RecordCount) Report.SetParameterValue("Subreport1_Text9", Strings.Replace(modRecordSet.rsLang.Fields("LanguageLayoutLnk_Description").Value, Constants.vbCrLf, " ")); // modRecordSet.rsLang.filter = "LanguageLayoutLnk_LanguageID=" + 1975; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport1_Text8. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (modRecordSet.rsLang.RecordCount) Report.SetParameterValue("Subreport1_Text8", Strings.Replace(modRecordSet.rsLang.Fields("LanguageLayoutLnk_Description").Value, Constants.vbCrLf, " ")); // modRecordSet.rsLang.filter = "LanguageLayoutLnk_LanguageID=" + 1974; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport2_Text4. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (modRecordSet.rsLang.RecordCount) Report.SetParameterValue("Subreport2_Text4", Strings.Replace(modRecordSet.rsLang.Fields("LanguageLayoutLnk_Description").Value, Constants.vbCrLf, " ")); // modRecordSet.rsLang.filter = "LanguageLayoutLnk_LanguageID=" + 1975; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport2_Text3. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (modRecordSet.rsLang.RecordCount) Report.SetParameterValue("Subreport2_Text3", Strings.Replace(modRecordSet.rsLang.Fields("LanguageLayoutLnk_Description").Value, Constants.vbCrLf, " ")); // //change translation for report rs = modRecordSet.getRS(ref "SELECT * FROM DayEnd WHERE DayEndID = " + id); //UPGRADE_ISSUE: cryNoRecords object was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6B85A2A7-FE9F-4FBE-AA0C-CF11AC86A305"' CrystalDecisions.CrystalReports.Engine.ReportDocument ReportNone = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); ReportNone.Load("cryNoRecords"); //'ReportNone.Load("cryNoRecords.rpt") if (rs.BOF | rs.EOF) { if (Module1.bUploadReport == true) { bFAIL = true; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtCompanyName. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object ReportNone.txtCompanyName. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' ReportNone.SetParameterValue("txtCompanyName", Report.ParameterFields("txtCompanyName")); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtTitle. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object ReportNone.txtTitle. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' ReportNone.SetParameterValue("txtTitle", Report.ParameterFields("txtTitle")); //UPGRADE_WARNING: Couldn't resolve default property of object ReportNone.txtTitle. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' My.MyProject.Forms.frmReportShow.Text = ReportNone.ParameterFields("txtTitle").ToString; //UPGRADE_WARNING: Couldn't resolve default property of object frmReportShow.CRViewer1.ReportSource. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object ReportNone. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' My.MyProject.Forms.frmReportShow.CRViewer1.ReportSource = ReportNone; My.MyProject.Forms.frmReportShow.mReport = ReportNone; My.MyProject.Forms.frmReportShow.sMode = "0"; My.MyProject.Forms.frmReportShow.CRViewer1.Refresh(); //UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"' System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; My.MyProject.Forms.frmReportShow.ShowDialog(); } return; } //UPGRADE_WARNING: Couldn't resolve default property of object Report.Database. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.Database.Tables(1).SetDataSource(rs); if (My.MyProject.Forms.frmMenu.gSuper == true) { sql = "SELECT POS.POSID, POS.POS_Name, Sum(Declaration.Declaration_Cash) AS SumOfDeclaration_Cash, Sum(Declaration.Declaration_CashServer) AS SumOfDeclaration_CashServer, Sum(Declaration.Declaration_CashCount) AS SumOfDeclaration_CashCount, Sum(Declaration.Declaration_Cheque) AS SumOfDeclaration_Cheque, Sum(Declaration.Declaration_ChequeServer) AS SumOfDeclaration_ChequeServer, Sum(Declaration.Declaration_ChequeCount) AS SumOfDeclaration_ChequeCount, Sum(Declaration.Declaration_Card) AS SumOfDeclaration_Card, Sum(Declaration.Declaration_CardServer) AS SumOfDeclaration_CardServer, Sum(Declaration.Declaration_CardCount) AS SumOfDeclaration_CardCount, Sum(Declaration.Declaration_Payout) AS SumOfDeclaration_Payout, Sum(Declaration.Declaration_PayoutServer) AS SumOfDeclaration_PayoutServer, Sum(Declaration.Declaration_PayoutCount) AS SumOfDeclaration_PayoutCount FROM Declaration INNER JOIN POS ON Declaration.Declaration_POSID = POS.POSID Where (((Declaration.Declaration_DayEndID) = " + id + ")) "; sql = sql + "GROUP BY POS.POSID, POS.POS_Name;"; } else { sql = "SELECT POS.POSID, POS.POS_Name, Sum(IIf(IIf(IsNull(Declaration.Declaration_CashDrop),0,Declaration.Declaration_CashDrop)=0,Declaration.Declaration_Cash,Declaration.Declaration_CashDrop)) AS SumOfDeclaration_Cash, Sum(IIf(IIf(IsNull(Declaration.Declaration_CashServerDrop),0,Declaration.Declaration_CashServerDrop)=0,Declaration.Declaration_CashServer,Declaration.Declaration_CashServerDrop)) AS SumOfDeclaration_CashServer, Sum(IIf(IIf(IsNull(Declaration.Declaration_CashCountDrop),0,Declaration.Declaration_CashCountDrop)=0,Declaration.Declaration_CashCount,Declaration.Declaration_CashCountDrop)) AS SumOfDeclaration_CashCount, "; sql = sql + "Sum(Declaration.Declaration_Cheque) AS SumOfDeclaration_Cheque, Sum(Declaration.Declaration_ChequeServer) AS SumOfDeclaration_ChequeServer, Sum(Declaration.Declaration_ChequeCount) AS SumOfDeclaration_ChequeCount, Sum(Declaration.Declaration_Card) AS SumOfDeclaration_Card, Sum(Declaration.Declaration_CardServer) AS SumOfDeclaration_CardServer, Sum(Declaration.Declaration_CardCount) AS SumOfDeclaration_CardCount, Sum(Declaration.Declaration_Payout) AS SumOfDeclaration_Payout, Sum(Declaration.Declaration_PayoutServer) AS SumOfDeclaration_PayoutServer, Sum(Declaration.Declaration_PayoutCount) AS SumOfDeclaration_PayoutCount FROM Declaration INNER JOIN POS ON Declaration.Declaration_POSID = POS.POSID Where (((Declaration.Declaration_DayEndID) = " + id + ")) "; sql = sql + "GROUP BY POS.POSID, POS.POS_Name;"; } Debug.Print(sql); rsBanking = modRecordSet.getRS(ref sql); rsPayout = modRecordSet.getRS(ref "select * from Payout WHERE Payout_DayEndID = " + id); if (rsBanking.RecordCount == 0) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section2. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section2").SectionFormat.EnableSuppress = true; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section3. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section3").SectionFormat.EnableSuppress = true; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section2. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section2").SectionFormat.EnableSuppress = false; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section3. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section3").SectionFormat.EnableSuppress = false; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport1. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.OpenSubreport("Subreport1").Database.Tables(1).SetDataSource(rsBanking); //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport2. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.OpenSubreport("Subreport2").Database.Tables(1).SetDataSource(rsBanking); } if (rsPayout.RecordCount == 0) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section4. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section4").SectionFormat.EnableSuppress = true; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section4. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section4").SectionFormat.EnableSuppress = false; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport3. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.OpenSubreport("Subreport3").Database.Tables(1).SetDataSource(rsPayout); } //************************************ //*** Sales Channels //************************************ if (gParameters & gParChannel) { rs = modRecordSet.getRS(ref "SELECT * FROM Channel"); while (!(rs.EOF)) { switch (rs.Fields("ChannelID").Value) { case 1: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC1. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC1", rs.Fields("Channel_Code")); break; case 2: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC2. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC2", rs.Fields("Channel_Code")); break; case 3: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC3. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC3", rs.Fields("Channel_Code")); break; case 4: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC4. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC4", rs.Fields("Channel_Code")); break; case 5: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC5. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC5", rs.Fields("Channel_Code")); break; case 6: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC6. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC6", rs.Fields("Channel_Code")); break; case 7: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC7. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC7", rs.Fields("Channel_Code")); break; case 8: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC8. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC8", rs.Fields("Channel_Code")); break; case 9: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSC9. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSC9", rs.Fields("Channel_Code")); break; } rs.moveNext(); } rs.Close(); rs = modRecordSet.getRS(ref "SELECT Sum(Sale.Sale_Discount) AS amount FROM Consignment RIGHT JOIN (Consignment AS Consignment_1 RIGHT JOIN Sale ON Consignment_1.Consignment_SaleID = Sale.SaleID) ON Consignment.Consignment_ReversalSaleID = Sale.SaleID WHERE (((Consignment.ConsignmentID) Is Null) AND ((Consignment_1.ConsignmentID) Is Null) AND ((Sale.Sale_PaymentType)<>5));"); //UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"' if (Information.IsDBNull(rs.Fields("amount").Value)) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCmDiscount. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCmDiscount", "0.00"); } else { if (rs.RecordCount) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCmDiscount. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCmDiscount", Strings.FormatNumber(0 - rs.Fields("amount").Value, 2)); } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCmDiscount. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCmDiscount", "0.00"); } } rs.Close(); rs = modRecordSet.getRS(ref "SELECT Sum([SaleItem_Price]*[SaleItem_Quantity]) AS SCTotal, Sale.Sale_ChannelID FROM Consignment AS Consignment_1 RIGHT JOIN (Consignment RIGHT JOIN (Sale INNER JOIN SaleItem ON Sale.SaleID = SaleItem.SaleItem_SaleID) ON Consignment.Consignment_SaleID = Sale.SaleID) ON Consignment_1.Consignment_ReversalSaleID = Sale.SaleID Where (((SaleItem.SaleItem_Revoke) = False) And ((Consignment.ConsignmentID) Is Null) And ((Consignment_1.ConsignmentID) Is Null) And ((Sale.Sale_DayEndID) = " + id + ")) GROUP BY Sale.Sale_ChannelID;"); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCmDiscount. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object lTotal. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' lTotal = Convert.ToDecimal(Report.ParameterFields("txtSCmDiscount").ToString); while (!(rs.EOF)) { switch (rs.Fields("Sale_ChannelID").Value) { case 1: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm1. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm1", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; case 2: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm2. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm2", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; case 3: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm3. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm3", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; case 4: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm4. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm4", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; case 5: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm5. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm5", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; case 6: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm6. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm6", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; case 7: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm7. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm7", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; case 8: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm8. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm8", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; case 9: //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCm9. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCm9", Strings.FormatNumber(rs.Fields("SCTotal").Value, 2)); break; } //UPGRADE_WARNING: Couldn't resolve default property of object lTotal. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' lTotal = lTotal + rs.Fields("SCTotal").Value; rs.moveNext(); } //UPGRADE_WARNING: Couldn't resolve default property of object lTotal. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSCmTotal. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSCmTotal", Strings.FormatNumber(lTotal, 2)); } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section5. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section5").SectionFormat.EnableSuppress = true; } if (gParameters & gParStock) { //******************************************* //***Stock Movement //******************************************* rs = modRecordSet.getRS(ref "SELECT Sum([DayEndStockItemLnk_QuantitySales]*[DayEndStockItemLnk_ListCost]) AS listSales, Sum([DayEndStockItemLnk_QuantitySales]*[DayEndStockItemLnk_ActualCost]) AS actualSales, Sum([DayEndStockItemLnk_QuantityShrink]*[DayEndStockItemLnk_ListCost]) AS listShrink, Sum([DayEndStockItemLnk_QuantityShrink]*[DayEndStockItemLnk_ActualCost]) AS actualShrink, Sum([DayEndStockItemLnk_QuantityGRV]*[DayEndStockItemLnk_ListCost]) AS listGRV, Sum([DayEndStockItemLnk_QuantityGRV]*[DayEndStockItemLnk_ActualCost]) AS actualGRV From DayEndStockItemLnk WHERE (((DayEndStockItemLnk.DayEndStockItemLnk_DayEndID)=" + id + "));"); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHRL. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHRL", Strings.FormatNumber(rs.Fields("listShrink").Value, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHRA. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHRA", Strings.FormatNumber(rs.Fields("actualShrink").Value, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtGRVL. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtGRVL", Strings.FormatNumber(rs.Fields("listGRV").Value, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtGRVA. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtGRVA", Strings.FormatNumber(rs.Fields("actualGRV").Value, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSaleL. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSaleL", Strings.FormatNumber(rs.Fields("listSales").Value, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSaleA. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSaleA", Strings.FormatNumber(rs.Fields("actualSales").Value, 2)); rs = modRecordSet.getRS(ref "SELECT Sum(([DayEndStockItemLnk_Quantity]-[DayEndStockItemLnk_QuantitySales]-[DayEndStockItemLnk_QuantityShrink]+[DayEndStockItemLnk_QuantityGRV])*[DayEndStockItemLnk_ListCost]) AS list, Sum(([DayEndStockItemLnk_Quantity]-[DayEndStockItemLnk_QuantitySales]-[DayEndStockItemLnk_QuantityShrink]+[DayEndStockItemLnk_QuantityGRV])*[DayEndStockItemLnk_actualCost]) AS actual From DayEndStockItemLnk WHERE (((DayEndStockItemLnk.DayEndStockItemLnk_DayEndID)=" + id + "));"); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHLclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHLclose", Strings.FormatNumber(rs.Fields("list").Value, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHAclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHAclose", Strings.FormatNumber(rs.Fields("actual").Value, 2)); rs = modRecordSet.getRS(ref "SELECT Sum([DayEndStockItemLnk_Quantity]*[DayEndStockItemLnk_ListCost]) AS list, Sum([DayEndStockItemLnk_Quantity]*[DayEndStockItemLnk_actualCost]) AS actual From DayEndStockItemLnk WHERE (((DayEndStockItemLnk.DayEndStockItemLnk_DayEndID)=" + id + "));"); if (rs.RecordCount) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHLopen. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHLopen", Strings.FormatNumber(rs.Fields("list").Value, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHAopen. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHAopen", Strings.FormatNumber(rs.Fields("actual").Value, 2)); } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHLopen. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHLopen", Strings.FormatNumber(0, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHAopen. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHAopen", Strings.FormatNumber(0, 2)); } rs = modRecordSet.getRS(ref "SELECT Sum(([DayEndStockItemLnk_Quantity]-[DayEndStockItemLnk_QuantitySales]-[DayEndStockItemLnk_QuantityShrink]+[DayEndStockItemLnk_QuantityGRV])*[DayEndStockItemLnk_ListCost]) AS list, Sum(([DayEndStockItemLnk_Quantity]-[DayEndStockItemLnk_QuantitySales]-[DayEndStockItemLnk_QuantityShrink]+[DayEndStockItemLnk_QuantityGRV])*[DayEndStockItemLnk_actualCost]) AS actual From DayEndStockItemLnk WHERE (((DayEndStockItemLnk.DayEndStockItemLnk_DayEndID)=" + id - 1 + "));"); if (rs.RecordCount) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHLPrevclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHLPrevclose", Strings.FormatNumber(rs.Fields("list").Value, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHAPrevclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHAPrevclose", Strings.FormatNumber(rs.Fields("actual").Value, 2)); } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHLPrevclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHLPrevclose", Strings.FormatNumber(0, 2)); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHAPrevclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSHAPrevclose", Strings.FormatNumber(0, 2)); } if (string.IsNullOrEmpty(Report.ParameterFields("txtSHLPrevclose").ToString)) Report.SetParameterValue("txtSHLPrevclose", Report.ParameterFields("txtSHLopen").ToString); if (string.IsNullOrEmpty(Report.ParameterFields("txtSHAPrevclose").ToString)) Report.SetParameterValue("txtSHAPrevclose", Report.ParameterFields("txtSHAopen").ToString); //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHLopen. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (string.IsNullOrEmpty(Report.ParameterFields("txtSHLopen").ToString)) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHLPrevclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (string.IsNullOrEmpty(Report.ParameterFields("txtSHLPrevclose").ToString)) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSVarianceL. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSVarianceL", Strings.FormatNumber(0, 2)); } else { Report.SetParameterValue("txtSVarianceL", Strings.FormatNumber(0 - Convert.ToDecimal(Report.ParameterFields("txtSHLPrevclose").ToString), 2)); } } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHLPrevclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (string.IsNullOrEmpty(Report.ParameterFields("txtSHLPrevclose").ToString)) { Report.SetParameterValue("txtSVarianceL", Strings.FormatNumber(Convert.ToDecimal(Report.ParameterFields("txtSHLopen").ToString), 2)); } else { Report.SetParameterValue("txtSVarianceL", Strings.FormatNumber(Convert.ToDecimal(Report.ParameterFields("txtSHLopen").ToString), 2 - Convert.ToDecimal(Report.ParameterFields("txtSHLPrevclose").ToString), 2)); } } //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHAopen. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (string.IsNullOrEmpty(Report.ParameterFields("txtSHAopen").ToString)) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHAPrevclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (string.IsNullOrEmpty(Report.ParameterFields("txtSHAPrevclose").ToString)) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSVarianceL. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.SetParameterValue("txtSVarianceL", Strings.FormatNumber(0, 2)); } else { Report.SetParameterValue("txtSVarianceL", Strings.FormatNumber(0 - Convert.ToDecimal(Report.ParameterFields("txtSHAPrevclose").ToString), 2)); } } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtSHAPrevclose. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (string.IsNullOrEmpty(Report.ParameterFields("txtSHAPrevclose").ToString)) { Report.SetParameterValue("txtSVarianceL", Strings.FormatNumber(Convert.ToDecimal(Report.ParameterFields("txtSHAopen").ToString), 2)); } else { Report.SetParameterValue("txtSVarianceL", Strings.FormatNumber(Convert.ToDecimal(Report.ParameterFields("txtSHAopen").ToString), 2 - Convert.ToDecimal(Report.ParameterFields("txtSHAPrevclose").ToString), 2)); } } } else { Report.ReportDefinition.Sections("Section6").SectionFormat.EnableSuppress = true; } if (gParameters & gParShrink) { rsShrink = modRecordSet.getRS(ref "SELECT StockItem.StockItem_Name, Sum(DayEndStockItemLnk.DayEndStockItemLnk_QuantityShrink) AS SumOfDayEndStockItemLnk_QuantityShrink, Sum([DayEndStockItemLnk_QuantityShrink]*[DayEndStockItemLnk_ListCost]) AS list, Sum([DayEndStockItemLnk_QuantityShrink]*[DayEndStockItemLnk_ActualCost]) AS actual FROM DayEndStockItemLnk INNER JOIN StockItem ON DayEndStockItemLnk.DayEndStockItemLnk_StockItemID = StockItem.StockItemID Where (((DayEndStockItemLnk.DayEndStockItemLnk_QuantityShrink) <> 0) And ((DayEndStockItemLnk.DayEndStockItemLnk_DayEndID) = " + id + ")) GROUP BY StockItem.StockItem_Name ORDER BY StockItem.StockItem_Name;"); if (rsShrink.RecordCount == 0) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section7. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section7").SectionFormat.EnableSuppress = true; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section7. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section7").SectionFormat.EnableSuppress = false; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport4. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.OpenSubreport("Subreport4").Database.Tables(1).SetDataSource(rsShrink); } } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section7. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section7").SectionFormat.EnableSuppress = true; } if (gParameters & gParSupplier) { rsSupplier = modRecordSet.getRS(ref "SELECT Supplier.Supplier_Name, SupplierTransaction.* FROM SupplierTransaction INNER JOIN Supplier ON SupplierTransaction.SupplierTransaction_SupplierID = Supplier.SupplierID Where (((SupplierTransaction.SupplierTransaction_DayEndID) = " + id + ") And ((SupplierTransaction.SupplierTransaction_TransactionTypeID) = 2 Or (SupplierTransaction.SupplierTransaction_TransactionTypeID) = 3)) ORDER BY SupplierTransaction.SupplierTransaction_DayEndID, SupplierTransaction.SupplierTransactionID;"); if (rsSupplier.RecordCount == 0) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section8. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section8").SectionFormat.EnableSuppress = true; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section8. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section8").SectionFormat.EnableSuppress = false; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport5. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.OpenSubreport("Subreport5").Database.Tables(1).SetDataSource(rsSupplier); } } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section8. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section8").SectionFormat.EnableSuppress = true; } if (gParameters & gParCustomer) { rsCustomer = modRecordSet.getRS(ref "SELECT Customer.Customer_InvoiceName, TransactionType.TransactionType_Name, CustomerTransaction.CustomerTransaction_Reference, CustomerTransaction.CustomerTransaction_Date, CustomerTransaction.CustomerTransaction_Description, CustomerTransaction.CustomerTransaction_Amount, CustomerTransaction.CustomerTransaction_DayEndID, CustomerTransaction.CustomerTransaction_Description, TransactionType.TransactionTypeID FROM (CustomerTransaction INNER JOIN Customer ON CustomerTransaction.CustomerTransaction_CustomerID = Customer.CustomerID) INNER JOIN TransactionType ON CustomerTransaction.CustomerTransaction_TransactionTypeID = TransactionType.TransactionTypeID Where (((CustomerTransaction.CustomerTransaction_DayEndID) = " + id + ")) ORDER BY Customer.Customer_InvoiceName, CustomerTransaction.CustomerTransaction_Date;"); if (rsCustomer.RecordCount == 0) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section9. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section9").SectionFormat.EnableSuppress = true; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section9. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section9").SectionFormat.EnableSuppress = false; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport6. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.OpenSubreport("Subreport6").Database.Tables(1).SetDataSource(rsCustomer); } } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section9. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section9").SectionFormat.EnableSuppress = true; } if (gParameters & gParQuote) { rsQuote = modRecordSet.getRS(ref "SELECT Quote.* From Quote Where (((Quote.Quote_DayEndID) = " + id + ")) ORDER BY Quote.Quote_Name;"); if (rsQuote.RecordCount == 0) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section10. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section10").SectionFormat.EnableSuppress = true; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section10. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section10").SectionFormat.EnableSuppress = false; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport7. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.OpenSubreport("Subreport7").Database.Tables(1).SetDataSource(rsQuote); } } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section10. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section10").SectionFormat.EnableSuppress = true; } if (gParameters & gParQuote) { rsConsignment = modRecordSet.getRS(ref "SELECT Consignment.*, Sale.Sale_Total AS saleAmount,0 as completeAmount,0 as returnAmount FROM Consignment INNER JOIN Sale ON Consignment.Consignment_SaleID = Sale.SaleID Where (((Consignment.Consignment_DayEndID) = " + id + ")) Union SELECT Consignment.*, 0 AS saleAmount, [saleComplete]![Sale_Total] AS completeAmount, [SaleReturned]![Sale_Total]+[saleComplete]![Sale_Total] AS returnAmount FROM (Consignment INNER JOIN Sale AS SaleReturned ON Consignment.Consignment_ReversalSaleID = SaleReturned.SaleID) INNER JOIN Sale AS saleComplete ON Consignment.Consignment_CompleteSaleID = saleComplete.SaleID WHERE (((Consignment.Consignment_DayEndID)=" + id + "));"); if (rsConsignment.RecordCount == 0) { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section11. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section11").SectionFormat.EnableSuppress = true; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section11. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section11").SectionFormat.EnableSuppress = false; //UPGRADE_WARNING: Couldn't resolve default property of object Report.Subreport8. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.OpenSubreport("Subreport8").Database.Tables(1).SetDataSource(rsConsignment); } } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.Section11. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ReportDefinition.Sections("Section11").SectionFormat.EnableSuppress = true; } //UPGRADE_WARNING: Couldn't resolve default property of object Report.VerifyOnEveryPrint. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //'Report.VerifyOnEveryPrint = True if (Module1.bUploadReport == true) { Report.FileName = sPath; //UPGRADE_WARNING: Couldn't resolve default property of object Report.ExportOptions. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.RPTR, sPath); //Report.ExportOptions.DiskFileName = sPath //UPGRADE_WARNING: Couldn't resolve default property of object Report.ExportOptions. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.HTML40, sPath); //Report.ExportOptions.HTMLFileName = sPath //UPGRADE_WARNING: Couldn't resolve default property of object Report.ExportOptions. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //Report.ExportOptions.DestinationType = CRAXDRT.CRExportDestinationType.crEDTDiskFile //Report.ExportOptions.DestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile //UPGRADE_WARNING: Couldn't resolve default property of object Report.ExportOptions. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //Report.ExportOptions.FormatType = CRAXDRT.CRExportFormatType.crEFTExplorer32Extend //Report.ExportOptions.FormatType = CrystalDecisions.Shared.ExportFormatType.HTML40 //UPGRADE_WARNING: Couldn't resolve default property of object Report.Export. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //Report.Export(False) //UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"' System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; } else { //UPGRADE_WARNING: Couldn't resolve default property of object Report.txtTitle. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' My.MyProject.Forms.frmReportShow.Text = Report.ParameterFields("txtTitle").ToString; My.MyProject.Forms.frmReportShow.CRViewer1.ReportSource = Report; My.MyProject.Forms.frmReportShow.mReport = Report; My.MyProject.Forms.frmReportShow.sMode = "0"; My.MyProject.Forms.frmReportShow.CRViewer1.Refresh(); System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; My.MyProject.Forms.frmReportShow.ShowDialog(); } }