Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Gibson
  Where is Paul Gibson?
 Glasgow
 United Kingdom
 Paul Gibson
 To: Cesar
  Where is Cesar?
 
 Brazil
 Cesar
 Tags
Subject: RE: Right align on reports
Thread ID: 373362 Message ID: 373484 # Views: 35 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Reports and Printers
Date: Friday, March 22, 2013 1:21:33 PM         
   


> > Has anyone seen this before. Is there a fix to stop fields exceeding their boundaries?
>
> Hi Paul,
>
> Probably using SET REPORTBEHAVIOR 80 this issue does not happen, right ?

Interestingly it is the opposite.

... and that might be why some people who've tried to replicate it using my sample, have failed. If they are trying in 90 it possibly won't happen but if they try in 80 it might.

The problem is in 80 but when I switch to 90 the problem appears to goes away, certainly in my testbed, I've not yet tried it at the user's end. So the solution might be to switch EngingeBehavior to 90 but that actually causes me a problem, interestingly it is due to FoxyPreviewer.

I use FP only for the job of exporting reports to PDF/RTF/XLS etc so I switch FP on to do the exports by calling Do FoxPreviewer.App and when I don't need it I call Set ReportBehavior 80 (as per your advice). If I subsequently start setting Set ReportBehavior 90 to get around this issue then I'll start using FP in the whole of my application.

You might think that's a good thing but I'll explain why I'm using FP for just the exports and not everything. The app I have added the integration to is mature, very mature, it was written at the turn of the century and it is HUUUUUGE. I don't want to just switch it to a different report engine without the kind of extensive field testing that I just can't afford right now. Exporting the reports to different files is an optional feature that users are not reliant on so for me that makes it safe to use FP for that but it's less safe to switch the whole application to FP. That's not a slight on FP at all, I think it is great, I know it has had a huge amount of testing by so many people I just can't risk switching on generally throughout such a huge and mature application. I hope you understand why I've come to that conclusion.

I there another way of switching FP off other than calling SET REPORTBEHAVIOR 80?

> Colin and Lisa Nicholls already wrote abot this, see if that helps!
>
> Observations on Right-aligned labels in VFP9 Reports
> http://spacefold.com/colin/archive/articles/vfp9reporting/rightalign/monofonts.html
>
> This other article has some related contents as well:
>
> Why do report layouts in VFP9 need wider field/expression controls than in VFP8 and earlier?
> http://spacefold.com/colin/posts/2005/08-18GDIplusinreports.html

This one was very interesting:
Observations on Right-aligned labels in VFP9 Reports
http://spacefold.com/colin/archive/articles/vfp9reporting/rightalign/monofonts.html

but interesting that they say:

Now, you will have observed that this problem doesn't occur for field/expression controls. They are all right-aligned correctly because the Report Designer doesn't specify an exact starting position for the text string, but rather specifies the box within which the text must be rendered. So the alignment calculation takes place in the report engine, with GDI+ taking the text size into account.

They found that in both 80 and 90 the text fields were always correct. I am not finding that. I am finding that in 80 the text fields do bleed and overstep their boundaries in some circumstances. Maybe it's because the fields are using different font weight and size but maybe there is another reason?

I think I'm a little closer to knowing what the problem is but not 100% on what the solution should be.

ENTIRE THREAD

Right align on reports Posted by Paul Gibson @ 3/21/2013 4:05:08 PM
RE: Right align on reports Posted by Todd Landrum @ 3/21/2013 4:26:53 PM
RE: Right align on reports Posted by Paul Gibson @ 3/21/2013 5:36:06 PM
RE: Right align on reports Posted by Todd Landrum @ 3/21/2013 6:22:34 PM
RE: Right align on reports Posted by Doug Hennig @ 3/21/2013 6:56:34 PM
RE: Right align on reports Posted by Mustapha Bihmouten @ 3/22/2013 11:08:47 AM
RE: Right align on reports Posted by Cesar @ 3/22/2013 12:27:39 PM
RE: Right align on reports Posted by Paul Gibson @ 3/22/2013 1:21:33 PM
RE: Right align on reports Posted by Cesar @ 3/22/2013 5:35:59 PM