How can I draw rectangle in SubReport in ActiveReports?

220 Views Asked by At

I have a program which uses activereports 6 for reports. I need to draw a shape with c# on report but i couldn't figure out to link picturebox or shape or OleObject. SubReport script page includes only below definition.

public void Detail_Format() {

} Do you have any idea how should i link and which libraries i can use?

2

There are 2 best solutions below

0
On BEST ANSWER

You can draw a rectangle by using

private void arv_Load(object sender, System.EventArgs e)
{
    rptDocument rpt = new rptDocument();
    rpt.Run();
    arv.Document=rpt.Document;
    arv.Document.Pages[0].BackColor = System.Drawing.Color.Purple;
    arv.Document.Pages[0].ForeColor = System.Drawing.Color.YellowGreen;
    arv.Document.Pages[0].PenStyle = DataDynamics.ActiveReports.Document.PenStyles.Dot;
    arv.Document.Pages[0].PenWidth = 4;
    Single x = 1.0F;
    Single y = 1.0F;
    Single width = 2.0F;
    Single height = 2.0F;
    RectangleF drawRect = new RectangleF(x,y,width,height);
    arv.Document.Pages[0].DrawRect(drawRect);
}

Legacy docs can be found here - https://help.grapecity.com/activereports/webhelp/Legacy/ActiveReports6/topic2094.html

0
On

I know this won't help you since you are using AR 6...but for AR 7 and above, you can use the CrossSectionBox in the subreport designer to accomplish this.