Exemplo n.º 1
1
        public override XRTable GetXRTable(System.Data.DataSet ds)
        {
            cellWidth = GetCellWidth(perList, ReportColCnt - 1);
            XRTable MyTable = new XRTable();
            MyTable.SuspendLayout();
            MyTable.Width = Width;

            XRTableRow MyTableRow = new XRTableRow();
            MyTableRow.SuspendLayout();
            MyTableRow.Width = Width;

            //������줺�e
            for (int b = 0; b < ReportColCnt; b++)
            {
                if (b != NonShow)
                {
                    int CellWidth = 0;
                    if (b > NonShow)
                        CellWidth = cellWidth[b - 1];
                    else
                        CellWidth = cellWidth[b];

                    XRTableCell MyTableCell = new XRTableCell();
                    MyTableCell.SuspendLayout();
                    MyTableCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
                      new DevExpress.XtraReports.UI.XRBinding("Text", ds, ds.Relations[0].ParentTable.TableName + "." + ds.Relations[0].RelationName + "." + ds.Relations[0].ChildTable.Columns[b].ColumnName, "")});
                    MyTableCell.Width = CellWidth;
                    MyTableCell.PerformLayout();
                    MyTableRow.Cells.Add(MyTableCell);
                }
            }

            MyTable.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
            MyTable.Dock = DevExpress.XtraReports.UI.XRDockStyle.Fill;
            MyTable.Font = new System.Drawing.Font("���", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204)));
            MyTable.Location = new System.Drawing.Point(0, 0);
            MyTable.ParentStyleUsing.UseBorders = false;
            MyTable.ParentStyleUsing.UseFont = false;
            MyTableRow.PerformLayout();
            MyTable.Rows.AddRange(new XRTableRow[] { MyTableRow });
            MyTable.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            //MyTableRow.EvenStyleName = "EvenStyle";
            //MyTableRow.OddStyleName = "OddStyle";
            MyTableRow.StyleName = "OddStyle";
            MyTable.PerformLayout();

            return MyTable;
        }
Exemplo n.º 2
1
        public override XRTable GetXRTable(System.Data.DataSet ds)
        {
            int CellWidth = Width / (TitleCnt - 1);

            XRTable MyTable = new XRTable();
            MyTable.SuspendLayout();
            MyTable.Width = Width;

            XRTableRow MyTableRow = new XRTableRow();
            MyTableRow.SuspendLayout();
            MyTableRow.Width = Width;

            // ���J�ƭ�
            XRTableCell MyTableCell = new XRTableCell();
            MyTableCell.SuspendLayout();

            MyTableCell.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", ds, ds.Tables[myTable.tblDevice.ToString()].Columns[myColumn.Devicename.ToString()].ColumnName, "")});

            MyTableCell.Width = CellWidth;
            MyTableCell.PerformLayout();
            MyTableRow.Cells.Add(MyTableCell);

            MyTable.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
            MyTable.Dock = DevExpress.XtraReports.UI.XRDockStyle.Fill;
            MyTable.Font = new System.Drawing.Font("���", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204)));
            MyTable.Location = new System.Drawing.Point(0, 0);
            MyTable.ParentStyleUsing.UseBorders = false;
            MyTable.ParentStyleUsing.UseFont = false;
            MyTableRow.PerformLayout();
            MyTable.Rows.AddRange(new XRTableRow[] { MyTableRow });
            MyTable.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            //MyTableRow.EvenStyleName = "EvenStyle";
            //MyTableRow.OddStyleName = "OddStyle";
            MyTableRow.StyleName = "MasterStyle";

            MyTable.PerformLayout();

            return MyTable;
        }
Exemplo n.º 3
0
        public override XRTable GetHandler(ArrayList arrList)
        {
            XRTable MyTable = new XRTable();
            XRTableRow MyTableRow = new XRTableRow();
            MyTable.SuspendLayout();
            MyTable.Width = Width;
            cellWidth = GetCellWidth(perList, ReportColCnt);

            for (int a = 0; a < TitleCnt; a++)
            {
                MyTableRow = new XRTableRow();
                string[] ReportTitle;

                MyTableRow.SuspendLayout();
                MyTableRow.Width = Width;

                for (int i = 0; i < ReportColCnt; i++)
                {
                    int CellWidth = cellWidth[i];

                    // �ŧi�Ωw�q MyTableCell ���榡
                    XRTableCell MyTableCell = new XRTableCell();
                    MyTableCell.SuspendLayout();

                    string text = arrList[i].ToString();
                    ReportTitle = text.ToString().Split(',');

                    //MyTableCell.Name = arrList[i].ToString().Substring(0, arrList[i].ToString().IndexOf(","));
                    //MyTableCell.Text = arrList[i].ToString().Substring(arrList[i].ToString().IndexOf(",") + 1);
                    MyTableCell.Text = ReportTitle[a].ToString();

                    MyTableCell.Width = CellWidth;
                    MyTableCell.PerformLayout();
                    MyTableRow.Cells.Add(MyTableCell);
                }

                MyTableRow.PerformLayout();
                MyTable.Rows.AddRange(new XRTableRow[] { MyTableRow });
            }

            MyTable.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(214)), ((System.Byte)(237)));
            //MyTable.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(175)), ((System.Byte)(190)), ((System.Byte)(216)));
            //MyTable.Borders = DevExpress.XtraPrinting.BorderSide.All;
            MyTable.Dock = DevExpress.XtraReports.UI.XRDockStyle.Fill;
            MyTable.Font = new System.Drawing.Font("���", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204)));
            MyTable.Location = new System.Drawing.Point(0, 0);
            MyTable.ParentStyleUsing.UseBorders = false;
            MyTable.ParentStyleUsing.UseFont = false;
            MyTable.Rows.AddRange(new XRTableRow[] { MyTableRow });
            //MyTable.Size = new System.Drawing.Size(this.PageWidth - 40, this.ph.Height);
            MyTable.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            MyTableRow.EvenStyleName = "EvenStyle";
            MyTableRow.OddStyleName = "OddStyle";

            MyTable.PerformLayout();

            return MyTable;
        }