public void PivotReportFormPivotReflectionTest() { XRPivotGrid xrPivotGrid; using (var pivotGrid = new AvrPivotGrid()) { var dataTable = new AvrDataTable(DataHelper.GenerateTestTable()); pivotGrid.SetDataSourceAndCreateFields(dataTable); xrPivotGrid = new XRPivotGrid(); ReflectionHelper.CopyCommonProperties(pivotGrid, xrPivotGrid); Assert.AreEqual(pivotGrid.DataSource.RealPivotData, xrPivotGrid.DataSource); Assert.AreNotEqual(pivotGrid.Fields.Count, xrPivotGrid.Fields.Count); } Assert.AreEqual(0, xrPivotGrid.Fields.Count); }
public XtraReport CreatePivotGridReport() { XtraReport1 report = new XtraReport1(); XRPivotGrid pivotGrid = report.xrPivotGrid1; var session = HttpContext.Current.Session; byte[] collapsedState = (byte[])session["CollapsedState"]; byte[] layout = (byte[])session["Layout"]; if (collapsedState != null && layout != null) { using (MemoryStream collapsedStateMS = new MemoryStream(collapsedState)) using (MemoryStream layoutMS = new MemoryStream(layout)) { PivotGridData data = ((IPivotGridDataContainer)pivotGrid).Data; new DevExpress.Utils.Serializing.XmlXtraSerializer().DeserializeObject(pivotGrid, layoutMS, "PivotGrid"); data.LoadCollapsedStateFromStream(collapsedStateMS); } } return(report); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); DevExpress.DataAccess.Sql.StoredProcQuery storedProcQuery1 = new DevExpress.DataAccess.Sql.StoredProcQuery(); DevExpress.DataAccess.Sql.QueryParameter queryParameter1 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter2 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter3 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter4 = new DevExpress.DataAccess.Sql.QueryParameter(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CustodyTest)); DevExpress.XtraReports.Parameters.DynamicListLookUpSettings dynamicListLookUpSettings1 = new DevExpress.XtraReports.Parameters.DynamicListLookUpSettings(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand(); this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand(); this.xrPivotGrid1 = new DevExpress.XtraReports.UI.XRPivotGrid(); this.sqlDataSource1 = new DevExpress.DataAccess.Sql.SqlDataSource(this.components); this.Culture = new DevExpress.XtraReports.Parameters.Parameter(); this.CompanyId = new DevExpress.XtraReports.Parameters.Parameter(); this.CompanyName = new DevExpress.XtraReports.Parameters.Parameter(); this.User = new DevExpress.XtraReports.Parameters.Parameter(); this.MappingDeptIds = new DevExpress.XtraReports.Parameters.Parameter(); this.MappingEmpIds = new DevExpress.XtraReports.Parameters.Parameter(); this.DeptIds = new DevExpress.XtraReports.Parameters.Parameter(); this.fieldCustodyCat1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldEmpName1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCode1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldEmpId1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldjobName1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldjobId1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fielddeptName1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fielddeptId1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldReceiveDate1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldDeliveryDate1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fielddeliveryStatus1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldQtyOfRecievedItem1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCustodyCode1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCustodyName1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCustodyEnteringDate1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCustodyTimeOutDate1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCustodySerialNo1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCustodyPurchaseDate1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldPurchaseAmount1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldInUse1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldReceiveStatus1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldInitialCustodyAmount1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldDisposal1 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCustodyCat12 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrPivotGrid1 }); this.Detail.HeightF = 100F; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // TopMargin // this.TopMargin.HeightF = 11.80556F; this.TopMargin.Name = "TopMargin"; this.TopMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.TopMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // BottomMargin // this.BottomMargin.HeightF = 9.722222F; this.BottomMargin.Name = "BottomMargin"; this.BottomMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.BottomMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // xrPivotGrid1 // this.xrPivotGrid1.Appearance.Cell.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.CustomTotalCell.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.FieldHeader.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.FieldValue.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.FieldValueGrandTotal.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.FieldValueTotal.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.GrandTotalCell.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.Lines.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.TotalCell.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.DataMember = "SP_EmployeeCustody"; this.xrPivotGrid1.DataSource = this.sqlDataSource1; this.xrPivotGrid1.Fields.AddRange(new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField[] { this.fieldEmpName1, this.fieldCode1, this.fieldEmpId1, this.fieldjobName1, this.fieldjobId1, this.fielddeptName1, this.fielddeptId1, this.fieldReceiveDate1, this.fieldDeliveryDate1, this.fielddeliveryStatus1, this.fieldQtyOfRecievedItem1, this.fieldCustodyCode1, this.fieldCustodyName1, this.fieldCustodyEnteringDate1, this.fieldCustodyTimeOutDate1, this.fieldCustodySerialNo1, this.fieldCustodyPurchaseDate1, this.fieldCustodyCat1, this.fieldPurchaseAmount1, this.fieldInUse1, this.fieldReceiveStatus1, this.fieldInitialCustodyAmount1, this.fieldDisposal1, this.fieldCustodyCat12 }); this.xrPivotGrid1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.xrPivotGrid1.Name = "xrPivotGrid1"; this.xrPivotGrid1.OptionsPrint.FilterSeparatorBarPadding = 3; this.xrPivotGrid1.SizeF = new System.Drawing.SizeF(673.3333F, 100F); // // sqlDataSource1 // this.sqlDataSource1.ConnectionName = "HrContext"; this.sqlDataSource1.Name = "sqlDataSource1"; storedProcQuery1.Name = "SP_EmployeeCustody"; queryParameter1.Name = "@Culture"; queryParameter1.Type = typeof(DevExpress.DataAccess.Expression); queryParameter1.Value = new DevExpress.DataAccess.Expression("[Parameters.Culture]", typeof(string)); queryParameter2.Name = "@LoginCompanyId"; queryParameter2.Type = typeof(DevExpress.DataAccess.Expression); queryParameter2.Value = new DevExpress.DataAccess.Expression("[Parameters.CompanyId]", typeof(int)); queryParameter3.Name = "@deptName"; queryParameter3.Type = typeof(DevExpress.DataAccess.Expression); queryParameter3.Value = new DevExpress.DataAccess.Expression("[Parameters.MappingDeptIds]", typeof(string)); queryParameter4.Name = "@empIds"; queryParameter4.Type = typeof(DevExpress.DataAccess.Expression); queryParameter4.Value = new DevExpress.DataAccess.Expression("[Parameters.MappingEmpIds]", typeof(string)); storedProcQuery1.Parameters.Add(queryParameter1); storedProcQuery1.Parameters.Add(queryParameter2); storedProcQuery1.Parameters.Add(queryParameter3); storedProcQuery1.Parameters.Add(queryParameter4); storedProcQuery1.StoredProcName = "SP_EmployeeCustody"; this.sqlDataSource1.Queries.AddRange(new DevExpress.DataAccess.Sql.SqlQuery[] { storedProcQuery1 }); this.sqlDataSource1.ResultSchemaSerializable = resources.GetString("sqlDataSource1.ResultSchemaSerializable"); // // Culture // this.Culture.Description = "Culture"; this.Culture.Name = "Culture"; this.Culture.ValueInfo = "ar-EG"; this.Culture.Visible = false; // // CompanyId // this.CompanyId.Description = "CompanyId"; this.CompanyId.Name = "CompanyId"; this.CompanyId.Type = typeof(int); this.CompanyId.ValueInfo = "0"; this.CompanyId.Visible = false; // // CompanyName // this.CompanyName.Description = "CompanyName"; this.CompanyName.Name = "CompanyName"; this.CompanyName.Visible = false; // // User // this.User.Description = "User"; this.User.Name = "User"; this.User.Visible = false; // // MappingDeptIds // this.MappingDeptIds.Description = "MappingDeptIds"; this.MappingDeptIds.Name = "MappingDeptIds"; this.MappingDeptIds.Visible = false; // // MappingEmpIds // this.MappingEmpIds.Description = "MappingEmpIds"; this.MappingEmpIds.Name = "MappingEmpIds"; this.MappingEmpIds.Visible = false; // // DeptIds // this.DeptIds.Description = "الإدارة"; dynamicListLookUpSettings1.DataAdapter = null; dynamicListLookUpSettings1.DataMember = "SP_EmployeeCustody"; dynamicListLookUpSettings1.DataSource = this.sqlDataSource1; dynamicListLookUpSettings1.DisplayMember = "deptName"; dynamicListLookUpSettings1.ValueMember = "deptId"; this.DeptIds.LookUpSettings = dynamicListLookUpSettings1; this.DeptIds.Name = "DeptIds"; this.DeptIds.Type = typeof(int); this.DeptIds.ValueInfo = "0"; // // fieldCustodyCat1 // this.fieldCustodyCat1.AreaIndex = 16; this.fieldCustodyCat1.FieldName = "CustodyCat"; this.fieldCustodyCat1.Name = "fieldCustodyCat1"; // // fieldEmpName1 // this.fieldEmpName1.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fieldEmpName1.AreaIndex = 3; this.fieldEmpName1.FieldName = "EmpName"; this.fieldEmpName1.MinWidth = 10; this.fieldEmpName1.Name = "fieldEmpName1"; this.fieldEmpName1.Options.ShowCustomTotals = false; this.fieldEmpName1.Options.ShowGrandTotal = false; this.fieldEmpName1.Options.ShowTotals = false; this.fieldEmpName1.TotalsVisibility = DevExpress.XtraPivotGrid.PivotTotalsVisibility.None; // // fieldCode1 // this.fieldCode1.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fieldCode1.AreaIndex = 2; this.fieldCode1.FieldName = "Code"; this.fieldCode1.Name = "fieldCode1"; this.fieldCode1.Options.ShowCustomTotals = false; this.fieldCode1.Options.ShowGrandTotal = false; this.fieldCode1.Options.ShowTotals = false; this.fieldCode1.TotalsVisibility = DevExpress.XtraPivotGrid.PivotTotalsVisibility.None; // // fieldEmpId1 // this.fieldEmpId1.AreaIndex = 0; this.fieldEmpId1.FieldName = "EmpId"; this.fieldEmpId1.Name = "fieldEmpId1"; // // fieldjobName1 // this.fieldjobName1.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fieldjobName1.AreaIndex = 1; this.fieldjobName1.FieldName = "jobName"; this.fieldjobName1.Name = "fieldjobName1"; this.fieldjobName1.Options.ShowCustomTotals = false; this.fieldjobName1.Options.ShowGrandTotal = false; this.fieldjobName1.Options.ShowTotals = false; this.fieldjobName1.TotalsVisibility = DevExpress.XtraPivotGrid.PivotTotalsVisibility.None; // // fieldjobId1 // this.fieldjobId1.AreaIndex = 1; this.fieldjobId1.FieldName = "jobId"; this.fieldjobId1.Name = "fieldjobId1"; // // fielddeptName1 // this.fielddeptName1.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fielddeptName1.AreaIndex = 0; this.fielddeptName1.FieldName = "deptName"; this.fielddeptName1.Name = "fielddeptName1"; this.fielddeptName1.Options.ShowCustomTotals = false; this.fielddeptName1.Options.ShowGrandTotal = false; this.fielddeptName1.Options.ShowTotals = false; this.fielddeptName1.TotalsVisibility = DevExpress.XtraPivotGrid.PivotTotalsVisibility.None; // // fielddeptId1 // this.fielddeptId1.AreaIndex = 2; this.fielddeptId1.FieldName = "deptId"; this.fielddeptId1.Name = "fielddeptId1"; // // fieldReceiveDate1 // this.fieldReceiveDate1.AreaIndex = 3; this.fieldReceiveDate1.FieldName = "ReceiveDate"; this.fieldReceiveDate1.Name = "fieldReceiveDate1"; // // fieldDeliveryDate1 // this.fieldDeliveryDate1.AreaIndex = 4; this.fieldDeliveryDate1.FieldName = "DeliveryDate"; this.fieldDeliveryDate1.Name = "fieldDeliveryDate1"; // // fielddeliveryStatus1 // this.fielddeliveryStatus1.AreaIndex = 5; this.fielddeliveryStatus1.FieldName = "deliveryStatus"; this.fielddeliveryStatus1.Name = "fielddeliveryStatus1"; // // fieldQtyOfRecievedItem1 // this.fieldQtyOfRecievedItem1.AreaIndex = 6; this.fieldQtyOfRecievedItem1.FieldName = "QtyOfRecievedItem"; this.fieldQtyOfRecievedItem1.Name = "fieldQtyOfRecievedItem1"; // // fieldCustodyCode1 // this.fieldCustodyCode1.AreaIndex = 8; this.fieldCustodyCode1.FieldName = "CustodyCode"; this.fieldCustodyCode1.KPIGraphic = DevExpress.XtraPivotGrid.PivotKPIGraphic.Shapes; this.fieldCustodyCode1.Name = "fieldCustodyCode1"; this.fieldCustodyCode1.Options.ShowCustomTotals = false; this.fieldCustodyCode1.Options.ShowGrandTotal = false; this.fieldCustodyCode1.Options.ShowTotals = false; this.fieldCustodyCode1.TotalsVisibility = DevExpress.XtraPivotGrid.PivotTotalsVisibility.None; // // fieldCustodyName1 // this.fieldCustodyName1.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea; this.fieldCustodyName1.AreaIndex = 1; this.fieldCustodyName1.FieldName = "CustodyName"; this.fieldCustodyName1.Name = "fieldCustodyName1"; this.fieldCustodyName1.Options.ShowCustomTotals = false; this.fieldCustodyName1.Options.ShowGrandTotal = false; this.fieldCustodyName1.Options.ShowTotals = false; this.fieldCustodyName1.TotalsVisibility = DevExpress.XtraPivotGrid.PivotTotalsVisibility.None; // // fieldCustodyEnteringDate1 // this.fieldCustodyEnteringDate1.AreaIndex = 7; this.fieldCustodyEnteringDate1.FieldName = "CustodyEnteringDate"; this.fieldCustodyEnteringDate1.Name = "fieldCustodyEnteringDate1"; // // fieldCustodyTimeOutDate1 // this.fieldCustodyTimeOutDate1.AreaIndex = 9; this.fieldCustodyTimeOutDate1.FieldName = "CustodyTimeOutDate"; this.fieldCustodyTimeOutDate1.Name = "fieldCustodyTimeOutDate1"; // // fieldCustodySerialNo1 // this.fieldCustodySerialNo1.AreaIndex = 10; this.fieldCustodySerialNo1.FieldName = "CustodySerialNo"; this.fieldCustodySerialNo1.Name = "fieldCustodySerialNo1"; // // fieldCustodyPurchaseDate1 // this.fieldCustodyPurchaseDate1.AreaIndex = 11; this.fieldCustodyPurchaseDate1.FieldName = "CustodyPurchaseDate"; this.fieldCustodyPurchaseDate1.Name = "fieldCustodyPurchaseDate1"; // // fieldPurchaseAmount1 // this.fieldPurchaseAmount1.AreaIndex = 12; this.fieldPurchaseAmount1.FieldName = "PurchaseAmount"; this.fieldPurchaseAmount1.Name = "fieldPurchaseAmount1"; // // fieldInUse1 // this.fieldInUse1.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.fieldInUse1.AreaIndex = 0; this.fieldInUse1.FieldName = "InUse"; this.fieldInUse1.KPIGraphic = DevExpress.XtraPivotGrid.PivotKPIGraphic.Shapes; this.fieldInUse1.Name = "fieldInUse1"; this.fieldInUse1.Options.ShowCustomTotals = false; this.fieldInUse1.Options.ShowGrandTotal = false; this.fieldInUse1.Options.ShowTotals = false; this.fieldInUse1.TotalsVisibility = DevExpress.XtraPivotGrid.PivotTotalsVisibility.None; // // fieldReceiveStatus1 // this.fieldReceiveStatus1.AreaIndex = 13; this.fieldReceiveStatus1.FieldName = "ReceiveStatus"; this.fieldReceiveStatus1.Name = "fieldReceiveStatus1"; // // fieldInitialCustodyAmount1 // this.fieldInitialCustodyAmount1.AreaIndex = 14; this.fieldInitialCustodyAmount1.FieldName = "InitialCustodyAmount"; this.fieldInitialCustodyAmount1.Name = "fieldInitialCustodyAmount1"; // // fieldDisposal1 // this.fieldDisposal1.AreaIndex = 15; this.fieldDisposal1.FieldName = "Disposal"; this.fieldDisposal1.Name = "fieldDisposal1"; // // fieldCustodyCat12 // this.fieldCustodyCat12.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea; this.fieldCustodyCat12.AreaIndex = 0; this.fieldCustodyCat12.FieldName = "CustodyCat_1"; this.fieldCustodyCat12.Name = "fieldCustodyCat12"; this.fieldCustodyCat12.Options.ShowCustomTotals = false; this.fieldCustodyCat12.Options.ShowGrandTotal = false; this.fieldCustodyCat12.Options.ShowTotals = false; this.fieldCustodyCat12.TotalsVisibility = DevExpress.XtraPivotGrid.PivotTotalsVisibility.None; // // CustodyTest // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.TopMargin, this.BottomMargin }); this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] { this.sqlDataSource1 }); this.Margins = new System.Drawing.Printing.Margins(10, 17, 12, 10); this.Parameters.AddRange(new DevExpress.XtraReports.Parameters.Parameter[] { this.Culture, this.CompanyId, this.CompanyName, this.User, this.MappingDeptIds, this.MappingEmpIds, this.DeptIds }); this.Version = "17.1"; ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); DevExpress.DataAccess.Sql.StoredProcQuery storedProcQuery1 = new DevExpress.DataAccess.Sql.StoredProcQuery(); DevExpress.DataAccess.Sql.QueryParameter queryParameter1 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter2 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter3 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter4 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter5 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter6 = new DevExpress.DataAccess.Sql.QueryParameter(); DevExpress.DataAccess.Sql.QueryParameter queryParameter7 = new DevExpress.DataAccess.Sql.QueryParameter(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(en_DisposalEmployeesCustodies)); DevExpress.XtraReports.Parameters.DynamicListLookUpSettings dynamicListLookUpSettings1 = new DevExpress.XtraReports.Parameters.DynamicListLookUpSettings(); DevExpress.XtraReports.Parameters.DynamicListLookUpSettings dynamicListLookUpSettings2 = new DevExpress.XtraReports.Parameters.DynamicListLookUpSettings(); DevExpress.XtraReports.Parameters.DynamicListLookUpSettings dynamicListLookUpSettings3 = new DevExpress.XtraReports.Parameters.DynamicListLookUpSettings(); this.sqlDataSource1 = new DevExpress.DataAccess.Sql.SqlDataSource(this.components); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.xrPivotGrid1 = new DevExpress.XtraReports.UI.XRPivotGrid(); this.fielddeptName = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldEmpName = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCustodyName = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldEmployeeCustodyPrice = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand(); this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.companyLogo = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.CompanyName = new DevExpress.XtraReports.Parameters.Parameter(); this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand(); this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo(); this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); this.User = new DevExpress.XtraReports.Parameters.Parameter(); this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); this.formattingRule1 = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRule2 = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRule3 = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRule4 = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRule5 = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRule6 = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRule7 = new DevExpress.XtraReports.UI.FormattingRule(); this.Odding = new DevExpress.XtraReports.UI.XRControlStyle(); this.GroupCaption3 = new DevExpress.XtraReports.UI.XRControlStyle(); this.xrControlStyle1 = new DevExpress.XtraReports.UI.XRControlStyle(); this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); this.xrControlStyle4 = new DevExpress.XtraReports.UI.XRControlStyle(); this.xrControlStyle2 = new DevExpress.XtraReports.UI.XRControlStyle(); this.tbl_header_style = new DevExpress.XtraReports.UI.XRControlStyle(); this.tbl_even_detail = new DevExpress.XtraReports.UI.XRControlStyle(); this.tbl_odd_detail = new DevExpress.XtraReports.UI.XRControlStyle(); this.StatusImg = new DevExpress.XtraReports.UI.CalculatedField(); this.PeriodYear = new DevExpress.XtraReports.UI.CalculatedField(); this.PeriodMonth = new DevExpress.XtraReports.UI.CalculatedField(); this.PeriodDay = new DevExpress.XtraReports.UI.CalculatedField(); this.InUse = new DevExpress.XtraReports.Parameters.Parameter(); this.categoryIds = new DevExpress.XtraReports.Parameters.Parameter(); this.DeptIds = new DevExpress.XtraReports.Parameters.Parameter(); this.EmpIds = new DevExpress.XtraReports.Parameters.Parameter(); this.from = new DevExpress.XtraReports.Parameters.Parameter(); this.to = new DevExpress.XtraReports.Parameters.Parameter(); this.Culture = new DevExpress.XtraReports.Parameters.Parameter(); this.CompanyId = new DevExpress.XtraReports.Parameters.Parameter(); this.MappingEmpIds = new DevExpress.XtraReports.Parameters.Parameter(); this.MappingDeptIds = new DevExpress.XtraReports.Parameters.Parameter(); this.ReportName = new DevExpress.XtraReports.Parameters.Parameter(); this.MappingInUse = new DevExpress.XtraReports.Parameters.Parameter(); this.MappingCategoryIds = new DevExpress.XtraReports.Parameters.Parameter(); this.Custodystatus = new DevExpress.XtraReports.Parameters.Parameter(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // sqlDataSource1 // this.sqlDataSource1.ConnectionName = "HrContext"; this.sqlDataSource1.Name = "sqlDataSource1"; storedProcQuery1.Name = "SP_EmployeeCustody"; queryParameter1.Name = "@Culture"; queryParameter1.Type = typeof(DevExpress.DataAccess.Expression); queryParameter1.Value = new DevExpress.DataAccess.Expression("[Parameters.Culture]", typeof(string)); queryParameter2.Name = "@LoginCompanyId"; queryParameter2.Type = typeof(DevExpress.DataAccess.Expression); queryParameter2.Value = new DevExpress.DataAccess.Expression("[Parameters.CompanyId]", typeof(int)); queryParameter3.Name = "@deptName"; queryParameter3.Type = typeof(DevExpress.DataAccess.Expression); queryParameter3.Value = new DevExpress.DataAccess.Expression("[Parameters.MappingDeptIds]", typeof(string)); queryParameter4.Name = "@empIds"; queryParameter4.Type = typeof(DevExpress.DataAccess.Expression); queryParameter4.Value = new DevExpress.DataAccess.Expression("[Parameters.MappingEmpIds]", typeof(string)); queryParameter5.Name = "@inuse"; queryParameter5.Type = typeof(DevExpress.DataAccess.Expression); queryParameter5.Value = new DevExpress.DataAccess.Expression("[Parameters.MappingInUse]", typeof(string)); queryParameter6.Name = "@categoryIds"; queryParameter6.Type = typeof(DevExpress.DataAccess.Expression); queryParameter6.Value = new DevExpress.DataAccess.Expression("[Parameters.MappingCategoryIds]", typeof(string)); queryParameter7.Name = "@disposal"; queryParameter7.Type = typeof(string); queryParameter7.ValueInfo = "0"; storedProcQuery1.Parameters.Add(queryParameter1); storedProcQuery1.Parameters.Add(queryParameter2); storedProcQuery1.Parameters.Add(queryParameter3); storedProcQuery1.Parameters.Add(queryParameter4); storedProcQuery1.Parameters.Add(queryParameter5); storedProcQuery1.Parameters.Add(queryParameter6); storedProcQuery1.Parameters.Add(queryParameter7); storedProcQuery1.StoredProcName = "SP_EmployeeCustody"; this.sqlDataSource1.Queries.AddRange(new DevExpress.DataAccess.Sql.SqlQuery[] { storedProcQuery1 }); this.sqlDataSource1.ResultSchemaSerializable = resources.GetString("sqlDataSource1.ResultSchemaSerializable"); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrPivotGrid1 }); this.Detail.Dpi = 254F; this.Detail.HeightF = 394.3473F; this.Detail.KeepTogether = true; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F); this.Detail.SortFields.AddRange(new DevExpress.XtraReports.UI.GroupField[] { new DevExpress.XtraReports.UI.GroupField("custodyName", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending), new DevExpress.XtraReports.UI.GroupField("custodyName", DevExpress.XtraReports.UI.XRColumnSortOrder.Descending), new DevExpress.XtraReports.UI.GroupField("delvryDate", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending), new DevExpress.XtraReports.UI.GroupField("delvryDate", DevExpress.XtraReports.UI.XRColumnSortOrder.Descending), new DevExpress.XtraReports.UI.GroupField("RecvDate", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending), new DevExpress.XtraReports.UI.GroupField("RecvDate", DevExpress.XtraReports.UI.XRColumnSortOrder.Descending), new DevExpress.XtraReports.UI.GroupField("CustodyCat", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending), new DevExpress.XtraReports.UI.GroupField("CustodyCat", DevExpress.XtraReports.UI.XRColumnSortOrder.Descending) }); this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // xrPivotGrid1 // this.xrPivotGrid1.Appearance.Cell.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.CustomTotalCell.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.FieldHeader.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.FieldValue.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.FieldValueGrandTotal.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.FieldValueTotal.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.GrandTotalCell.BackColor = System.Drawing.Color.Blue; this.xrPivotGrid1.Appearance.GrandTotalCell.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.Lines.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.Appearance.TotalCell.Font = new System.Drawing.Font("Tahoma", 8F); this.xrPivotGrid1.DataMember = "SP_EmployeeCustody"; this.xrPivotGrid1.DataSource = this.sqlDataSource1; this.xrPivotGrid1.Dpi = 254F; this.xrPivotGrid1.Fields.AddRange(new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField[] { this.fielddeptName, this.fieldEmpName, this.fieldCustodyName, this.fieldEmployeeCustodyPrice }); this.xrPivotGrid1.LocationFloat = new DevExpress.Utils.PointFloat(10.58333F, 0F); this.xrPivotGrid1.Name = "xrPivotGrid1"; this.xrPivotGrid1.OptionsPrint.FilterSeparatorBarPadding = 3; this.xrPivotGrid1.OptionsPrint.PrintColumnHeaders = DevExpress.Utils.DefaultBoolean.False; this.xrPivotGrid1.OptionsPrint.PrintDataHeaders = DevExpress.Utils.DefaultBoolean.False; this.xrPivotGrid1.OptionsPrint.PrintFilterHeaders = DevExpress.Utils.DefaultBoolean.False; this.xrPivotGrid1.SizeF = new System.Drawing.SizeF(2940.07F, 329.8472F); // // fielddeptName // this.fielddeptName.Appearance.FieldHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(215)))), ((int)(((byte)(227))))); this.fielddeptName.Appearance.FieldHeader.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Bold); this.fielddeptName.Appearance.FieldValue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(243)))), ((int)(((byte)(250))))); this.fielddeptName.Appearance.FieldValue.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F); this.fielddeptName.Appearance.FieldValueGrandTotal.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); this.fielddeptName.Appearance.FieldValueTotal.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(215)))), ((int)(((byte)(227))))); this.fielddeptName.Appearance.FieldValueTotal.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Bold); this.fielddeptName.Appearance.GrandTotalCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.fielddeptName.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fielddeptName.AreaIndex = 0; this.fielddeptName.Caption = "Department"; this.fielddeptName.FieldName = "deptName"; this.fielddeptName.Name = "fielddeptName"; this.fielddeptName.Width = 120; // // fieldEmpName // this.fieldEmpName.Appearance.FieldHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(215)))), ((int)(((byte)(227))))); this.fieldEmpName.Appearance.FieldHeader.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Bold); this.fieldEmpName.Appearance.FieldValue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(243)))), ((int)(((byte)(250))))); this.fieldEmpName.Appearance.FieldValue.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F); this.fieldEmpName.Appearance.FieldValueGrandTotal.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); this.fieldEmpName.Appearance.GrandTotalCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.fieldEmpName.Appearance.TotalCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.fieldEmpName.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fieldEmpName.AreaIndex = 1; this.fieldEmpName.Caption = "Employee Name"; this.fieldEmpName.FieldName = "EmpName"; this.fieldEmpName.Name = "fieldEmpName"; this.fieldEmpName.Width = 120; // // fieldCustodyName // this.fieldCustodyName.Appearance.FieldValue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(215)))), ((int)(((byte)(227))))); this.fieldCustodyName.Appearance.FieldValue.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Bold); this.fieldCustodyName.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea; this.fieldCustodyName.AreaIndex = 0; this.fieldCustodyName.Caption = "Custody Name"; this.fieldCustodyName.FieldName = "CustodyName"; this.fieldCustodyName.Name = "fieldCustodyName"; this.fieldCustodyName.Width = 120; // // fieldEmployeeCustodyPrice // this.fieldEmployeeCustodyPrice.Appearance.FieldHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(243)))), ((int)(((byte)(250))))); this.fieldEmployeeCustodyPrice.Appearance.FieldHeader.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F); this.fieldEmployeeCustodyPrice.Appearance.FieldValueGrandTotal.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128))))); this.fieldEmployeeCustodyPrice.Appearance.FieldValueTotal.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.fieldEmployeeCustodyPrice.Appearance.GrandTotalCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(243)))), ((int)(((byte)(250))))); this.fieldEmployeeCustodyPrice.Appearance.GrandTotalCell.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F); this.fieldEmployeeCustodyPrice.Appearance.TotalCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(215)))), ((int)(((byte)(227))))); this.fieldEmployeeCustodyPrice.Appearance.TotalCell.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Bold); this.fieldEmployeeCustodyPrice.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.fieldEmployeeCustodyPrice.AreaIndex = 0; this.fieldEmployeeCustodyPrice.Caption = "Purchase of received Custodies"; this.fieldEmployeeCustodyPrice.FieldName = "EmployeeCustodyPrice"; this.fieldEmployeeCustodyPrice.Name = "fieldEmployeeCustodyPrice"; // // TopMargin // this.TopMargin.Dpi = 254F; this.TopMargin.HeightF = 0F; this.TopMargin.Name = "TopMargin"; this.TopMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F); this.TopMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // BottomMargin // this.BottomMargin.Dpi = 254F; this.BottomMargin.HeightF = 0F; this.BottomMargin.Name = "BottomMargin"; this.BottomMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F); this.BottomMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // ReportHeader // this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.companyLogo, this.xrLabel4, this.xrLabel1 }); this.ReportHeader.Dpi = 254F; this.ReportHeader.HeightF = 219.9306F; this.ReportHeader.Name = "ReportHeader"; // // companyLogo // this.companyLogo.Dpi = 254F; this.companyLogo.LocationFloat = new DevExpress.Utils.PointFloat(10.58333F, 0F); this.companyLogo.Name = "companyLogo"; this.companyLogo.SizeF = new System.Drawing.SizeF(400F, 200F); this.companyLogo.Sizing = DevExpress.XtraPrinting.ImageSizeMode.Squeeze; // // xrLabel4 // this.xrLabel4.BorderColor = System.Drawing.Color.Transparent; this.xrLabel4.Dpi = 254F; this.xrLabel4.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.xrLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(128))))); this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(825.6727F, 38.99773F); this.xrLabel4.Name = "xrLabel4"; this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254F); this.xrLabel4.SizeF = new System.Drawing.SizeF(1178.278F, 161.0023F); this.xrLabel4.StylePriority.UseBorderColor = false; this.xrLabel4.StylePriority.UseFont = false; this.xrLabel4.StylePriority.UseForeColor = false; this.xrLabel4.StylePriority.UseTextAlignment = false; this.xrLabel4.Text = "تقرير عهد الموظفين المستهلكة"; this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // xrLabel1 // this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding(this.CompanyName, "Text", "") }); this.xrLabel1.Dpi = 254F; this.xrLabel1.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 14F, System.Drawing.FontStyle.Bold); this.xrLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(128))))); this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(2192.181F, 0F); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254F); this.xrLabel1.SizeF = new System.Drawing.SizeF(758.4722F, 139.5589F); this.xrLabel1.StylePriority.UseFont = false; this.xrLabel1.StylePriority.UseForeColor = false; this.xrLabel1.StylePriority.UseTextAlignment = false; this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; // // CompanyName // this.CompanyName.Description = "CompanyName"; this.CompanyName.Name = "CompanyName"; this.CompanyName.Visible = false; // // PageFooter // this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrPageInfo2, this.xrPageInfo1, this.xrLabel10, this.xrLabel9 }); this.PageFooter.Dpi = 254F; this.PageFooter.HeightF = 77.61111F; this.PageFooter.Name = "PageFooter"; // // xrPageInfo2 // this.xrPageInfo2.Dpi = 254F; this.xrPageInfo2.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.xrPageInfo2.Format = "{0:yyyy-MM-dd h:mm tt}"; this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(10.58333F, 0F); this.xrPageInfo2.Name = "xrPageInfo2"; this.xrPageInfo2.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254F); this.xrPageInfo2.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime; this.xrPageInfo2.SizeF = new System.Drawing.SizeF(664.6506F, 58.42F); this.xrPageInfo2.StylePriority.UseFont = false; this.xrPageInfo2.StylePriority.UseTextAlignment = false; this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // xrPageInfo1 // this.xrPageInfo1.Dpi = 254F; this.xrPageInfo1.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.xrPageInfo1.Format = "صفحة {0} من {1}"; this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(2696.653F, 8.308817F); this.xrPageInfo1.Name = "xrPageInfo1"; this.xrPageInfo1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254F); this.xrPageInfo1.SizeF = new System.Drawing.SizeF(254F, 58.42F); this.xrPageInfo1.StylePriority.UseFont = false; this.xrPageInfo1.StylePriority.UseTextAlignment = false; this.xrPageInfo1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; // // xrLabel10 // this.xrLabel10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding(this.User, "Text", "") }); this.xrLabel10.Dpi = 254F; this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(974.0002F, 5.364372F); this.xrLabel10.Name = "xrLabel10"; this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254F); this.xrLabel10.SizeF = new System.Drawing.SizeF(254F, 58.42F); this.xrLabel10.StylePriority.UseTextAlignment = false; this.xrLabel10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleJustify; // // User // this.User.Description = "User"; this.User.Name = "User"; this.User.Visible = false; // // xrLabel9 // this.xrLabel9.Dpi = 254F; this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(1228F, 5.364372F); this.xrLabel9.Name = "xrLabel9"; this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254F); this.xrLabel9.SizeF = new System.Drawing.SizeF(137.5833F, 58.41999F); this.xrLabel9.StylePriority.UseTextAlignment = false; this.xrLabel9.Text = "المستخدم"; this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleJustify; // // formattingRule1 // this.formattingRule1.Condition = "[EmpStatus] == 0"; this.formattingRule1.DataMember = "EmployeeDetailsReport"; this.formattingRule1.Formatting.BackColor = System.Drawing.Color.White; this.formattingRule1.Formatting.BorderColor = System.Drawing.Color.White; this.formattingRule1.Formatting.BorderWidth = 10F; this.formattingRule1.Name = "formattingRule1"; // // formattingRule2 // this.formattingRule2.Condition = "[EmpStatus] == 1"; this.formattingRule2.DataMember = "EmployeeDetailsReport"; this.formattingRule2.Formatting.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); this.formattingRule2.Formatting.BorderColor = System.Drawing.Color.White; this.formattingRule2.Formatting.BorderWidth = 10F; this.formattingRule2.Name = "formattingRule2"; // // formattingRule3 // this.formattingRule3.Condition = "[EmpStatus] == 2"; this.formattingRule3.DataMember = "EmployeeDetailsReport"; this.formattingRule3.Formatting.BackColor = System.Drawing.Color.Yellow; this.formattingRule3.Formatting.BorderColor = System.Drawing.Color.White; this.formattingRule3.Formatting.BorderWidth = 10F; this.formattingRule3.Name = "formattingRule3"; // // formattingRule4 // this.formattingRule4.Condition = "[EmpStatus] == 3"; this.formattingRule4.DataMember = "EmployeeDetailsReport"; this.formattingRule4.Formatting.BackColor = System.Drawing.Color.Red; this.formattingRule4.Formatting.BorderColor = System.Drawing.Color.White; this.formattingRule4.Formatting.BorderWidth = 10F; this.formattingRule4.Name = "formattingRule4"; // // formattingRule5 // this.formattingRule5.Condition = "[EmpStatus] == 12"; this.formattingRule5.DataMember = "EmployeeDetailsReport"; this.formattingRule5.Formatting.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.formattingRule5.Formatting.BorderColor = System.Drawing.Color.White; this.formattingRule5.Formatting.BorderWidth = 10F; this.formattingRule5.Name = "formattingRule5"; // // formattingRule6 // this.formattingRule6.Condition = "[EmpStatus]==1 Or ([EmpStatus] != 0 And [EmpStatus] != 3 And [EmpStatus] " + "!= 12 And [EmpStatus] != 2 )"; this.formattingRule6.DataMember = "EmployeeDetailsReport"; this.formattingRule6.Formatting.Visible = DevExpress.Utils.DefaultBoolean.True; this.formattingRule6.Name = "formattingRule6"; // // formattingRule7 // this.formattingRule7.Condition = "[CompanyId] == 4172 And [Source]==\'Company\' And [TypeId]=1"; this.formattingRule7.DataMember = "CompanyDocs.CompanyDocsCompanyDocuments"; this.formattingRule7.Formatting.Visible = DevExpress.Utils.DefaultBoolean.True; this.formattingRule7.Name = "formattingRule7"; // // Odding // this.Odding.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.Odding.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid; this.Odding.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.Odding.Name = "Odding"; this.Odding.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F); // // GroupCaption3 // this.GroupCaption3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); this.GroupCaption3.BorderColor = System.Drawing.Color.Silver; this.GroupCaption3.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.GroupCaption3.BorderWidth = 2F; this.GroupCaption3.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold); this.GroupCaption3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.GroupCaption3.Name = "GroupCaption3"; this.GroupCaption3.Padding = new DevExpress.XtraPrinting.PaddingInfo(15, 5, 0, 0, 254F); this.GroupCaption3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; // // xrControlStyle1 // this.xrControlStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.xrControlStyle1.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid; this.xrControlStyle1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrControlStyle1.Name = "xrControlStyle1"; this.xrControlStyle1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F); // // Title // this.Title.BackColor = System.Drawing.Color.Transparent; this.Title.BorderColor = System.Drawing.Color.Black; this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None; this.Title.BorderWidth = 1F; this.Title.Font = new System.Drawing.Font("Tahoma", 14F); this.Title.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(75)))), ((int)(((byte)(75))))); this.Title.Name = "Title"; // // xrControlStyle4 // this.xrControlStyle4.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid; this.xrControlStyle4.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrControlStyle4.Name = "xrControlStyle4"; this.xrControlStyle4.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F); // // xrControlStyle2 // this.xrControlStyle2.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid; this.xrControlStyle2.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrControlStyle2.Name = "xrControlStyle2"; this.xrControlStyle2.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F); // // tbl_header_style // this.tbl_header_style.BackColor = System.Drawing.SystemColors.ControlLight; this.tbl_header_style.BorderColor = System.Drawing.Color.Silver; this.tbl_header_style.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid; this.tbl_header_style.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.tbl_header_style.BorderWidth = 1F; this.tbl_header_style.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tbl_header_style.ForeColor = System.Drawing.Color.Black; this.tbl_header_style.Name = "tbl_header_style"; this.tbl_header_style.Padding = new DevExpress.XtraPrinting.PaddingInfo(13, 13, 13, 13, 254F); this.tbl_header_style.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // tbl_even_detail // this.tbl_even_detail.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.tbl_even_detail.BorderColor = System.Drawing.Color.Black; this.tbl_even_detail.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid; this.tbl_even_detail.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.tbl_even_detail.BorderWidth = 1F; this.tbl_even_detail.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tbl_even_detail.ForeColor = System.Drawing.Color.Black; this.tbl_even_detail.Name = "tbl_even_detail"; this.tbl_even_detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(13, 13, 13, 13, 254F); this.tbl_even_detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; // // tbl_odd_detail // this.tbl_odd_detail.BackColor = System.Drawing.Color.White; this.tbl_odd_detail.BorderColor = System.Drawing.Color.Black; this.tbl_odd_detail.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid; this.tbl_odd_detail.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.tbl_odd_detail.BorderWidth = 1F; this.tbl_odd_detail.Font = new System.Drawing.Font("Frutiger LT Arabic 55 Roman", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tbl_odd_detail.ForeColor = System.Drawing.Color.Black; this.tbl_odd_detail.Name = "tbl_odd_detail"; this.tbl_odd_detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(13, 13, 13, 13, 254F); this.tbl_odd_detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; // // StatusImg // this.StatusImg.DataMember = "EmployeeDetailsReport"; this.StatusImg.Expression = "\'~/Content/Icons/\' + ToStr([EmpStatus]) + \'.png\'"; this.StatusImg.Name = "StatusImg"; // // PeriodYear // this.PeriodYear.DataMember = "SP_TerminatedEmp"; this.PeriodYear.Expression = "Abs(ToInt([ServYear]))"; this.PeriodYear.Name = "PeriodYear"; // // PeriodMonth // this.PeriodMonth.DataMember = "SP_TerminatedEmp"; this.PeriodMonth.Expression = "(DateDiffMonth([ServStartDate],[ActualDate])%12)"; this.PeriodMonth.Name = "PeriodMonth"; // // PeriodDay // this.PeriodDay.DataMember = "SP_TerminatedEmp"; this.PeriodDay.Expression = "(DateDiffDay([ServStartDate],[ActualDate])%365)%30"; this.PeriodDay.FieldType = DevExpress.XtraReports.UI.FieldType.Int32; this.PeriodDay.Name = "PeriodDay"; // // InUse // this.InUse.Description = "موقف العهدة بالمخزن - مع الموظف"; this.InUse.MultiValue = true; this.InUse.Name = "InUse"; this.InUse.Type = typeof(int); this.InUse.Visible = false; // // categoryIds // this.categoryIds.Description = "Custody Category"; dynamicListLookUpSettings1.DataAdapter = null; dynamicListLookUpSettings1.DataMember = "SP_EmployeeCustody"; dynamicListLookUpSettings1.DataSource = this.sqlDataSource1; dynamicListLookUpSettings1.DisplayMember = "CategoryName"; dynamicListLookUpSettings1.ValueMember = "CategoryId"; this.categoryIds.LookUpSettings = dynamicListLookUpSettings1; this.categoryIds.MultiValue = true; this.categoryIds.Name = "categoryIds"; this.categoryIds.Type = typeof(int); // // DeptIds // this.DeptIds.Description = "Department"; dynamicListLookUpSettings2.DataAdapter = null; dynamicListLookUpSettings2.DataMember = "SP_EmployeeCustody"; dynamicListLookUpSettings2.DataSource = this.sqlDataSource1; dynamicListLookUpSettings2.DisplayMember = "deptName"; dynamicListLookUpSettings2.ValueMember = "deptId"; this.DeptIds.LookUpSettings = dynamicListLookUpSettings2; this.DeptIds.MultiValue = true; this.DeptIds.Name = "DeptIds"; this.DeptIds.Type = typeof(int); // // EmpIds // this.EmpIds.Description = "Employee Name"; dynamicListLookUpSettings3.DataAdapter = null; dynamicListLookUpSettings3.DataMember = "SP_EmployeeCustody"; dynamicListLookUpSettings3.DataSource = this.sqlDataSource1; dynamicListLookUpSettings3.DisplayMember = "EmpName"; dynamicListLookUpSettings3.ValueMember = "EmpId"; this.EmpIds.LookUpSettings = dynamicListLookUpSettings3; this.EmpIds.MultiValue = true; this.EmpIds.Name = "EmpIds"; this.EmpIds.Type = typeof(int); // // from // this.from.Description = "Receive Date from"; this.from.Name = "from"; this.from.Type = typeof(System.DateTime); this.from.ValueInfo = "2000-01-01"; // // to // this.to.Description = "To"; this.to.Name = "to"; this.to.Type = typeof(System.DateTime); this.to.ValueInfo = "2030-01-01"; // // Culture // this.Culture.Description = "Culture"; this.Culture.Name = "Culture"; this.Culture.ValueInfo = "en-GB"; this.Culture.Visible = false; // // CompanyId // this.CompanyId.Description = "CompanyId"; this.CompanyId.Name = "CompanyId"; this.CompanyId.Type = typeof(int); this.CompanyId.ValueInfo = "0"; this.CompanyId.Visible = false; // // MappingEmpIds // this.MappingEmpIds.Description = "MappingEmpIds"; this.MappingEmpIds.Name = "MappingEmpIds"; this.MappingEmpIds.Visible = false; // // MappingDeptIds // this.MappingDeptIds.Description = "MappingDeptIds"; this.MappingDeptIds.Name = "MappingDeptIds"; this.MappingDeptIds.Visible = false; // // ReportName // this.ReportName.Description = "ReportName"; this.ReportName.Name = "ReportName"; this.ReportName.ValueInfo = "EmployeeCustodiesReport"; this.ReportName.Visible = false; // // MappingInUse // this.MappingInUse.Description = "MappingInUse"; this.MappingInUse.Name = "MappingInUse"; this.MappingInUse.Visible = false; // // MappingCategoryIds // this.MappingCategoryIds.Description = "MappingCategoryIds"; this.MappingCategoryIds.Name = "MappingCategoryIds"; this.MappingCategoryIds.Visible = false; // // Custodystatus // this.Custodystatus.Description = "DisposalOrNot"; this.Custodystatus.Name = "Custodystatus"; this.Custodystatus.Type = typeof(int); this.Custodystatus.ValueInfo = "1"; this.Custodystatus.Visible = false; // // en_DisposalEmployeesCustodies // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.ReportHeader, this.PageFooter }); this.Bookmark = "الهيكل التوظيفى"; this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] { this.StatusImg, this.PeriodYear, this.PeriodMonth, this.PeriodDay }); this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] { this.sqlDataSource1 }); this.Dpi = 254F; this.FilterString = "[ReceiveDate] Between(?from, ?to)"; this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { this.formattingRule1, this.formattingRule2, this.formattingRule3, this.formattingRule4, this.formattingRule5, this.formattingRule6, this.formattingRule7 }); this.Landscape = true; this.Margins = new System.Drawing.Printing.Margins(0, 4, 0, 0); this.PageHeight = 2100; this.PageWidth = 2970; this.PaperKind = System.Drawing.Printing.PaperKind.A4; this.Parameters.AddRange(new DevExpress.XtraReports.Parameters.Parameter[] { this.InUse, this.categoryIds, this.DeptIds, this.EmpIds, this.from, this.to, this.Culture, this.CompanyId, this.User, this.CompanyName, this.MappingEmpIds, this.MappingDeptIds, this.ReportName, this.MappingInUse, this.MappingCategoryIds, this.Custodystatus }); this.ReportUnit = DevExpress.XtraReports.UI.ReportUnit.TenthsOfAMillimeter; this.SnapGridSize = 25F; this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] { this.Odding, this.GroupCaption3, this.xrControlStyle1, this.Title, this.xrControlStyle4, this.xrControlStyle2, this.tbl_header_style, this.tbl_even_detail, this.tbl_odd_detail }); this.Version = "17.1"; ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }
private XtraReport CreateReport() { // Create a blank report. XtraReport rep = new XtraReport(); // Create a detail band and add it to the report. DetailBand detail = new DetailBand(); rep.Bands.Add(detail); // Create a pivot grid and add it to the Detail band. XRPivotGrid pivotGrid = new XRPivotGrid(); detail.Controls.Add(pivotGrid); DataSet dataSet1 = new DataSet(); using (SqlDataAdapter ada = new SqlDataAdapter((string)string.Format("SELECT Period,AccountNo,OpenBal,CloseBal,TransDescription,BankName,BankShortCode,Amount FROM ViewIGRAccountDetails WHERE CONVERT(VARCHAR(10),StartDate,103)='{0}' AND CONVERT(VARCHAR(10),EndDate,103)='{1}'", string.Format("{0:dd/MM/yyy}", dtpStart.Value), string.Format("{0:dd/MM/yyy}", dtpEnd.Value)), Logic.ConnectionString)) { ada.Fill(dataSet1, "table"); } // Creata a dataset and fill it. //DataSet dataSet1 = new DataSet(); //adapter.Fill(dataSet1, "SalesPerson"); // Bind the pivot grid to data. pivotGrid.DataSource = dataSet1; pivotGrid.DataMember = "SalesPerson"; XRControl xrControl1 = new XRControl(); XRLabel label1 = new XRLabel(); //pivotGrid = xrControl1 as XRPivotGrid; pivotGrid.Appearance.Cell.Font = new System.Drawing.Font("Times New Roman", 8F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Regular)))); //pivotGrid.Appearance.Cell // Generate pivot grid's fields. XRPivotGridField fieldCategoryName = new XRPivotGridField("BankName", PivotArea.RowArea) { AreaIndex = 0, Width = 150 }; fieldCategoryName.CellFormat.FormatType = DevExpress.Utils.FormatType.Custom; fieldCategoryName.CellFormat.FormatString = "({0})"; XRPivotGridField fieldCountry = new XRPivotGridField("TransDescription", PivotArea.ColumnArea) { AreaIndex = 0, Width = 120 }; XRPivotGridField fieldQuantity = new XRPivotGridField("Amount", PivotArea.DataArea) { AreaIndex = 0, Width = 80 }; fieldQuantity.CellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; fieldQuantity.CellFormat.FormatString = "{0:n2}"; fieldQuantity.GrandTotalCellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; fieldQuantity.GrandTotalCellFormat.FormatString = "{0:n2}"; fieldQuantity.TotalCellFormat.FormatType = DevExpress.Utils.FormatType.Numeric; fieldQuantity.TotalValueFormat.FormatString = "{0:n2}"; //label1 = (string)fieldCountry; pivotGrid.OptionsView.ShowColumnHeaders = false; pivotGrid.OptionsView.ShowColumnGrandTotals = false; //pivotGrid.OptionsView.ShowColumnHeaders = false; pivotGrid.OptionsView.ShowDataHeaders = false; pivotGrid.OptionsView.ShowRowHeaders = true; //pivotGrid.Fields["TransDescription"].BestFit(); //fieldOrderDate.RowValueLineCount = 3; //xrControl1.WordWrap = true; //fieldCategoryName.CollapseAll(); //xrControl1 = (object)fieldCategoryName; // Add these fields to the pivot grid. //pivotGrid.Fields.AddRange(new PivotGridField[] {fieldCategoryName, fieldCountry, // fieldQuantity}); pivotGrid.Fields.AddRange(new XRPivotGridField[] { fieldCategoryName, fieldCountry, fieldQuantity }); pivotGrid.CanShrink = true; //pivotGrid.BestFit(); return(rep); }
private XtraReport CreateReport() { // Create a blank report. XtraReport crossTabReport = new XtraReport(); // Create a detail band and add it to the report. DetailBand detail = new DetailBand(); crossTabReport.Bands.Add(detail); // Create a pivot grid and add it to the Detail band. XRPivotGrid pivotGrid = new XRPivotGrid(); detail.Controls.Add(pivotGrid); //// Create a data connection. //OleDbConnection connection = new //OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\\..\\nwind.mdb"); //// Create a data adapter. //OleDbDataAdapter adapter = new OleDbDataAdapter( //"SELECT CategoryName, ProductName, Country, [Sales Person], Quantity, [Extended Price] FROM SalesPerson", //connection); //// Creata and populate a dataset. //DataSet dataSet1 = new DataSet(); //adapter.Fill(dataSet1, "SalesPerson"); // Bind the pivot grid to data. pivotGrid.DataSource = GetList(); // pivotGrid.DataMember = "SalesPerson"; // Generate pivot grid's fields. XRPivotGridField fieldProductName = new XRPivotGridField("LineNo", PivotArea.RowArea); XRPivotGridField fieldDate = new XRPivotGridField("Date", PivotArea.RowArea); XRPivotGridField fieldCountry = new XRPivotGridField("Size", PivotArea.ColumnArea); XRPivotGridField fieldQuantity = new XRPivotGridField("Pcs", PivotArea.DataArea); fieldDate.ValueFormat.FormatString = "d"; // Add these fields to the pivot grid. pivotGrid.Fields.AddRange(new XRPivotGridField[] {fieldDate, fieldProductName, fieldCountry, fieldQuantity}); return crossTabReport; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); DevExpress.DataAccess.Sql.SelectQuery selectQuery1 = new DevExpress.DataAccess.Sql.SelectQuery(); DevExpress.DataAccess.Sql.Column column1 = new DevExpress.DataAccess.Sql.Column(); DevExpress.DataAccess.Sql.ColumnExpression columnExpression1 = new DevExpress.DataAccess.Sql.ColumnExpression(); DevExpress.DataAccess.Sql.Table table1 = new DevExpress.DataAccess.Sql.Table(); DevExpress.DataAccess.Sql.Column column2 = new DevExpress.DataAccess.Sql.Column(); DevExpress.DataAccess.Sql.ColumnExpression columnExpression2 = new DevExpress.DataAccess.Sql.ColumnExpression(); DevExpress.DataAccess.Sql.Column column3 = new DevExpress.DataAccess.Sql.Column(); DevExpress.DataAccess.Sql.ColumnExpression columnExpression3 = new DevExpress.DataAccess.Sql.ColumnExpression(); DevExpress.DataAccess.Sql.Column column4 = new DevExpress.DataAccess.Sql.Column(); DevExpress.DataAccess.Sql.ColumnExpression columnExpression4 = new DevExpress.DataAccess.Sql.ColumnExpression(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XtraReport1)); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.xrPivotGrid1 = new DevExpress.XtraReports.UI.XRPivotGrid(); this.fieldCategoryName = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldProductName = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldProductSales = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.pivotGridField3 = new DevExpress.XtraPivotGrid.PivotGridField(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.sqlDataSource1 = new DevExpress.DataAccess.Sql.SqlDataSource(this.components); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrPivotGrid1 }); this.Detail.HeightF = 245F; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail.PageBreak = DevExpress.XtraReports.UI.PageBreak.AfterBand; this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; this.Detail.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.Detail_BeforePrint); // // xrPivotGrid1 // this.xrPivotGrid1.Appearance.Cell.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.Appearance.CustomTotalCell.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.Appearance.FieldHeader.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.Appearance.FieldValue.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.Appearance.FieldValueGrandTotal.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.Appearance.FieldValueTotal.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.Appearance.GrandTotalCell.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.Appearance.Lines.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.Appearance.TotalCell.Font = new System.Drawing.Font("Tahoma", 8.25F); this.xrPivotGrid1.DataMember = "ProductReports"; this.xrPivotGrid1.DataSource = this.sqlDataSource1; this.xrPivotGrid1.Fields.AddRange(new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField[] { this.fieldCategoryName, this.fieldProductName, this.fieldProductSales }); this.xrPivotGrid1.LocationFloat = new DevExpress.Utils.PointFloat(7.999992F, 7.999992F); this.xrPivotGrid1.Name = "xrPivotGrid1"; this.xrPivotGrid1.SizeF = new System.Drawing.SizeF(733F, 117F); // // fieldCategoryName // this.fieldCategoryName.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fieldCategoryName.AreaIndex = 0; this.fieldCategoryName.FieldName = "CategoryName"; this.fieldCategoryName.Name = "fieldCategoryName"; // // fieldProductName // this.fieldProductName.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fieldProductName.AreaIndex = 1; this.fieldProductName.FieldName = "ProductName"; this.fieldProductName.Name = "fieldProductName"; // // fieldProductSales // this.fieldProductSales.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.fieldProductSales.AreaIndex = 0; this.fieldProductSales.FieldName = "ProductSales"; this.fieldProductSales.Name = "fieldProductSales"; // // pivotGridField3 // this.pivotGridField3.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.pivotGridField3.AreaIndex = 0; this.pivotGridField3.FieldName = "CategoryName"; this.pivotGridField3.Name = "pivotGridField3"; // // topMarginBand1 // this.topMarginBand1.HeightF = 48F; this.topMarginBand1.Name = "topMarginBand1"; // // bottomMarginBand1 // this.bottomMarginBand1.HeightF = 48F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // // sqlDataSource1 // this.sqlDataSource1.ConnectionName = "nwindConnectionString"; this.sqlDataSource1.Name = "sqlDataSource1"; columnExpression1.ColumnName = "CategoryName"; table1.Name = "ProductReports"; columnExpression1.Table = table1; column1.Expression = columnExpression1; columnExpression2.ColumnName = "ProductName"; columnExpression2.Table = table1; column2.Expression = columnExpression2; columnExpression3.ColumnName = "ProductSales"; columnExpression3.Table = table1; column3.Expression = columnExpression3; columnExpression4.ColumnName = "ShippedDate"; columnExpression4.Table = table1; column4.Expression = columnExpression4; selectQuery1.Columns.Add(column1); selectQuery1.Columns.Add(column2); selectQuery1.Columns.Add(column3); selectQuery1.Columns.Add(column4); selectQuery1.Name = "ProductReports"; selectQuery1.Tables.Add(table1); this.sqlDataSource1.Queries.AddRange(new DevExpress.DataAccess.Sql.SqlQuery[] { selectQuery1 }); this.sqlDataSource1.ResultSchemaSerializable = resources.GetString("sqlDataSource1.ResultSchemaSerializable"); // // XtraReport1 // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.topMarginBand1, this.bottomMarginBand1 }); this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] { this.sqlDataSource1 }); this.Margins = new System.Drawing.Printing.Margins(50, 49, 48, 48); this.Version = "18.1"; ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }
private void TranslateLabels(Translation translate, XRControlCollection Controls, string lang) { for (int i = 0; i < Controls.Count; i++) { XRControl item = Controls[i]; if (item is XRSubreport) { XRSubreport control = (XRSubreport)item; if (control.ReportSource is BaseReport) { BaseReport report = (BaseReport)control.ReportSource; report.TranslateLabels(translate, lang); } } else if (item is XRTable) { XRTableRowCollection control = (XRTableRowCollection)item.Controls; foreach (XRTableRow row in control) { TranslateLabels(translate, row.Controls, lang); } } else if (item is XRTableCell) { XRTableCell label = (XRTableCell)item; if (label.Name.ToLower() == "programid") { string reportName = GetType().Name.Replace("Report", ""); label.Text = translate.GetProgramName(lang, reportName) + " (" + reportName + ")"; } else { string caption = GetControlLabel(translate, label.Name, lang); if (caption.Length > 0 && !caption.StartsWith("[")) { label.Text = caption; } } foreach (XRBinding binding in label.DataBindings) { if (binding.FormatString != null) { if (binding.FormatString.Contains("$")) { binding.FormatString = "{0:c}"; } else if (binding.FormatString.Contains("%")) { binding.FormatString = "{0:p}"; } } } if (item.Controls.Count > 0) { TranslateLabels(translate, item.Controls, lang); } } else if (item is XRLabel) { XRLabel label = (XRLabel)item; if (label.Name.ToLower() == "programid") { string reportName = GetType().Name.Replace("Report", ""); label.Text = translate.GetProgramName(lang, reportName) + " (" + reportName + ")"; } else { string caption = GetControlLabel(translate, label.Name, lang); if (caption.Length > 0 && !caption.StartsWith("[")) { label.Text = caption; } } foreach (XRBinding binding in label.DataBindings) { if (binding.FormatString != null) { if (binding.FormatString.Contains("$")) { binding.FormatString = "{0:c}"; } else if (binding.FormatString.Contains("%")) { binding.FormatString = "{0:p}"; } } } } else if (item is XRPivotGrid) { XRPivotGrid grid = (XRPivotGrid)item; foreach (XRPivotGridField field in grid.Fields) { string caption = GetControlLabel(translate, field.Name, lang); if (caption.Length > 0 && !caption.StartsWith("[")) { field.Caption = caption; } if (field.CellFormat.FormatType == DevExpress.Utils.FormatType.Numeric) { String sFormatString = field.CellFormat.FormatString.ToLower(); if (!sFormatString.Contains("c") && !sFormatString.Contains("n") && !sFormatString.Contains("p")) { if (sFormatString.Contains("$")) { field.CellFormat.FormatString = "c"; } else if (sFormatString.Contains("%")) { field.CellFormat.FormatString = "p"; } else { field.CellFormat.FormatString = "n"; } } } if (field.ValueFormat.FormatType == DevExpress.Utils.FormatType.Numeric) { String sFormatString = field.ValueFormat.FormatString.ToLower(); if (!sFormatString.Contains("c") && !sFormatString.Contains("n") && !sFormatString.Contains("p")) { if (sFormatString.Contains("$")) { field.ValueFormat.FormatString = "c"; } else if (sFormatString.Contains("%")) { field.ValueFormat.FormatString = "p"; } else { field.ValueFormat.FormatString = "n"; } } field.CellFormat.FormatType = field.ValueFormat.FormatType; field.CellFormat.FormatString = field.ValueFormat.FormatString; } } } } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.pivotGridField3 = new DevExpress.XtraPivotGrid.PivotGridField(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.fieldProductSales = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldProductName = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.fieldCategoryName = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField(); this.xrPivotGrid1 = new DevExpress.XtraReports.UI.XRPivotGrid(); this.objectDataSource1 = new DevExpress.DataAccess.ObjectBinding.ObjectDataSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.objectDataSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrPivotGrid1 }); this.Detail.HeightF = 99.99998F; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail.PageBreak = DevExpress.XtraReports.UI.PageBreak.AfterBand; this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // pivotGridField3 // this.pivotGridField3.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.pivotGridField3.AreaIndex = 0; this.pivotGridField3.FieldName = "CategoryName"; this.pivotGridField3.Name = "pivotGridField3"; // // topMarginBand1 // this.topMarginBand1.HeightF = 48F; this.topMarginBand1.Name = "topMarginBand1"; // // bottomMarginBand1 // this.bottomMarginBand1.HeightF = 48F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // // fieldProductSales // this.fieldProductSales.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea; this.fieldProductSales.AreaIndex = 0; this.fieldProductSales.FieldName = "ProductSales"; this.fieldProductSales.Name = "fieldProductSales"; // // fieldProductName // this.fieldProductName.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fieldProductName.AreaIndex = 1; this.fieldProductName.FieldName = "ProductName"; this.fieldProductName.Name = "fieldProductName"; // // fieldCategoryName // this.fieldCategoryName.Area = DevExpress.XtraPivotGrid.PivotArea.RowArea; this.fieldCategoryName.AreaIndex = 0; this.fieldCategoryName.FieldName = "CategoryName"; this.fieldCategoryName.Name = "fieldCategoryName"; // // xrPivotGrid1 // this.xrPivotGrid1.DataSource = this.objectDataSource1; this.xrPivotGrid1.Fields.AddRange(new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField[] { this.fieldCategoryName, this.fieldProductName, this.fieldProductSales }); this.xrPivotGrid1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.xrPivotGrid1.Name = "xrPivotGrid1"; this.xrPivotGrid1.SizeF = new System.Drawing.SizeF(751F, 99.99998F); // // objectDataSource1 // this.objectDataSource1.DataSource = typeof(DXWebApplication3.Models.ProductReport); this.objectDataSource1.Name = "objectDataSource1"; // // XtraReport1 // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.topMarginBand1, this.bottomMarginBand1 }); this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] { this.objectDataSource1 }); this.Margins = new System.Drawing.Printing.Margins(50, 49, 48, 48); this.Version = "19.2"; ((System.ComponentModel.ISupportInitialize)(this.objectDataSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }