Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text using Stretch with overflow problems alongside ActiveX controls

Status
Not open for further replies.

dbMark

Programmer
Joined
Apr 10, 2003
Messages
1,517
Location
US
Summary: Do not place an ActiveX control alongside a text field using Strect with overflow. Unless someone else can figure out a way?

I had a report where two pie charts (OLE or picture/ActiveX bound controls) were side by side. Worked great. Project was to replace one of the pie charts with a report expression with text. As usual I set Floating and enabled Stretch with overflow. Then I discovered that they forced an extra couple inches of space below in the report, tested in VFP 6, 8 and 9 beta versions. It was as though their total lengths were combined even though they were side-by-side. I even swapped them from one side to the other, but no difference. A 2.5 inch pie chart and a 3 inch stretched text field forced the band to be 5 inches long.

If that band happened to be at the end of the page, then it would drop that extra spacing - unless I had additional text fields underneath in the same band, which of coure I needed to have. Arghh!

At first I thought it was because I had hard line breaks in my text, but the problem persisted after I removed them.

I wrestled with this issue for a few days, trying numerous variations and eventually came up with a workaround. Had to look at it from every angle, though. In this case it turned out that the text field I wanted to place side-by-side with the pie chart was going to be of reasonably constant length, so I split the data into an array and I made each element of the array print in a separate text field. Simplistic solution: Use a stack of text boxes in place of the stretching one. Worked great!

Probably I should have thought of it earlier, but ouch! I now know the VFP report writer so much better!

Not sure if this suggestion would have helped as I saw it after I finished my changes:
thread184-472086 - about changing print order from top to bottom versus right to left and changing number ofcolumns.

thread184-108041 - problems with large memo fields in a box
thread184-518660 - more on memo fields (with mgagnon's FoxPro Advisor download link 3/2003)
thread184-751613 - floating vertical lines

dbMark
 
Thread184-472086 <- That's the one that made me go crazy one day. I wonder if MS fixed that in VFP 9 (guess I could check, but I'm swamped right now).

Thanks for the heads up dbMark. I use mostly Crystal Reports these days for any report that needs a chart, but it is still good to know these things because these kinds of things can burn an entire day up quick.

boyd.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top