I would like to use for EasyReport the following syntax too.
Normally you have to use:
- Code: Select all Expand view
- PRINTAREA 1 OF oVRD ;
ITEMIDS { … } ;
ITEMVALUES { …}
- Code: Select all Expand view
- PRINTAREA “MYHEADER.V01” OF oVRD ;
ITEMIDS { … } ;
ITEMVALUES { …}
User-friendly names would be more clear.
I changed the method AreaStart to:
- Code: Select all Expand view
- METHOD AreaStart( nArea, lPrintArea, aIDs, aStrings, lPageBreak ) CLASS VRD
LOCAL i
LOCAL nRecords := 0
LOCAL nCondition := 0
LOCAL nPrBefore := 0
LOCAL nPrAfter := 0
if VALTYPE(nArea) = "C"
nArea := ASCAN( ::aAreaInis, Upper( ::cAreaFilesDir + nArea ) )
endif
nRecords := IIF( ::aControlDBF[nArea] = 0, 1, ::aDBRecords[ ::aControlDBF[nArea] ] )
nCondition := VAL( GetPvProfString( "General", "Condition", "1", ::aAreaInis[nArea] ) )
nPrBefore := VAL( GetPvProfString( "General", "PrintBeforeBreak", "0", ::aAreaInis[nArea] ) )
nPrAfter := VAL( GetPvProfString( "General", "PrintAfterBreak" , "0", ::aAreaInis[nArea] ) )
DEFAULT lPageBreak := .F.
::nCurArea := nArea
It is working.
Timm would you be so kind to review the code.
Thanks in advance
Otto