Код: Выделить всё
StiReport report = new StiReport();
report.RegData(mrm);
report.Dictionary.Synchronize();
StiPage page = report.Pages[0];
StiHeaderBand headerBand = new StiHeaderBand();
headerBand.Height = 0.5;
headerBand.Name = "HeaderBand";
page.Components.Add(headerBand);
StiText headerText = new StiText(new RectangleD(0, 0, 5, 0.5));
headerText.Text = "Отчёт по анализу породы";
headerText.HorAlignment = StiTextHorAlignment.Center;
headerText.Name = "HeaderText";
headerText.Brush = new StiSolidBrush(System.Drawing.Color.LightGreen);
headerBand.Components.Add(headerText);
StiTable table = new StiTable();
table.Name = "TM";
table.ColumnCount = mrm.Columns.Count;
table.RowCount = mrm.Rows.Count;
table.Width = page.Width;
table.Height = page.GridSize * 12;
table.DataSourceName = String.Format("{0}", mrm.TableName);
page.Components.Add(table);
report.ShowWithWpf();