INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Report with blank lines just at bottom

Report with blank lines just at bottom

(OP)
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:


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.

Thank you,
SitesMasstec

RE: Report with blank lines just at bottom

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.

RE: Report with blank lines just at bottom

(OP)
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

RE: Report with blank lines just at bottom

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.

RE: Report with blank lines just at bottom

(OP)
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

RE: Report with blank lines just at bottom

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.

RE: Report with blank lines just at bottom

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 Smileing

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.

RE: Report with blank lines just at bottom

(OP)
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

RE: Report with blank lines just at bottom

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 Smileing

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.

RE: Report with blank lines just at bottom

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.

RE: Report with blank lines just at bottom

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close