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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report with blank lines just at bottom

Status
Not open for further replies.

SitesMasstec

Programmer
Sep 26, 2010
523
Brasil
Dear colleagues:

I designed a report to show some fields of each record. The last three fields takes most space for each record, and in some records there is no data. Because of this, I marked 'Remove line if blank'. Please see figure bellow:
TelaAgenda1a_ytzwsf.jpg


It works fine, except that the bottom of each page takes a lot of empty space.
I think this is because VFP calculates and takes all the reserved space for the next record
(HAS the last three fields data OR NOT). This doesn't occur in the middle of the report.
RelatAgenda1a_nr8u8v.jpg


Thank you,
SitesMasstec
 
Well, a whole detail band would need to fit, and that is measured before blank lines are removed. And that does not fit.

Bye, Olaf.
 
Hello Olaf!

So, there is no way the lines to be effectively printed (excluding blank lines) in the report to be calculated before? (in VFP 9)

Thanks,


Thank you,
SitesMasstec
 
You could make it better NOT using MLINE in this case, just a 1 line report control set to the memo field as is (no complex expression) and "stretch with overflow". There is no need for that acrobatic expressions here.

Bye, Olaf.
 
Problem is that some records have memo field with one or two hundred lines of notes, and in this application the user can choose to see the 3, 6 or 9 the last lines of the memo field in the report.



Thank you,
SitesMasstec
 
Then show LEFT(memo,240) as start of the memo. Or keep it at your expression, but make the control 1 line high only and "stretch with overflow".

Bye, Olaf.
 
I think for debugging purposes I would first put a horizontal line at the end of the detail section - making it float so if the text boxes appear it shuffles down.

Then I would reduce the size of the three memos to be just one line deep - with 'stretch with overflow' turned on.

(You don't actually need three text boxes, you might think about using a UDF instead of two them...)

Then the band height will be shorter by default and that might sort the problem.

Memo fields do make reports behave a tiny bit unpredictably.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Yes, good, now I am using just the entire memo field, with the height just for one line and marked "stretch with overflow".

But another minor problem appeared. As Olaf noted before, "the detail band is measured before blank lines are removed". It is also true for using "stretch with overflow": the detail band is measured before the lines are stretched, so sometimes part of the memo field will not fit in the same page and is printed in the next page...

It would be ideal for the detail data for each record stays in the same page. Well, I understand I am wishing so much...


Thank you,
SitesMasstec
 
If you want that level of control you probably need to base your report on a cursor that has one row for each line in the memo field
that way you can control where the page breaks come.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
There is a setting in the "Print When" tab: Also print...[ ] When band content overflows to new page/column. Obviously, that should be unchecked.

Bye, Olaf.

 
I have already tried this, Olaf (I checked "When band content overflows to new page/column") but partial detail band continued goes to next page.
For now, I opted for a large part at the bottom of the report to be blank (as shown in the model above) than risking to have partial data of records to go to next page.


Thank you,
SitesMasstec
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top