Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find orientation of the report from FRX file
Message
From
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:
01669565
Views:
58
Likes (1)
>>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
* ...
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform