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!

use vertical line in report 1

Status
Not open for further replies.

Judi201

Technical User
Jul 2, 2005
315
US
Hi!

In creating an invoice, I need to draw vertical lines. I have read that the line will stretch if I draw it through the bands, but I can't seem to get it to work. I need it to start at the bottom of the group header band and go into the group footer band.

Any tricks or am I just missing something?

Thanks for any suggestions.

Judi
 

It should work if you actually stretch it in your design from the bottom of the group header band and into the group footer band.

I am using a different method, though, and feel that it gives me much more control over my lines. I do not stretch my verticals through several bands, I build them in bits. Say, a short vertical line in a detail band and stretching only through the whole detail will repeat on the next detail line, and they will connect with each other. (If you have any Print-When expressions or Skip-Line-If-Blank marked in your band, you will need to add those to your vertical line bits, too.) This way, I open and close frames around any number of bands practically without limitations.
 
Stella,
Thanks for the reply. I can use the short lines for each detail line. What I need is for the lines to go to the bottom of the page even tho there are only a few lines printed ( as in a preprinted form. Any ideas?

Judi
 

In this case, you should stretch you line all the way through the page footer. (Can be done with the short ones, too, but you don't have to.)
 
Hi!

Stella said:
In this case, you should stretch you line all the way through the page footer. (Can be done with the short ones, too, but you don't have to.)

I am missing something on the 'stretch the line all the way through the page footer'. I am wondering how I can try the 'short line method' and draw lines throught the blank space where there are no lines printed. Any suggestions??

Thanks for ANY input!

Judi
 

I am missing something on the 'stretch the line all the way through the page footer'. I am wondering how I can try the 'short line method' and draw lines throught the blank space where there are no lines printed. Any suggestions??

No, no, not both at once, only one or the other. Sorry for the confusion.

In your case, as I inderstood it, one long line is simpler to do and makes sense. In the report designer, stretch it all the way down your design page, crossing several bands at once, and finish it somewhere in your page footer (create an empty one, with minimum space, if you don't have one). Then it should go through all the blank space, even if no lines will be printed there.

Short line method makes sense if you want more custom lines and frames that go and/or breaks/ends where it is hard to achieve it with one long line. But using it requires a little more work on your design.

I hope I made it clear this time.
 

Judi, I thought the discussion in old thread184-751754, involving the short line technique and other report issues might be useful for you.
 
Hi Stella,

Thanks. I don't know how I missed that when I searched, but I did. It is helpful. I still can't get my line to cover the entire detail band height. Going back and checking everything I could think of, I saw that the 'properties' won't allow me to do anything with 'stretch'. Only the 'Print when...' is available. I guess I will just leave this for now. Got to move on. All I can say for sure is that the line seems to stay the actual physical size regardless of how the band increase or decrease in height. I'm just not getting it. :(

Appreciate your time and contributions.

Judi

 

Judi, I probably havent't used long lines for a while. I just tried it. There is something about the bands through which the line runs, or it appears so. It seems that when a line is running through several bands among which there are group headers/footers, the Stretch properties just get disabled, or rather read-only.

Still, it seems, that with Stretch property locked, if I start it in the page header, even if just a bit, not in the group header, and draw it all the way through the page footer, it does actually run into the page footer (would that work for you?).
If you run it through group header into group footer, it will run as long as the data – not just for the physical length of the line.
If you run it into a “non-pairing” band, then it runs only to its physical length. (Under “pairing” bands I mean Title/Summary, Page Header/Page Footer, Group Header/Group Footer.)

I always use short ones, that start and end in the same band (or, at most, under the band's border line), and it makes them all stretchable, even though I leave them with "No stretch" setting - they just interlock with the next one.

I don’t have a ready answer - I got to think how to make it work for you.
 
Stella said:
Still, it seems, that with Stretch property locked, if I start it in the page header, even if just a bit, not in the group header, and draw it all the way through the page footer, it does actually run into the page footer (would that work for you?).

I am trying this....C a r e f u l l y!!!

By 'Stretch property locked' do you mean NO Stretch?

I can't tell you how much I appreciate your hanging in here with me !!!

Judi
 

By 'Stretch property locked' do you mean NO Stretch?
I mean by this the same you meant by "the 'properties' won't allow me to do anything with 'stretch'". This doesn't always mean "NO Stretch", it means rather that it is read-only property, and will stretch where it is supposed to, and not where it is not.

As I noted above, when started and ended in "pairing" bands, they will stretch through the whole group/page - try and see what you get.
 
Stella, I started over with a new report to try to eliminate any unseen problems. This is what I am trying to do.
--------------------
| |
| | Within this page header
| | I have two fields that must
| | expand for name,address1,
| | address2, etc using " ;
| | and , " to skip unneeded
| | lines
|\\\\\\\\\\\\\\\\\\| Page header (grey bar)
|\\\\\\\\\\\\\\\\\\| Group header ( grey bar)
| | Detail line (this will vary in
| | # of printed lines)
|\\\\\\\\\\\\\\\\\\| Group footer (grey bar)
| | PAge footer info (set length)
| |
|\\\\\\\\\\\\\\\\\\| Page footer (grey bar)
|\\\\\\\\\\\\\\\\\\| Sunnary (grey bar)

In recreating the report, I discovered that one of my problems was that the address info in the stretch field is pushing the first detail line down one row.

1. What can I do to stop that?
2. I want the vertical lines to go from group header to
group footer.
Using the right search terms, I found lots of discussion on this in other forums but all just say what you are telling me about stretching across the bands. I don't see why I can't make it work. Maybe starting over will help but I have to get past the stretching address fields.

Thanks for any ideas.

Judi
 

In recreating the report, I discovered that one of my problems was that the address info in the stretch field is pushing the first detail line down one row.

But this address field is set to stretch, you say, so it is supposed to stretch and push everything down, or I misunderstood you? What do you want it to do? In any case, check the properties of your detail band fields - are they supposed to float when the fields up there stretch, or are they fixed relative to the top/bottom of band? If you change that property, does it help?

I want the vertical lines to go from group header to group footer.
Well, from group header to group footer isn't hard to do - but it will stretch only through the actual data - and you said you need it to the bottom of the page even if data doesn't go there.

What I can suggest right now is this. You said your line makes only its actual physical size? So draw it the size of the page. Does it fit on your design page this way?

Another thing to try. Add extra white space on the bottom or top of you page footer (by stretching the borders of the band). Play around with the amount of white space. Draw the line from page header to page footer band only, all the way to the bottom of your stretched. Does it help?

And finally. Your group has never enough data to fill the page, right? So play with the cursor holding you report data. Create it the way so each group holds exactly the same number of records, even if they are empty. Uncheck "Remove line if blank" from your detail properties. Draw your line from page header to page footer band only. Should do it.

 
Stella !!!!
I finally hit the right place and my lines do what I need. Actually you have been telling me all the time, I just wasn't getting it.

One more question (on this topic)[smile]

Would you please comment on using 'fixed height' for the page header and how 'float' would work in that. I understand that 'stretch' would push it down but don't know how to work around that. Bless you for patience and kindness!!

Judi
 

Judi,

I am glad it works now, and thank you for the star.

I finally hit the right place and my lines do what I need.
So where this right place is located?

As for your question, it works like this:

Code:
[b]Float[/b]
Specifies that <the object> picture move relative to the size of the surrounding fields.
 
[b]Fixed Relative to Top of Band[/b] 
Causes <the object> to remain in the position you give it in the Report or Label Designer and maintains that position relative to the top of the band.
 
[b]Fixed Relative to Top of Band[/b]
Causes <the object> to remain in the position you give it in the Report or Label Designer and maintains that position relative to the bottom of the band.

Does it answer your question? If not, please clarify.
Also, in your VFP6, find Help topic Chapter 7: Designing Reports and Labels and read it through. It has a lot of illustrations with explanations and links to related topics. It should click it all in the right places.
 
Stella,

I pushed the horizontal line in the page header up just a bit and carried the vertical line up to touch that line. Then the same thing in the page footer, down to the horizontal line there. This makes the first detail just a hair taller than the following but I can surely live with that.

I just realized that I was ignoring the obvious in the other problem. I simply made the field big enough for the entire expression, 5 lines and now it works perfectly. I hope this thread help others that come along as confused as I have been.

Stella, the embarassing thing is that I have read the Help section - more that once, and I also have the very good book "Visual Fox Pro Report Writer". It says the same thing about the header and footer but I just wasn't getting it.[blush]

If 10 stars were allowed, I would certainly click them for you. With your help I have this invoice exactly like the preprinted form they use now.

Judi
 

I pushed the horizontal line in the page header up just a bit and carried the vertical line up to touch that line. Then the same thing in the page footer, down to the horizontal line there.

Oh, now I understand what you meant when you said "Actually you have been telling me all the time, I just wasn't getting it", because I did tell you about drawing it from page header to page footer and "pairing" bands. :)

Well, when you get it the hard way, you remeber it better.

Also, if you have connecting horizontal and vertical lines, you might consider drawing a whole rectangle instead, exactly in the same place.

Glad for you and good luck with your project.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top