Code: Select all
{ StiReport report = new StiReport();
if (File.Exists(Manage.ClGlobal.ReportDirAcc + @"\\RptAccDoc.mrt"))
{
report.Load(Manage.ClGlobal.ReportDirAcc + @"\\RptAccDoc.mrt");
((Stimulsoft.Report.Dictionary.StiSqlDatabase)report.Dictionary.Databases[0]).ConnectionString = Manage.ClGlobal.ConnectionStr;
StiPage page = new StiPage();
page = (StiPage)report.Pages[0];
DataTable dtAccDoc = new DataTable();
dtAccDoc = ClBase.exec(@"exec[acc].[PrcAccDoc]
@HdrId =9,
@Type = 51");
foreach (RadTreeNode node in treeLevel.Nodes)
{
if (node.Checked)
{
StiGroupHeaderBand GhBand = new StiGroupHeaderBand();
GhBand.Height = 0.5;
GhBand.Name = GhBand + node.Value.ToString();
GhBand.Condition = new StiGroupConditionExpression(@"{dtAccDoc.l" +node.Value.ToString()+"}");
GhBand.Enabled = true;
page.Components.Add(GhBand);
StiText headerText = new StiText(new RectangleD(0, 0, 5, 0.5));
headerText.Text = "l" + node.Value.ToString();
headerText.HorAlignment = StiTextHorAlignment.Center;
headerText.Name = "HeaderText"+node.Value.ToString();
headerText.Brush = new StiSolidBrush(Color.LightGreen);
GhBand.Components.Clear();
GhBand.Components.Add(headerText);
}
}
report.Compile();
report.Show();
}
}