Access to Types, Basic Types and Their Methods

Access to the Base Class

Here are the most important properties and methods of the scripts base class.

 Property or
 Method
 
 Description  
 Now   Gets the date and time at which rendering began 
 PageCount   Gets the count of pages in the document 
 PageNumber   Gets the number of the current page 
 ColumnNumber   Gets the number of the current column 
 DataObjects   Gets the collection of associated data sources 
 Document   Gets the template of the currently rendered document  
 Engine   Gets the associated RenderEngine 
 Group   Gets current group when data is grouped 
 GetData   Returns data corresponding to specified data member 
 GetParameter   Returns parameter by specific name 
 GetTotal   Gets total value by the field. Depending on the place of reference, it can get total by group or by all entered data 
 GetRunningTotal   Gets running total by its name 

Let’s consider Engine property of the PerpetuumSoft.Reporting.Rendering.RenderEngine type, as it is a complicated object representing report generator engine.

Here are the most important properties and methods of RenderEngine:

 Property or Method   Description  
 ColumnsCount   Gets columns count 
 LineNumber   Gets number of the current line 
 PageCount   Gets count of pages in the document 
 PageNumber   Gets number of the current page 

Data on filling the current generated page:

 Property or Method   Description  
 PageRenderArea   Gets and sets a rectangle defining the remaining free space available on the page 
 Caret   Gets and sets the current position on the page being rendered 
 UsedHeight   Gets the amount of used page height 
 UsedWidth   Gets the amount of used page width 
 FreeHeight   Gets the amount of remaining free page height 
 FreeWidth   Gets the amount of remaining free page width 

Data sources and parameters:

 Property or
 Method
 
 Description  
 Objects   Gets the amount of remaining free page width 
 Parameters   Gets the amount of remaining free page width 

Generated document and current page:

 Property or Method   Description  
 ProductionDocument   Gets the final document 
 ProductionPage   Gets the current page in the final document 

Data on the used document template and current used template page:

 Property or Method   Description  
 TemplateDocument   Gets the document template 
 TemplatePage   Gets the document template 

It is possible not only to learn current state of the rendering process, but also influence it by changing the corresponding values.

RenderEngine functions used to manage rendering process

 Method   Description  
 NewColumn   Creates new column 
 NewPage   Creates new page 
 CancelRender   Cancels rendering 

Access to Data

More often scripts are used to bind report elements to certain data. Setting of various properties is executed in the Property Binding by the source data. In order to get current value of the source field, GetData function is used. Path to data separated by the “.” symbol is delegated as parameter.

Very often elements added inside DataBand display fields of one and the same source set in the DataBand.DataSource property. In this case it is more convenient to use DataBand indexer.

It is worth to say that GetData, DataBand[] gets values of the current line. DataBand moves cursor from line to line during report generation. You can form such scripts by drag and drop fields from the data source tree in the Script Editor.

Add Feedback