Hi,
I hope anyone can help me on this as my situation is very urgent. If you can see on the attached file, that is the shape that I want to make. So I decided to use the polygon shape which is available in telerik. Below is my sample code :
Telerik.Reporting.Shape polygonShape = new Telerik.Reporting.Shape();
PolygonShape seriesofPolygonShapePoints = new PolygonShape(8,0,0);
PointF[] seriesofPoints = new PointF[8];
seriesofPoints[0] = new PointF(-10,10);
seriesofPoints[1] = new PointF(-10, 4);
seriesofPoints[2] = new PointF(-12, 4);
seriesofPoints[3] = new PointF(-12, 0);
seriesofPoints[4] = new PointF(12, 0);
seriesofPoints[5] = new PointF(12, 4);
seriesofPoints[6] = new PointF(10, 4);
seriesofPoints[7] = new PointF(10, 10);
seriesofPolygonShapePoints.AddLines(points, true);
#region create custom polygon shape
polygonShape = new Telerik.Reporting.Shape
{
ShapeType = seriesofPolygonShapePoints,
Size = new SizeU(
Unit.Inch(.10),
Unit.Inch(.10)),
Stretch = true,
Location = new PointU(
Unit.Inch(coordinateViewModel.LocationOfX),
Unit.Inch(coordinateViewModel.LocationOfY)),
Style = {
BackgroundColor = backgroundColor,
Color = color,
LineWidth = lineWidth
}
};
#endregion
#region add to section
detailSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
polygonShape,
});
#endregion
With the above code, the report runs but it doesn't draw properly. It draws the default octagon shape since it has eight side. BUT what I want is the image I attached should display since I provided the points where the line should draw.
I don't know if im missing something in the code or am I missing the points that I need to add to draw the shape properly..
Hope someone can help me immediately..
Thanks!!!