Exemplo n.º 1
0
        private void PrintXAxisFieldsCaption()
        {
            int    top         = (CrossView.ShowTitle ? 1 : 0);
            int    templateTop = titleDescriptor.TemplateRow != null ? 1 : 0;
            string captions    = "";

            for (int i = 0; i < CrossView.Data.XAxisFieldsCount; i++)
            {
                CrossViewHeaderDescriptor descr = crossView.Data.GetRowDescriptor(i);
                if (captions != "")
                {
                    captions += ", ";
                }
                captions += descr.GetName();
            }
            TableCell templateCell = xAxisFieldCaptionDescriptor.TemplateCell;

            if (xAxisFieldCaptionDescriptor.TemplateCell == null)
            {
                templateCell = CreateCell(captions);
            }
            TableCellData resultCell = ResultTable.GetCellData(HeaderWidth, top);

            templateCell.SaveState();
            templateCell.GetData();
            resultCell.RunTimeAssign(templateCell, true);
            resultCell.ColSpan = ResultTable.ColumnCount - HeaderWidth;
            templateCell.RestoreState();
        }
Exemplo n.º 2
0
        private void PrintCorner()
        {
            int left        = 0;
            int top         = (CrossView.ShowTitle ? 1 : 0);
            int templateTop = titleDescriptor.TemplateRow != null ? 1 : 0;

            if (CrossView.ShowYAxisFieldsCaption)
            {
                for (int i = 0; i < HeaderWidth; i++)
                {
                    TableCell templateCell          = null;
                    CrossViewHeaderDescriptor descr = crossView.Data.GetColumnDescriptor(i);
                    if (descr.TemplateColumn != null)
                    {
                        templateCell = CrossView[0, templateTop];
                    }
                    else
                    {
                        templateCell = CreateCell(descr.GetName());
                    }

                    TableCellData resultCell = ResultTable.GetCellData(left, top);
                    templateCell.SaveState();
                    templateCell.GetData();
                    resultCell.RunTimeAssign(templateCell, true);
                    templateCell.RestoreState();

                    resultCell.RowSpan = HeaderHeight - top;
                    resultCell.Text    = descr.GetName();
                    left++;
                }
            }
            else
            {
                TableCell     templateCell = CreateCell("");
                TableCellData resultCell   = ResultTable.GetCellData(left, top);
                templateCell.SaveState();
                templateCell.GetData();
                resultCell.RunTimeAssign(templateCell, true);
                templateCell.RestoreState();
                resultCell.ColSpan = HeaderWidth;
                resultCell.RowSpan = HeaderHeight - top;
            }
        }
Exemplo n.º 3
0
        private void PrintYAxisTemplate()
        {
            int left = 0;
            int top  = headerHeight;

            for (int i = 0; i < CrossView.Data.Rows.Count; i++)
            {
                CrossViewHeaderDescriptor crossViewHeaderDescriptor = CrossView.Data.Rows[i];
                TableCellData             resultCell = ResultTable.GetCellData(left + crossViewHeaderDescriptor.level, top + crossViewHeaderDescriptor.cell);
                resultCell.ColSpan = crossViewHeaderDescriptor.levelsize;
                resultCell.RowSpan = crossViewHeaderDescriptor.cellsize;
                TableCell templateCell = crossViewHeaderDescriptor.TemplateCell;
                if (templateCell != null)
                {
                    templateCell.Text = "[" + crossViewHeaderDescriptor.GetName() + "]";
                }
                else
                {
                    templateCell = CreateCell("[" + crossViewHeaderDescriptor.GetName() + "]");
                }
                resultCell.RunTimeAssign(templateCell, true);
            }
        }
Exemplo n.º 4
0
        private void PrintXAxisTemplate()
        {
            int left = headerWidth;
            int top  = (CrossView.ShowTitle ? 1 : 0) + (CrossView.ShowXAxisFieldsCaption ? 1 : 0);

            for (int i = 0; i < CrossView.Data.Columns.Count; i++)
            {
                CrossViewHeaderDescriptor crossViewHeaderDescriptor = CrossView.Data.Columns[i];
                TableCellData             resultCell = ResultTable.GetCellData(left + crossViewHeaderDescriptor.cell, top + crossViewHeaderDescriptor.level);
                resultCell.ColSpan = crossViewHeaderDescriptor.cellsize;
                resultCell.RowSpan = crossViewHeaderDescriptor.levelsize;
                TableCell templateCell = crossViewHeaderDescriptor.TemplateCell;
                if (templateCell != null)
                {
                    templateCell.Text = "[" + crossViewHeaderDescriptor.GetName() + "]";
                }
                else
                {
                    templateCell = CreateCell("[" + crossViewHeaderDescriptor.GetName() + "]");
                }
                resultCell.RunTimeAssign(templateCell, true);
            }
        }