How can I change position in LocalReport of any object. Like TextBox or Image and so on. For example try to change Left coordinate. I was try this way:
ReportParameterCollection reportParameters = new ReportParameterCollection();
reportParameters.Add(new ReportParameter("ReportParameter1", "ValueFromCode"));
report.SetParameters(reportParameters);
but i can't establish a link between reportParameters and location of element.
You can use expressions to dynamically assign values to properties. For instance, if you open a
TextBoxproperties, 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
ReportParameter1from your example. This would be translated into the following .rdlc code inside theStyletag of the correspondingTextBox:Your
ValueFromCodemay be something like10pt, or some numeric value instead, to which you may then append the units, for instance: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
TopandLeftproperties of theTextBox(or the desired element), by manually editing the.rdlcfile. Give it a try.