PageLayerName - cDRReport¶
Methods - Properties - Events
Method Type¶
Function
Return Type¶
Arguments¶
| Argument | Description |
|---|---|
sReportID |
ID of the report. Can be ID of the main report or the ID of a sub-report. This argument can be passed as an empty string. The empty string can be written as C_USEMAINDRREPORTID. |
iPageLayer |
The N-th pagelayer defined. |
Description¶
Returns the file name of the N-th pagelayer in a report. The file name is the name of the pagelayer that was originally used when including the pagelayer in the report.
The PageLayerID is needed to replace a pagelayer at runtime, and the name is needed to identify which pagelayer is represented by the ID. When the report only contains one pagelayer, it is less needed.
This method cannot be used before the report OCX object is initialized. The COM object creation is - when not done before - created as part of the OpenReport method.
DataFlex Framework usage¶
- Web
- Windows
- FlexTron
Sample¶
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
Procedure EnumeratePageLayers String sReportId
Integer iPageLayers iPageLayer
String sPageLayerId sPageLayerName
Get PageLayerCount sReportId to iPageLayers
Decrement iPageLayers
For iPageLayer from 0 to iPageLayers
Get PageLayerId sReportId iPageLayer to sPageLayerId
Get PageLayerName sReportId iPageLayer to sPageLayerName
Showln sPageLayerId ' ' sPageLayerName
Loop
End_Procedure
End_Object
Object oOpenReportButton is a Button
Set Label to 'Open Report'
Procedure OnClick
String sReportId
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
Showln 'Report ID Main Report: ' sReportId
Send EnumeratePageLayers of oReport sReportId
Send CloseReport of oReport sReportId
End
End_Procedure
End_Object