This is a migrated thread and some comments may be shown as answers.

Programmatically drawing a square in Telerik Reporting

1 Answer 180 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sven Nilsen
Top achievements
Rank 1
Sven Nilsen asked on 26 Nov 2011, 05:37 PM
I'm trying to build a telerik report programmatically, but I can't find ShapeType = SquareShape (in Telerik.Reporting.Drawing.Shapes). Square is a shapetype in report designer. Anybody who knows how to create squares programmatically?

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 29 Nov 2011, 08:58 AM
Hello Sven,

Here is part of the code that the Designer generates when you add a shape:

private Telerik.Reporting.Shape shape1;
shape1.ShapeType = new Telerik.Reporting.Drawing.Shapes.PolygonShape(4, 45, 0);
shape1.Size = new Telerik.Reporting.Drawing.SizeU(...
Generally if you have troubles creating something with code the easiest way to check it, is to create it in the Designer and see the code it generates in the YourReportName.Designer.cs file.

Best wishes,
Elian
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Sven Nilsen
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or