it is possible to render a line at runtime, as shown below, on a page.
After loading the mrt, I want to draw the line before I compile the report.
Code: Select all
private void SetLineOnPage(StiReport report) {
StiPage page1= (StiPage) report.GetComponentByName("Page1");
StiVerticalLinePrimitive lineVertikal;
lineVertikal = new Stimulsoft.Report.Components.StiVerticalLinePrimitive();
lineVertikal.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(24, 1, 0.0254, 16);
lineVertikal.Color = System.Drawing.Color.Black;
Guid guid = Guid.NewGuid();
lineVertikal.Guid = guid.ToString();
lineVertikal.Name = "LineVertikalDick";
lineVertikal.Size = 3F;
lineVertikal.EndCap = new StiCap(10, Stimulsoft.Base.Drawing.StiCapStyle.None, 10, true, System.Drawing.Color.Black);
lineVertikal.Interaction = null;
lineVertikal.StartCap = new StiCap(10, Stimulsoft.Base.Drawing.StiCapStyle.None, 10, true, System.Drawing.Color.Black);
lineVertikal.Page = page1;
lineVertikal.Parent = page1;
page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
lineVertikal});
}
}
Thank you