views:

87

answers:

1

Given that FormulaFieldDefinition does not have a Top, Bottom, Left, or Right properties...is there any way to move/resize the formula at runtime?

A: 

You're looking at it the wrong way - a FormulaFieldDefinition is simply the definition of the formula itself, and not an object on the report. Therefore manipulating the size or position of it makes no sense.

What is actually shown on the report is an IFieldObject which displays the result for the given formula. This is how you can (if needed) show the same formula several times on a report.

You need to find the name of the IFieldObject that is displaying the formula, and manipulate the location of that instead. This can be done using ReportDefinition.ReportObjects("NameOfIFieldObject") and the Top, Left, Width and Height properties of it. Remember that the Top and Left values are relative to the section the object is in, not to the report.

CodeByMoonlight