You can use expressions to dynamically assign values to properties. For instance, if you open a TextBox
properties, go to Alignment, and then click on Fx - located to the right of the Left padding field for instance - the expression editor will open.
There, you can select some report parameter like the ReportParameter1
from your example. This would be translated into the following .rdlc code inside the Style
tag of the corresponding TextBox
:
<PaddingLeft>=Parameters!ReportParameter1.Value</PaddingLeft>
Your ValueFromCode
may be something like 10pt
, or some numeric value instead, to which you may then append the units, for instance:
<PaddingLeft>=Parameters!ReportParameter1.Value & "pt"</PaddingLeft>
Now, this example is for padding, which you can edit using the designed. I haven't tried it, but in order to set the location dynamically you may be able to do the same for the Top
and Left
properties of the TextBox
(or the desired element), by manually editing the .rdlc
file. Give it a try.