>>Hi,
>>
>>I need to find out the orientation of a report (FRX file). Is opening the FRX file with USE and then getting the value of ORIENTATION from the Expr field the only way? Or there is a better, more efficient method?
>>
>>TIA
>
>If I get the orientation from the Expr field, can I rely that there is no space between the key word 'ORIENTATION' and the equal sign? That is, does VFP 9 consistently sets this to be as:
>
>orientation=0
>
>
>or it could be (with space before and/or after the number):
>
>orientation = 0
>
>
>?
I don't know if that is consistent but anyways I wouldn't trust and rely on it being it consistent. It is easy to parse it. These lines are from my real world app that is in use for years:
Lparameters tcReportFilename
Local lnSelect,lcOrientation,lnOrientation,lnLeft, lnHeight, lnHpos, lnVpos, lnWidth,lnMaxWidth, lnHeaderHeight, lnTitleHeight, lnFooterHeight
Local Array arrM[1],aLeftLine[1],aBox[1]
lnSelect = Select()
Select 0
Use (m.tcReportFilename) Alias "xxRep"
If Atcline('orientation',Expr) > 0
lcOrientation = Mline(Expr,Atcline('orientation',Expr))
lnOrientation = Int(Val(Substr(m.lcOrientation,At('=',m.lcOrientation)+1)))
Else
lnOrientation = 0
Endif