Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rInfcomprobante rpt = new rInfcomprobante();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        private void _Mtd_CargarReporte(string _P_Str_Cadena, bool _P_Bol_AnuladoPorSistema)
        {
            DataSet _Ds = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset(_P_Str_Cadena);

            _Ds.Tables[0].TableName = "vst_reportecomprobante";
            if (_Ds.Tables[0].Rows.Count > 0)
            {
                _Mtd_CargarComprobantes(_P_Str_Cadena, _Cmb_Reporte.SelectedValue);
                Report.rInfcomprobante _My_Reporte = new T3.Report.rInfcomprobante();
                _My_Reporte.SetDataSource(_Ds.Tables[0]);
                Section    _sec = _My_Reporte.ReportDefinition.Sections["Section1"];
                TextObject tex1 = _sec.ReportObjects["cabecera"] as TextObject;
                tex1.Text = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset("SELECT rtrim(cname) FROM TCOMPANY WHERE ccompany='" + Frm_Padre._Str_Comp + "'").Tables[0].Rows[0][0].ToString();
                TextObject tex2 = _sec.ReportObjects["rif"] as TextObject;
                tex2.Text = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset("SELECT rtrim(crif) FROM TCOMPANY WHERE ccompany='" + Frm_Padre._Str_Comp + "'").Tables[0].Rows[0][0].ToString();
                TextObject tex3 = _sec.ReportObjects["Direccion"] as TextObject;
                tex3.Text = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset("SELECT rtrim(caddressl) FROM TCOMPANY WHERE ccompany='" + Frm_Padre._Str_Comp + "'").Tables[0].Rows[0][0].ToString();
                TextObject tex4 = _sec.ReportObjects["Telefonos"] as TextObject;
                tex4.Text = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset("SELECT rtrim(cphone1) FROM TCOMPANY WHERE ccompany='" + Frm_Padre._Str_Comp + "'").Tables[0].Rows[0][0].ToString();
                TextObject tex5 = _sec.ReportObjects["Email"] as TextObject;
                tex5.Text = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset("SELECT rtrim(cemail) FROM TCOMPANY WHERE ccompany='" + Frm_Padre._Str_Comp + "'").Tables[0].Rows[0][0].ToString();
                if (_P_Bol_AnuladoPorSistema)
                {
                    TextObject tex6 = _sec.ReportObjects["Text12"] as TextObject;
                    tex6.Text = "(Anulado por el sistema)";
                }
                this._Rpv_Main.ReportSource = _My_Reporte;
                _Rpv_Main.RefreshReport();
                _My_Reporte_G = _My_Reporte;
                //_My_Reporte.Close();
                //_My_Reporte.Dispose();
            }
            else
            {
                this._Rpv_Main.ReportSource = null;
            }
        }