Placing Border at bottom of Second Line in data band.
Posted: Wed Feb 19, 2014 1:00 pm
Hi,
I'm creating a dynamic report. I want to display One Line below second Line. how can I achieve this functionality through code side in c#.
My code is below
how can I place line below second line of result. It can be easily done through condition of databand while use MRT. but how can I implement same from code side of c#.
thanks
I'm creating a dynamic report. I want to display One Line below second Line. how can I achieve this functionality through code side in c#.
My code is below
Code: Select all
//Create Databand
StiDataBand dataBand = new StiDataBand();
dataBand.DataSourceName = ds.Tables[i].TableName;
dataBand.Height = rowHeight;
dataBand.KeepDetailsTogether = true;
dataBand.Name = ds.Tables[i].TableName + i.ToString();
page.Components.Add(dataBand);
dataBand.BeforePrint += new EventHandler(dataBand_BeforePrint);
//details for other tables
foreach (DataColumn dataColumn in ds.Tables[i].Columns)
{
StiText dataText = new StiText(new RectangleD(pos, 0, columnWidth, rowHeight));
dataText.Text = "{" + ds.Tables[i].TableName + "." + Stimulsoft.Report.CodeDom.StiCodeDomSerializator.ReplaceSymbols(dataColumn.ColumnName) + "}";
dataText.Name = "DataText" + nameIndex.ToString() + i.ToString();
dataText.Font = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Regular);
dataText.AllowHtmlTags = true;
dataText.Border = new StiBorder(StiBorderSides.All, Color.FromArgb(200, 200, 200), 1,
StiPenStyle.Solid, false, 4, new StiSolidBrush(System.Drawing.Color.FromArgb(200, 200, 200)), false);
//for changing alternative column color.
if ((nameIndex % 2) != 0)
{
dataText.Brush = new StiSolidBrush(System.Drawing.Color.FromArgb(210, 210, 210));
}
dataBand.Components.Add(dataText);
pos = pos + columnWidth;
nameIndex++;
}
thanks