Main_Report_Id - Report
Contains the object ID of the outer report
Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None
Syntax
Property Integer Main_Report_Id
| Access Type | Syntax |
|---|---|
| Read Access: | Get Main_Report_Id to IntegerVariable |
| Write Access: | Set Main_Report_Id to IntegerVariable/Value |
Description
Main_report_id contains the object ID of the outer report. This should never be set. All objects including the outer report object have this ID.
Upon occasion, you need to get at a property that was set only in the outer main report. If the property is unique to the outer object (meaning that you created a custom property for this one outer object), you will be able to access this property from all child objects through a simple get or set (delegation will find the property). If the property also exists in the child reports (which happens when all reports are based on the same subclass), this will not work. A get or set will find the current child object's property. By using the main_report_id property, you can directly get at the outer main report.
This property is maintained by the Report object and you should be careful if you decide to change its value. The consequences of having it set to an invalid value are unpredictable.
The following procedure finds the object ID of the main outer report and gets a property of this object and sends it a message.
Procedure Something Integer Val
Integer Obj#
Get Main_report_Id to Obj#
Get Some_parent_property of Obj# to Val
Send Some_Parent_Message to Obj#
End_Procedure