User Tools

Site Tools


openreport_prepare_report_for_execution_.htm
Navigation:  ABC Library Reference > ReportManager Class > ReportManager Methods >====== OpenReport (prepare report for execution) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

OpenReport, PROC, PROTECTED, VIRTUAL

blk2blue.jpg

The **OpenReport **method prepares the report to execute and returns a value indicating success or failure. This is a good place to add any filters or keys specified at runtime. Valid return values are:

Level:Benign report opened successfully
Level:Notify no records found
Level:Fatal failed, cause unknown

Member of: ReportManager

Implementation:

The TakeWindowEvent method or the Open method calls the OpenReport method depending on the value of the DeferOpenReport property. The OpenReport method calls the Process.Reset method to reset the ProcessClass object, calls the Next method to get the first report record, then opens the REPORT structure.

The OpenReport method resets the DeferOpenReport property to zero so that if deferred, the OpenReport only happens with the first timer event.

**Return Data Type:     **BYTE

Example:

ReportManager.Open  PROCEDURE

**  CODE**

** PARENT.Open**

** IF ~SELF.DeferOpenReport**

**  SELF.OpenReport         !call OpenReport if not deferred**

** END**

MyReportManager.TakeWindowEvent PROCEDURE

!procedure data

**  CODE**

** IF EVENT() = EVENT:Timer**

**  IF SELF.DeferOpenReport**

**   SELF.OpenReport        !if deferred, call OpenReport on timer**

**  ELSE**

** !procedure code**

MyReportManager.OpenReport  PROCEDURE

**  CODE**

** SELF.Process.SetFilter(UserFilter)  !set dynamic filter**

** SELF.DeferOpenReport = 0**

** SELF.Process.Reset**

** IF ~SELF.Next()**

**  IF ~SELF.Report&=NULL**

**   OPEN(SELF.Report)**

**   IF ~SELF.Preview &= NULL**

**    SELF.Report{PROP:Preview} = SELF.PreviewQueue.Filename**

**   END**

**  END**

** END**

**See Also:     **DeferOpenReport, Next, Open, TakeWindowEvent, Process.Reset

openreport_prepare_report_for_execution_.htm.txt · Last modified: by 127.0.0.1