Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find orientation of the report from FRX file
Message
 
 
To
13/07/2019 17:43:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01669561
Message ID:
01669566
Views:
58
>>>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
>* ...
>
Thank you very much for the code. I will try it; although since you have been using it for some time, I trust it 100%.
If you don't mind, I am curious. Why do you get the orientation in your app?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform