Document Object Model

It is possible to refer to all template objects and the document itself. You can refer to them by their name set in the Name property and using Document name.

It is possible to use all public methods and element types’ properties (More information about types see in Class reference). It is possible because fields that correspond by type and name to the element added to the template are added to the DocumentScripts script class. These fields are initialized by the instances of the objects that will be used in the report rendering process. For example, you added TextBox with name "textBox1" to the template; TextBox textBox1 field of the private type will be added to the DocumentScripts. And before rendering starts it will be initialized by the certain instance of the TextBox object, and by the very instance that will be used in the rendering process. Now you can refer to this element in any script and set, for example, textBox1.Value = 1. This mechanism is applied to each element added in the visual designer. By adding an element in the visual designer you add description of the corresponding fields to the code.

Add Feedback