TRVReportDocObject

Properties

<< Click to display table of contents >>

TRVReportDocObject

Properties

TRVReportDocObject contains report-related properties for storing in report templates.

Unit RVReportDocObject;

Syntax

TRVReportDocObject = class (TRVDocObject)

hmtoggle_arrow1Hierarchy

Description

An object of this class can be added in TRichView.DocObjects collection. Objects in this collection can be stored and loaded in RVF (RichView Format) files.

It's highly recommended to add only a single object of this class in this collection.

 

The recommended way of working with properties of this class is using the following functions:

function GetRVReportDocObject(rv: TCustomRichView; 

  AllowCreate: Boolean): TRVReportDocObject;

 
function RVReportGetRootDataQuery(

  rv: TCustomRichView): TRVUnicodeString;
procedure RVReportSetRootDataQuery(rv: TCustomRichView;
  const Value: TRVUnicodeString; EditMode: Boolean);

 
function RVReportGetHighlightRules(rv: TCustomRichView): Boolean;
procedure RVReportSetHighlightRules(rv: TCustomRichView;

  Value: Boolean);

 

function RVReportGetPageBreaksBetweenCopies(

  rv: TCustomRichView): Boolean;
procedure RVReportSetPageBreaksBetweenCopies(

  rv: TCustomRichView; Value: Boolean; EditMode: Boolean);

 

type
  TRVReportScript = (rvrsOnStart, rvrsAfterRecord, rvrsOnEnd);
function RVReportGetScript(rv: TCustomRichView;

  Script: TRVReportScript): TStrings;
procedure RVReportSetScript(rv: TCustomRichView;

  Script: TRVReportScript;
  Value: TStrings; EditMode: Boolean);
procedure RVReportSetScriptAsString(rv: TCustomRichView;

  Script: TRVReportScript;
  const ScriptText: TRVUnicodeString; EditMode: Boolean);

 

GetRVReportDocObject returns the first TRVReportDocObject item in rv.DocObjects. If not found, it may return nil (if AllowCreate = False) or add a new object to the end of the collection and return it (if AllowCreate = True).

RVReportGetRootDataQuery returns a value of the DataQuery property of the first TRVReportDocObject item in rv.DocObjects, or empty string if not found.

RVReportSetRootDataQuery assigns a new value to the DataQuery property of the first TRVReportDocObject item in rv.DocObjects. If such an object is not found, it creates it. If EditMode = True and (rv is TCustomRichViewEdit), this assignment is performed as an editing operation (undoable).

Similarly:

RVReportGetHighlightRules and RVReportSetHighlightRules provide access to HighlightRules property,

RVReportGetPageBreaksBetweenCopies and RVReportSetPageBreaksBetweenCopies provide access to PageBreaksBetweenCopies property.

RVReportGetScript, RVReportSetScript, RVReportSetScriptAsString provide access to Script_OnStart, Script_AfterRecord, Script_OnEnd properties. RVReportGetScript returns a reference to the property, do not free it. RVReportSetScript copies the Value parameter to the property.