No_Finding_State - Report
Determines how the Report object will find records
Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None
Syntax
Property Integer No_Finding_State
| Access Type | Syntax |
|---|---|
| Read Access: | Get No_Finding_State to IntegerVariable |
| Write Access: | Set No_Finding_State to IntegerVariable/Value |
Description
If set to true, then the Report object will not find records internally. Instead, the report object will expect to be called each time a record (or item) needs to be output. Normally, when this is needed, you will not define a Main_File for the report (there is no need to). In fact, if after a report object is created the object's Main_File property is zero, then the No_Finding_State will automatically be set to true.
If you set No_Finding_State to True or you don't set a Server or Main_File, then the report becomes an "external report". With an external report, you manually make a call to start it, make calls for each "record" to print, and make a call to end it. Something like this:
Sample
Get Start_Report of oReport to eRptStat
For i from 0 to (iCusts-1)
// Find the data yourself
Send DoSomeKindOfCustomFindingOnYourOwn
Get Handle_Report_Line of oReport to eRptStat
Loop
Get End_Report of oReport eRptStat to eRptStat
This opens up all kinds of techniques. Normally, you'd actually find a record before calling Handle_Report_Line so the table buffers have the information for the body section. But you are not limited to this. You could load your data from any source (tables, web-service, embedded SQL statement etc.) and place them in array, which could then be sorted any way you want. Before calling Handle_Report_Line, you would put one line of data from the array into a place (like a struct property) where the rest of your report (body sections, etc.) could use it.