if you want more increase this.
Class: Report
SuperClass: VConsole
Usage: Declaration syntax is:
Object <name> is a Report {MAIN_FILE <Main_File>} {BY|DOWN <Index>} ;
{BREAK ...... ** }
:
End_Object
Preferred Usage is:
Object <name> is a Report
Report_Main_File <Main_File>
Report_Index BY <Index>
Report_Breaks Brk_1 {..Brk_n}
:
End_Object
- Construct_Object()
Integer Img
- Make$Private$Set_Get
These routines let you set and Get the private properties.
In all cases the Get or Set is delegated to the ultimate parent
- SET(integer Val)
- IntegerObj#
- integerPage_End()
- Integerretval
- IntegerObj#
- SET(integer Val)
- IntegerObj#
- integerNew_Page_State()
- Integerretval
- IntegerObj#
- SET(integer Val)
- IntegerObj#
- integerPage_End_State()
- Integerretval
- IntegerObj#
- SET(integer Val)
- IntegerObj#
- integerPage_Feed()
- Integerretval
- IntegerObj#
- SET(integer Val)
- IntegerObj#
- integerCancelled_State()
- Integerretval
- IntegerObj#
- SET(integer Val)
- IntegerObj#
- integerPage_Count()
- Integerretval
- IntegerObj#
- SET(integer Val)
- IntegerObj#
- integerReport_Channel()
- Integerretval
- IntegerObj#
- SET(integer Val)
- IntegerObj#
- integerAssigned_Channel()
- Integerretval
- IntegerObj#
- Make$Procs
---Create all the default Message handlers for all Sections. These all do
nothing and are intended for override
This will make routines for all SubHeader_Init, SubHeader, and
SubTotal Procedures. They all do nothing and are intended for
override.
Procedure: SubHeader_Init1..n
This is called when a new subheader is started. It is
called only once for each new subheader. It is not called when
subheaders are printed during a page break.
Procedure: SubHeader1..n
This is called each time a subheader needs to be printed -
both the first time a subheader is printed and during the
reprinting of subheaders during page breaks.
Procedure: SubTotal1..n
This is called when a subtotal needs to be processed
Procedure_Name Crnt_Num End_Num
- SubHeader1()
- SubHeader2()
- SubHeader3()
- SubHeader4()
- SubHeader5()
- SubHeader6()
- SubHeader7()
- SubHeader8()
- SubHeader9()
- SubTotal1()
- SubTotal2()
- SubTotal3()
- SubTotal4()
- SubTotal5()
- SubTotal6()
- SubTotal7()
- SubTotal8()
- SubTotal9()
- SubHeader_Init1()
- SubHeader_Init2()
- SubHeader_Init3()
- SubHeader_Init4()
- SubHeader_Init5()
- SubHeader_Init6()
- SubHeader_Init7()
- SubHeader_Init8()
- SubHeader_Init9()
- Total()
Procedure: Total
Called at the end of the report. Intended for override.
- Page_Top()
Page break related procedures. Note that the procedure names are
identical in name and function as their FlexQL counterparts.
Procedures Page_Top thru Page_Bottom ONLY get used by the outermost report
object... All other objects delegate messages to this ultimate parent.
creating these procedures in child reports will have NO effect.
Printed at the Top of EVERY page
- Report_Header()
Printed after Page_Top..First Page ONLY
- Page_Header()
Printer after Page_Top..Every page but 1st.
- Page_Title()
Printed after Page_Header or Report_Header
- Page_Total()
Printed at end of each page
- Page_Footer()
Printed after Page_Total every page but last
- Report_Footer()
Printed after Page_Total last page only
- Page_Bottom()
last thing printed on every page
- booleanIsRecnumTable(integer iFile)
- BooleanbRecnumTable
- IntegerHandle_KeyPressed()
Function: Handle_KeyPressed
This message is delegated to the outermost parent. It then
calls the function Test_Keypressed. If Test_KeyPressed returns
a non-zero value it will set cancelled_state to TRUE and
return RPT_CANCEL
- IntegerRpt_Status
- IntegerTest_KeyPressed()
Function: Test_KeyPressed
This returns a 1 if any key is pressed which will cause a
report to be cancelled. This is not a very simple handler and
is inteded for override.
0 - ok 1 - abort
- IntegerTest_BreakPoints()
Function: Test_BreakPoints
A fairly complex override procedure gets automatically
created by the BREAK command line option or the REPORT_BREAKS
command.
- IntegerTest_One_BreakPoint(Integer BNum String BStr Integer Arr# Integer CBreak Integer RCount)
Function: Test_One_BreakPoint
Pass: BNum - current breakpoint number to test
BStr - New breakpoint value to test
Arr# - Object ID# of breakpoint array
CBreak - Current highest breakpoint which has been
already triggered (0-none, 1-highest, n-lowest).
RCount - Current Record Count (rec_Count).
Return: Highest breakpoint set.
This function is called by Test_BreakPoints for each
breakpoint item that needs testing. It must set the highest
break level and place the current break value in the break
array.
- Integerretval
- IntegerIs_Break
- StringCh_0
- StringCh_255
- Find_Init()
record finding support
Procedure: Find_Init
set up this file for finding... This clears the needed buffers
- IntegerFile#
- IntegerNdx#
- IntegerMode
- IntegerFind_Rec()
Function: Find_Rec
This is the reports main record finding procedure
Ret : Integer RPT_OK or RPT_END (plus record in buffer)
This is the routine to augment or override to handle Custon Finding.
If a record is returned we must set the property priFoundRec to the
record number. Remember this if you override this routine!
- IntegerMode
- IntegeriFile
- IntegeriRec
- ReadByRowId(RowId riID)
Procedure Read_By_Recnum RowId Rec#
integer iFile
Get main_file to iFile
If (iFile<>0 AND Rec#<>0) begin
Set_Field_value iFile 0 to Rec#
VFind iFile 0 eq
[Found] Begin
If Not (No_Constrained_Find_State(self) and ;
No_Relate_State(self)) Relate iFile
Send Relate_Main_File // custom relate records
Indicate Found True
End
End
Else Indicate Found False
End_procedure
Procedure : ReadByRowId
Find a record by its rowId number. Used by the report object
to refind records
- IntegeriFile
- BooleanbFound
- Relate_Main_File()
Procedure Relate_Main_File
Called when custom relates are needed in a report. Intended
for Override
for override
- IntegerStart_Report()
Function: Start_Report
Main entry point for report. It has two operation modes:
1. If NO_FINDING_STATE is False (the default when MAIN_FILE is
set) then this runs the entire report.
2. If NO_FIND_STATE is True because it was set that way or
MAIN_FILE was never set then this initializes the report and
returns. You then run the report by sending it
Handle_Report_Line messages and then ending it with a
End_Report message
Main Logic:
Get Setup_Report <--- initializes report
If a full report begin
Repeat
Get Handle_Report_Line <-- finds and prints a line
until the report is ended or cancelled
get End_Report <--- ends the report
end
Function_Return Report_status
- IntegerRpt_Status
- IntegerChildState
- Run_Report()
Procedure: Run_Report
This runs an entire report. It is just like start_report except that it
does not return a value. If you use this then you will not know how the
report was ended. On the up side the syntax is clearer. DO NOT use this
with external (no_find_State) reports.
- IntegerDump
- Clear_Breakpoints()
05/18/95 - When a report is started all breakpoints should be
cleared.
- Integercnt
- Integeri
- IntegerArr#
- IntegerSetup_Report()
Function_Setup Report
If a non-zero value is returned the report will not be run
- Integerretval
- IntegerStarting_Report()
Function: Starting_Report
User Handler Intended for override. This is called by setup
for all reports. If the report is nested this IS called every
time the nested report is entered.
If a non-zero value is returned the report will be cancelled
Pre report prep. For Override by user
- IntegerStarting_Main_Report()
Function: Starting_Main_Report
User Handler Intended for override. This is the same as
Starting_report except this message is only sent to the main
(parent) outer report. Nested reports do not send this message.
This is very useful for setting indexes, output channels, etc.
If a non-zero value is returned the report will be cancelled
Pre report prep. For Override by user
- IntegerRptChannel
- IntegerEnd_Report(Integer Rpt_Status)
Function: End_Report
Called to shut down the report.
Pass: Rpt_Status - If Rpt_Status=RPT_CANCEL then the report was
cancelled.
Main_Logic
If Rpt_Status ne RPT_CANCEL <---normal end of report
send Handle_End_Report <---final subtotals, totals, etc
Move RPT_OK to Rpt_Status <---we want a normal report to end
with a RPT_OK
Else
Send Handle_Cancelled_Report
send Ending_Report
If main outer report send Ending_Main_report
return Rpt_Status
- Ending_Report()
Procedure: Ending_Report
User Handler Intended for override. This is called by end_report
for all reports. If the report is nested this IS called every
time the nested report is entered.
- Ending_Main_Report()
Procedure: Ending_Main_Report
User Handler Intended for override. This is the same as
Ending_report except this message is only sent to the main
(parent) outer report. Nested reports do not send this message.
This is very useful for closing files, io channels, etc.
- IntegerHandle_Report_Line()
Function: Handle_Report_Line
Handle 1 line of a report doing headers,totals as needed.
Returns Integer Rpt_Status as what happened (RPT_OK-Record found and
printed, RPT_END-Record not found/end report, RPT_CANCEL-report
has been cancelled, RPT_NOT_SELECT - (special) means current
record was not valid - but keep looking
If NO_FINDING_STATE is TRUE then you should call this function
with a record already in place. Otherwise this will find the
record for you.
- IntegerRCount
- IntegerRpt_Status
- IntegerCBreak
- Handle_End_Report()
Procedure: Handle_End_Report
Shut down report in normal manner. Print final subtotals, totals
and footers
- Handle_Cancelled_Report()
Procedure: Handle_Cancelled_Report
Shut down a cancelled report. This prints the final formfeed if
anything was printed and the report was not a screen report and
it is the main outer report.
- Body()
Procedure: Body
Normally this is overridden. In nested reports this can be sued
by the parent to start all of the inner reports.
- IntegerRpt_Status
- IntegerSelection()
Function: Selection
returns: Rpt_Status
Called after a record has been found. Intended for override. If
you are using constraints you probably won't need this.
- Filler()
print 1 filler line as needed
- Restore_Parent_Rec()
Procedure: Restore_Parent_Rec
- RowIdriRec
- Assign_Report_Channel()
Procedure: Assign_Report_Channel
This makes sure the the correct channel is set. This called by
the report's critical entry points (start_Report,
Handle_report_Line, End_report).
- IntegerRptChannel
- Handle_SubTotals(Integer CBrk)
Procedure: Handle_SubTotals (Internal)
- IntegerFlag
- Integeri
- IntegerR_S
- IntegerMSG
- Handle_SubHeaders(Integer CBrk)
Procedure: Handle_SubHeaders (Internal)
- IntegerNBrks
- Integeri
- IntegerMsg
- RePrint_SubHeaders()
Procedure: RePrint_SubHeaders (Internal)
RePrint SubHeaders as part of a page break
- Integeri
- IntegerLvl
- IntegerMsg
- New_Page()
Procedure: New_Page (internal)
- Handle_Footer(Integer LastTime)
Procedure: Hanle_Footer (Internal)
Do Filler and footer
- Integeri
- IntegerPE
- Final_FormFeed()
Procedure Final_Formfeed
intended for augmentation/override
Called to eject the last page after the main report has
processed all records.
- FormFeed()
Procedure FormFeed
intended for augmentation/override
Formfeed is responsible for handling an end of page break
AND incrementing the property Page_Count AND zeroing the
integer LINECOUNT
- IntegerLnes
- IntegerCnt
- IntegerPage_End_Check(Integer Lines)
Function: Page_End_Check (internal)
- Integeri
- IntegerStat
- Page_Check(Integer Lines)
Procedure: Page_Check (internal)
check if room for new image..if not new page
- Output_ImageNum(Integer ImageNum)
Procedure: OutPut_ImageNum
Possibly useful for override and augmentation in that all
image output goes through this handler.
- OutPut_PageCheck(Integer ImageNum Integer Lines)
Procedure: OutPut_PageCheck (internal)
- OutPut_Wrap_PageCheck(Integer ImageNum Integer Lines Integer PrintReq)
Output_Wrap_PageCheck (internal)
06-17-1992 added PrintReq as parameter. If true print line always
05/18/95 it is possible for |122 to get clobbered (with increment
ifchange or for commands). Push and pop it first.
- IntegerSave122#
- WriteLn(String WrStr)
Procedure: Writeln
Possibly useful for override and augmentation in that all
non image writeln goes through this handler.
- Writeln_PageCheck(String WrStr Integer Lines)
Procedure: Writeln_PageCheck (Advanced use)
- IntegerL
- Breaks_Set()
these procedures get created during object or class creation.
They will create handlers that set the value of the
associated properties. This allow this package to be used
for class construction.
- Page_Footer_set()
- Page_bottom_Set()
- Page_total_Set()
- Report_Footer_Set()
- Mark_Main_Report_Id(Integer Obj#)
Mark this child report object's Main report Id along with all of
its children
- Mark_Rpt_Children()
- Mark_as_Rpt_Child()
- Constrain()
intended for override/augmentation
- OnConstrain()
added optional support for OnConstrain
- Rebuild_Constraints()
- integerwhich_index(integer file# integer field#)
returns index# (incl. 0) or 0 if unindexed/error
- IntegerfldNdx
- End_Construct_Object()