Thanks
r.load("icstat.rsl", WinStyleHidden)
rt = 360
lt = 1440
tp = 2880
bm = 720
pagewidth = (8.5*1440)
objectsize = pagewidth-rt-lt
if objectsize <=0
then
msginfo("Report settings", "invalid margin settings")
return
endif
r.margins.right = rt
r.margins.left = lt
r.margins.bottom = bm
r.margins.top = tp
I think you need to have an uiObject, a 'frame' containing all the objects
in your report.
This frame has to be set visible=false during runtime or assigned a color
not seen on your prints.
Then you attach this uiObject, get the original position and add the new x /
y values.
With 'designModified = false' and 'myReport.save()' you finish the job.
Here is an example I use in several apps.
Uwe
var
myReport Report
RepForm UIObject
newVal_H longInt
newVal_V longInt
repname string
endVar
repname = ":RPTS:ReportName.rsl"
if myReport.load(repname,WinStyleHidden) then
if RepForm.attach(myReport.uiGroup) then
;| uiGroup is the area you want to move
newVal_H=longInt(round(ConstOffsetHorizontal+(mmToTwip*NewOH),0))
;| User enters new Value in mm, Pdx needs values in twips
newVal_V = longInt(round(ConstOffsetVertikal+(mmToTwip*NewOV),0))
uiGroup.Position = point(newVal_H,newVal_V)
;| now set the new x/y-position
myReport.designModified = false
;| save modified report
if not myReport.save() then
errorShow()
endIf
else
errorShow()
endIF
else
errorShow()
endIf
"Jack E. Wasserstein, DDS, Inc." <Ja...@Wasserstein.com> schrieb im
Newsbeitrag news:4181765c$1_1@cnews...
var
myReport Report
RepForm UIObject
neuerWert_H longInt
neuerWert_V longInt
repname string
endVar
switch
case Beleg = "Scheck":
repname = ":PRG:SHEKHEZ.RSL"
case Beleg = "Ueberweisung":
repname = ":PRG:UEBERWEI.RSL"
endSwitch
if myReport.load(repname,WinStyleHidden) then
if RepForm.attach(myReport.Formgruppe) then
;// Repform ist der Bereich, der verschoben werden soll
neuerWert_H
=longInt(round(KonstOffsetHorizontal+(mmNachTwip*NeuOH),0))
;// Anwender gibt mm ein, berechnet werden Twips
neuerWert_V = longInt(round(KonstOffsetVertikal+(mmNachTwip*NeuOV),0))
RepForm.Position = point(neuerWert_H,neuerWert_V)
;// hier wird die neue x/y-Position gesetzt
myReport.designModified = false
;// Anwender wird nicht gefragt, ob gespeichert werden soll
if not myReport.save() then
;// speichern des geänderten Reports
errorShow()
endIf
else
errorShow()
endIF
else
errorShow()
endIf
endProc
"Uwe Tiedje" <uwe.t...@arcor.de> wrote in message
news:4181f202$1_2@cnews...
When changing the margins.right property through ObjectExplorer, the
original value is restored immediatley. It can only be changed through Page
Setup dialog. Running ObjectPAL, the error only occurs if the report
contains an object. This seems to indicate, you have to set the right
margin before adding objects to the report.
In Paradox7, you'll get a message "This value can not be set", when trying
to change the right margin.
--
Bertil Isberg - CTECH
Paradox buglist:
online: http://w1.826.comhem.se/~u82608896/
FAQ newsgroup: corel.wpoffice.paradox-faq