static NWindData() { ds = new nwindDataSet(); nwindDataSetTableAdapters.CategoriesTableAdapter categoriesAdapter = new nwindDataSetTableAdapters.CategoriesTableAdapter(); nwindDataSetTableAdapters.ProductsTableAdapter productsAdapter = new nwindDataSetTableAdapters.ProductsTableAdapter(); categoriesAdapter.Fill(ds.Categories); productsAdapter.Fill(ds.Products); }
public Form1() { InitializeComponent(); dataSet = new nwindDataSet(); adapter = new nwindDataSetTableAdapters.CategoriesTableAdapter(); adapter.Fill(dataSet.Categories); nwindDataSetTableAdapters.ProductsTableAdapter productsTableAdapter = new nwindDataSetTableAdapters.ProductsTableAdapter(); productsTableAdapter.Fill(dataSet.Products); }
private void InitializeComponent() { this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.nwindDataSet1 = new MinimalisticReportPreviewDemo.nwindDataSet(); this.productsTableAdapter = new MinimalisticReportPreviewDemo.nwindDataSetTableAdapters.ProductsTableAdapter(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); ((System.ComponentModel.ISupportInitialize)(this.nwindDataSet1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel1 }); this.Detail.HeightF = 33.00001F; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // xrLabel1 // this.xrLabel1.BookmarkParent = this.xrLabel2; this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Products.ProductName"), new DevExpress.XtraReports.UI.XRBinding("Bookmark", null, "Products.ProductName") }); this.xrLabel1.Font = new System.Drawing.Font("Arial", 9.75F); this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(10.00001F, 10.00001F); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel1.SizeF = new System.Drawing.SizeF(408.3333F, 23F); this.xrLabel1.StylePriority.UseFont = false; this.xrLabel1.StylePriority.UseTextAlignment = false; this.xrLabel1.Text = "xrLabel1"; this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; // // xrLabel2 // this.xrLabel2.Bookmark = "Home"; this.xrLabel2.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(10.00001F, 10.00001F); this.xrLabel2.Name = "xrLabel2"; this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel2.SizeF = new System.Drawing.SizeF(222.9167F, 23F); this.xrLabel2.StylePriority.UseFont = false; this.xrLabel2.Text = "A sample report"; // // topMarginBand1 // this.topMarginBand1.HeightF = 48F; this.topMarginBand1.Name = "topMarginBand1"; // // bottomMarginBand1 // this.bottomMarginBand1.HeightF = 48F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // // nwindDataSet1 // this.nwindDataSet1.DataSetName = "nwindDataSet"; this.nwindDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // // productsTableAdapter // this.productsTableAdapter.ClearBeforeFill = true; // // ReportHeader // this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel2 }); this.ReportHeader.HeightF = 47F; this.ReportHeader.Name = "ReportHeader"; // // Report // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.topMarginBand1, this.bottomMarginBand1, this.ReportHeader }); this.Bookmark = "Table of Contents"; this.DataAdapter = this.productsTableAdapter; this.DataMember = "Products"; this.DataSource = this.nwindDataSet1; this.FilterString = "[CategoryID] < 4"; this.Margins = new System.Drawing.Printing.Margins(49, 51, 48, 48); this.Version = "12.2"; ((System.ComponentModel.ISupportInitialize)(this.nwindDataSet1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }