To manipulate objects in Report Designer, you may wonder how to get it done. Once you understand it, it’s a straightforward process, but getting to that point can be challenging. I tried doing it with VB.NET:
1 2 3 4 |
Dim UserReport0 As New UserReport DirectCast(UserReport0.ReportDefinition.ReportObjects("Box1"), CrystalDecisions.CrystalReports.Engine.BoxObject).FillColor = Color.Silver |
It involves some intricate work like casting (type conversion) to make properties accessible.
It seems that DirectCast is less resource-intensive than CType. You can find information about C# in the following page:
Reference: Crystal Reports
While it appears that you can’t vertically align text in the middle in Crystal Reports, this method might allow fine adjustments through the Location setting of the field.