www.pudn.com > DevPrintReport.rar > XRptMX.cs, change:2010-12-27,size:1333b


using System; 
using System.Drawing; 
using System.Collections; 
using System.ComponentModel; 
using DevExpress.XtraReports.UI; 
using System.Data; 
 
namespace TZL_Print 
{ 
    public partial class XRptMX : DevExpress.XtraReports.UI.XtraReport 
    { 
        public XRptMX() 
        { 
            InitializeComponent(); 
        } 
        DataSet DataS_打印 = new DataSet(); 
        string uc_类名 = ""; 
        public XRptMX(ref DataSet ds, string uc_name) 
            : this() 
        { 
            DataS_打印 = ds; 
            uc_类名 = uc_name; 
            try 
            { 
                Data_TPrint = DataS_打印.Tables[DataS_打印.Tables.Count - 1]; 
            } 
            catch { } 
        } 
        DataTable Data_TPrint = new DataTable(); 
        public XRptMX(ref DataTable dt, string uc_name) 
            : this() 
        { 
            this.DataSource = dt; 
            Data_TPrint = dt; 
            uc_类名 = uc_name; 
            xrPivotGrid1.DataSource = Data_TPrint.DefaultView; 
        } 
        private void XtraReport1_DesignerLoaded(object sender, DevExpress.XtraReports.UserDesigner.DesignerLoadedEventArgs e) 
        { 
            xrPivotGrid1.DataSource = Data_TPrint.DefaultView;// this.DataSource; 
            //xrPivotGrid1.DataSource = Data_TPrint; 
        } 
 
    } 
}