Discussion:
Micro Advance Object
(too old to reply)
Steve Meyerson
2010-01-06 14:04:09 UTC
Permalink
VFP9SP2 (XP)

I have a report which overwrites a preprinted form. To accommodate
differences in users' printers, I need to push the top and left
positions of the "objects" in the detail band programmatically.

I've done this before by adding a user-selected number of lines at the
top. But in this case I need to lower/raise the top and left
positions in tinier increments (i.e. less than 1 line).

I notice the Vpos and Hpos fields in the .frx table of the report have
numbers in the thousands with 3 decimal places. Is there a way to
correspond these numbers to pixels or something?

Or is there an easier way (perhaps without having to fiddle with the
.frx)? I'd appreciate any help. Thanks.

Steve
Dan Freeman
2010-01-06 16:45:38 UTC
Permalink
Post by Steve Meyerson
VFP9SP2 (XP)
I have a report which overwrites a preprinted form. To accommodate
differences in users' printers, I need to push the top and left
positions of the "objects" in the detail band programmatically.
I've done this before by adding a user-selected number of lines at the
top. But in this case I need to lower/raise the top and left
positions in tinier increments (i.e. less than 1 line).
I notice the Vpos and Hpos fields in the .frx table of the report have
numbers in the thousands with 3 decimal places. Is there a way to
correspond these numbers to pixels or something?
Or is there an easier way (perhaps without having to fiddle with the
.frx)? I'd appreciate any help. Thanks.
Steve
Look in the Tools\Filespec folder inside VFP's Home(1) folder. There are
a bunch of FRX files that show, by version, how VFP uses fields in the
FRX (and scx and pjx).

You might also want to get a copy of Cathy Pountney's books on the
report writer at http://www.hentzenwerke.com

Dan
Steve Meyerson
2010-01-06 23:10:49 UTC
Permalink
Post by Dan Freeman
Post by Steve Meyerson
VFP9SP2 (XP)
I have a report which overwrites a preprinted form. To accommodate
differences in users' printers, I need to push the top and left
positions of the "objects" in the detail band programmatically.
I've done this before by adding a user-selected number of lines at the
top. But in this case I need to lower/raise the top and left
positions in tinier increments (i.e. less than 1 line).
I notice the Vpos and Hpos fields in the .frx table of the report have
numbers in the thousands with 3 decimal places. Is there a way to
correspond these numbers to pixels or something?
Or is there an easier way (perhaps without having to fiddle with the
.frx)? I'd appreciate any help. Thanks.
Steve
Look in the Tools\Filespec folder inside VFP's Home(1) folder. There are
a bunch of FRX files that show, by version, how VFP uses fields in the
FRX (and scx and pjx).
You might also want to get a copy of Cathy Pountney's books on the
report writer at http://www.hentzenwerke.com
Dan
Thanks, Dan. I've been there (90scx2.frx) before and should have
thought of it this time. I figure the values in the Vpos & Hpos fields
are given in 10-thousandths of an inch (e.g. 2500.000 is a quarter
inch). I guess 2500.001 is a hair more - or maybe a speck of dust? :)
Steve
tom knauf
2010-01-07 10:00:47 UTC
Permalink
Hi,

maybe you can also try the setting "respect printer borders" (not sure if
its so in english, it´s in page setup)
If I remember correctly the borders then depend on the printerdriver,
important for needle printers.

hth
tom
Post by Steve Meyerson
VFP9SP2 (XP)
I have a report which overwrites a preprinted form. To accommodate
differences in users' printers, I need to push the top and left
positions of the "objects" in the detail band programmatically.
I've done this before by adding a user-selected number of lines at the
top. But in this case I need to lower/raise the top and left
positions in tinier increments (i.e. less than 1 line).
I notice the Vpos and Hpos fields in the .frx table of the report have
numbers in the thousands with 3 decimal places. Is there a way to
correspond these numbers to pixels or something?
Or is there an easier way (perhaps without having to fiddle with the
.frx)? I'd appreciate any help. Thanks.
Steve
Steve Meyerson
2010-01-07 15:24:28 UTC
Permalink
Thanks for the idea, Tom. I drilled down as far as I could go
(...Advanced, etc.) but couldn't find that option. I suspect it's
availability may be dependent on the particular default printer. In
that case it may have to be done on the user's end - which I'd have to
put in the instructions - which of course they never read :)
Steve
Post by tom knauf
Hi,
maybe you can also try the setting "respect printer borders" (not sure if
its so in english, it´s in page setup)
If I remember correctly the borders then depend on the printerdriver,
important for needle printers.
hth
tom
Post by Steve Meyerson
VFP9SP2 (XP)
I have a report which overwrites a preprinted form. To accommodate
differences in users' printers, I need to push the top and left
positions of the "objects" in the detail band programmatically.
I've done this before by adding a user-selected number of lines at the
top. But in this case I need to lower/raise the top and left
positions in tinier increments (i.e. less than 1 line).
I notice the Vpos and Hpos fields in the .frx table of the report have
numbers in the thousands with 3 decimal places. Is there a way to
correspond these numbers to pixels or something?
Or is there an easier way (perhaps without having to fiddle with the
.frx)? I'd appreciate any help. Thanks.
Steve
tom knauf
2010-01-08 08:51:39 UTC
Permalink
Hi Steve,

no, its in Foxpro :

try
open the report - then menu file - page setup - in the middle there is a
radiobuttongroup "printable area",
it offers whole page or "respect margins" (or something like that)


HTH
Tom
Post by Steve Meyerson
Thanks for the idea, Tom. I drilled down as far as I could go
(...Advanced, etc.) but couldn't find that option. I suspect it's
availability may be dependent on the particular default printer. In
that case it may have to be done on the user's end - which I'd have to
put in the instructions - which of course they never read :)
Steve
Hi,
Steve Meyerson
2010-01-08 15:00:29 UTC
Permalink
Thanks, Tom. That looks like it might work. Once again, I've seen it
before and should have remembered.

However, I need to do it programmatically so the user can specify an
adjustment amount within the .exe.

FYI, I've solved it, albeit a bit cumbersome. I tried the report
listener, but couldn't seem to work the Render method correctly
(couldn't find a good example). So instead I keep the .frx "included"
in the project (where it's read-only in the .exe), copy it to a temp
file, open it and:

REPLACE ALL Hpos WITH Hpos + nHorAdjustment, ;
Vpos WITH Vpos + nVerAdjustment ;
FOR ObjType = 8 && All are field-type in this case

REPORT FORM TempFile .....

(The Hpos, VPos and adjustment values are in 10-thousandths of an
inch)

If anyone has a good example of doing this with the report listener,
I'm all ears (or should I say "eyes":::)

Thanks.

Steve
Post by tom knauf
Hi Steve,
try
open the report - then menu file - page setup - in the middle there is a
radiobuttongroup "printable area",
it offers whole page or "respect margins" (or something like that)
HTH
Tom
Post by Steve Meyerson
Thanks for the idea, Tom. I drilled down as far as I could go
(...Advanced, etc.) but couldn't find that option. I suspect it's
availability may be dependent on the particular default printer. In
that case it may have to be done on the user's end - which I'd have to
put in the instructions - which of course they never read :)
Steve
Hi,
Loading...