Areas of Interest, as counted by my cat

Month: August 2005

Why do report layouts in VFP9 need wider field/expression controls than in VFP8 and earlier?

A common question about running reports created in Visual FoxPro 8.0 (and earlier) in VFP9 is “Why do I have to make my field/expression controls slightly bigger to avoid having my data truncated in the report output?”.

The glib answer is that, when SET REPORTBEHAVIOR 90, vfp9 uses GDI+ to render text instead of regular GDI. GDI+ requires a little more space to render the same text string than GDI.

If you’re happy with that answer (which is essentially “Just because!”) then great. No need to read further.

If you’re interested in exactly why GDI+ needs to allow more space when rendering text, then check out this: It’s pretty interesting.

Update 16-June-2006: This related blog post Text Mess in .NET by Wesner Moise is also interesting.

Pessimism is Positive

It’s really better to be a pessimist than an optimist. I think pessimists get a bad rap. Sure, everyone likes the idea of being upbeat and happy. But it’s not a good survival perspective. Problems only get solved because people worry about them.

David Brin answered the critics of the pre-millennium Y2K disaster theorists by saying that it was a classic case of a self-defeating prophesy. I agree with him. If everyone had just said, “She’ll be right, mate” and done nothing at all about the problem, then almost certainly IT departments everywhere would have been extremely busy and stressed come Jan 1, 2000. (You just know that’s an understatement.)

Good programmers are pessimists. They have to be – they learn to be very early in their career.

“That will never work, you know.”

“Why not? I’ve debugged it, it runs fine. I’ve tested it. I’m a good programmer…”

“What about more than one user running that screen at a time? What about a user who stays in that screen overnight while your midnight triggers are running? What about machines with no audio card? No installed printer? You’re doomed.”

“Why, I’ll show you, you… you… big fat pessimist, you.”

Techniques for alternate Report Previews in VFP 9.0

Quite a few of the discussions on the Universal Thread Visual FoxPro forum recently have been on the subject of the new Report Preview screen in Visual FoxPro 9.0, and how to control it. A particular concern is the behavior of the preview toolbar when a REPORT FORM.. PREVIEW is issued in a topform application. In my sessions I have striven to show that the default preview application is just that – a default – and that alternative forms of a preview solution are not only possible, but easy to implement. In this article I show an alternative user interface for the report preview window that you can take away and customize to your heart’s content.

Link: Techniques for alternate Report Previews in VFP 9.0

Spanish translation available here: 

© 2021 More Than Four

Theme by Anders NorenUp ↑