Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jon Goad
  Where is Jon Goad?
 Jonesboro
 Arkansas - United States
 Jon Goad
 To: Doug Hennig
  Where is Doug Hennig?
 Winnipeg
 Canada
 Doug Hennig
 Tags
Subject: RE: Programmatic report creation problems
Thread ID: 143415 Message ID: 143430 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Tuesday, August 28, 2007 7:08:18 PM         
   


> Hi Jon.
>
> > 1. The classes don't currently support wrapping fields that don't fit, which would be really nice (something similar to "wrap fields" option in the Report Wizard in VFP).
>
> I'm not sure what you mean by not supported. Since you're responsible for object positioning (setting the nHPosition and nVPosition properties), it's your code that specifies where the fields go, not mine.
>
> > 2. In light of problem # 1, if you include enough fields that they run off the page, and then your print or preview the report in VFP9 with SET REPORTBEHAVIOR=90, the report preview looks squashed, and it appears as if a non-standard paper size is being used (it's quite narrow, almost like if you were printing to a receipt slip printer). However, if you SET REPORTBEHAVIOR=80, the report will preview, but of course the fields that don't fit are truncated.
>
> That's the way the reporting engine in VFP works. The solution is to not let the fields run off the page {g}.
>
> Doug

Hi Doug,

I really appreciate your work on these classes, and for sharing them with the community. Point taken that my code is positioning the objects. But me being the lazy developer I am, I'm simply using a for...next loop to loop through each of the fields in my cursor and add them to the report. I guess what's happening is that if there are enough fields in the cursor, and the position of the fields extend beyond the bounds of the page, I get the weird squashed effect in the report.

I suppose I'll need to add something to allow a user to choose a paper size, and then I'll have to add some code to my for...next loop to wrap to the next line if I have too many objects for a single line by summing the width of the objects until the sum equals or exceeds the width of the page. Does that sound like it should work?

Thanks,

Jon

ENTIRE THREAD

Programmatic report creation problems Posted by Jon Goad @ 8/28/2007 5:10:58 PM
RE: Programmatic report creation problems Posted by Doug Hennig @ 8/28/2007 6:10:16 PM
RE: Programmatic report creation problems Posted by Jon Goad @ 8/28/2007 7:08:18 PM
RE: Programmatic report creation problems Posted by Doug Hennig @ 8/28/2007 9:14:39 PM
RE: Programmatic report creation problems Posted by Jon Goad @ 8/29/2007 7:41:19 PM
RE: Programmatic report creation problems Posted by Doug Hennig @ 8/30/2007 9:35:43 PM