PANTHEON™ manual

 Categories
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Collapse]Guide for PANTHEON
   [Collapse]Settings
    [Expand]Subjects
    [Expand]Items
    [Expand]POS
    [Expand]Manufacturing
    [Expand]Personnel
     Calendar
    [Expand]Financials
    [Expand]Customs
    [Collapse]Program
     [Expand]Document Types
     [Collapse]Reports in PANTHEON
       Settings in Administration Panel
      [Expand]Reports Register
       Print Preview
      [Expand]Report Designer
      [Expand]Creating Reports
      [Expand]Groups and Aggregates
      [Expand]Formatting and Highlighting
       Nested Reports (Subreports)
      [Expand]Specifics of Printouts in PANTHEON
      [Collapse]Script
        "Hello, World!" Script
        Using Variables, Database Fields, and Aggregate Functions
        Using Report Objects in the Script
        Events
        Example of Using the "OnBeforePrint" Event
        Printing a Group Sum in the Group Header
        Running Total
        "OnAfterData" Event
        Service Objects
        Using the "Engine" Object
       [Expand]PANTHEON Functions for FastReport
       [Expand]Examples with Tables and Queries
       Report Design Considerations
      Document Texts
      Delivery Methods
     [Expand]Loyalty Cards
     [Expand]Administration Panel
     [Expand]Dashboard Components
      Dashboard Reports
      Ad-hoc analysis
     [Expand]ARES
      SQL urejevalnik
    [Expand]Documentation
    [Expand]Change User
   [Expand]Orders
   [Expand]Goods
   [Expand]Manufacturing
   [Expand]POS
   [Expand]Service
   [Expand]Financials
   [Expand]Personnel
   [Expand]Analytics
   [Expand]Desktop
   [Expand]Help
   [Expand]Messages and Warnings
   [Expand]Additional programs
   [Expand]Old products
  [Expand]Guide for PANTHEON Retail
  [Expand]Guide for PANTHEON Vet
  [Expand]Guide for PANTHEON Farming
 [Expand]User Manuals for PANTHEON
[Expand]PANTHEON Web
[Expand]PANTHEON Granules
[Expand]User Site

Load Time: 687.5038 ms
print   |
Label

Service objects

In this topic we will take a look at service objects.

"Report" Object

This object represents a link to the current report. The properties of this object can be seen when selecting the “Report” element in the “Report tree” window.

Methods:

Method

Description

function Calc

(const Expr: String): Variant

returns the value of “Expr”, which is an expression

for example, Report.Calc('1+2') returns “3”

any valid fastReport expression can be passed

in the parameter

function GetDataSet

(const Alias: String): TfrxDataSet

returns the dataset having the specified name

the dataset must appear in the report's dataset list

(“Report>Data...” dialogue)

"Engine" Object

This is the most useful and interesting object, it represents a link to the engine (FastReport’s core, which manages report construction). By using the engine’s properties and methods really exotic report design layouts can be created

The methods and properties of this object.

Property

Type

Description

CurColumn

Integer

the index of the current column in a multi-columned report

a value can be assigned to this property.

CurX

Extended

the current print position on the X-axis

a value can be assigned to this property.

CurY

Extended

the current print position on the Y-axis

a value can be assigned to this property.

DoublePass

Boolean

equals “True” if the report is a two-pass one

analogous to Report.EngineOptions.DoublePass.

FinalPass

Boolean

equals “True” when in last pass of a two-pass report

PageHeight

Extended

printable region’s height, in pixels

PageWidth

Extended

printable region’s width, in pixels

StartDate

TDateTime

time of report running

the same as the <Date> system variable

StartTime

TDateTime

time of report running

the same as the <Time> system variable

TotalPages

Integer

the number of pages in a report

the same as the < TotalPages> system variable

the report should be a two-pass one, if this variable is used

SecondScriptcall

Boolean

flag  returning  'repeat-call' status of an event (in some cases

an event can be called repeatedly during grouping)

if  True then the script  has already been called

Methods:

Method

Description

procedure AddAnchor

(const Text: String)

adds “Text” to the list of anchors

see more below

procedure NewColumn

creates a new column in a multi-column report

after the last column a page break is automatically

inserted

procedure NewPage

creates a new page (page break)

procedure ShowBand

(Band: TfrxBand)

displays a band with a specified name

after displaying the band the “CurY” position is

automatically incremented

function FreeSpace: Extended

returns height of the white space left on page in pixels.

function GetAnchorPage

(const Text: String): Integer

returns the page number where the specified anchor

has been placed

"Outline" Object

This object represents the "Report tree" control element in a previewed report.

clip0198

The “Outline” displays a tree-like structure of the finished report. When any tree node is clicked the preview pane jumps to the page displaying this node. To display the “Outline” it should be enabled either by clicking the clip0199 button in the toolbar of the preview window or by setting the “Report.PreviewOptions.OutlineVisible” property to True. The “Outline's” width in pixels can be set there as well : “Report.PreviewOptions.OutlineWidth”.

The “Outline” methods are:

Method

Description

procedure AddItem

(const Text: String)

adds an element having “Text” name at the current tree position

the current report page and position on the page are linked

to the element

procedure LevelRoot

moves the current position in the tree to the root level

procedure LevelUp

moves the current position in the tree up one level

 



Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!