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

help for layout of report

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
0
0
NL
Hi
I created a report with a number of fields : no repeated values
Also a field that wraps along several lines.

I try to achieve:

wrapped field line1 another not wrapped field record1
wrapped field line2 another not wrapped field record2
wrapped field line3 another not wrapped field record3


But currently I get:
wrapped field line1 another not wrapped field record1
wrapped field line2
wrapped field line3
another not wrapped field record2
another not wrapped field record3


So fields "another not wrapped field record1"and rec 2 are having a gap in between.
Any idea how to achieve mu goal.

TIA
-Batr
 
Hi Bart,

Is the wrapped field "Stretch with overflow?"


Jim
 
What you want is not possible in an FRX.

A stretch always pushes down all values belonging to further records, there is no way to let a report control strech down beside several records.

A VFP report always works with concatenated stripes of the detail band, there is no way to overlap several records.

Bye, Olaf.

 
Olaf,
I slightly remember this Q was in the forum as well here years ago. But I can't remember the result. I thought it has something to do with having in desgn time overlap some controls. Or do I mess up other problems with reports.....

As you specific say this is not possible in a FRX does that mean there might be another solution?
-Bart
 
Well, another solution is to use Excel, as you can put your values where you want.

In an FRX as said you always will have a stripe per record, not overlapping, which you would need for the stretch of the left element to overlap into the area of the next record.

I can put my thought in several other ways. Tell me to stop if you get one of these:

1. If an element stretches, it always will push the bottom of the current record down, which means also pushing the top of the next record down, no matter if the vertical spacing would allow overlapping.

2. Streching does not only push down when the bottom border of the streteched element would collode with something.

3. What stretched does is not only changing the height of the stretched element itself, but the height of the detail band for that whole record.

All of these mean the same thing. If an element on the left side needs to stretch several lines, it will cause a gap on the right side. It doesn't matter, if the next record or even records will leave the left side empty and vfp could also stretch from the first record into the next few records. The report engine needs to render the current record, before it knows how the next records will look like.

Bye, Olaf.
 
OK Olaf,

I understand what you mean.
My stretched element is in fact built from several other fields.
So I now consider to code things in a way that the information-part which pushes the bottom of the current record will be redirected to the 2nd record aso.
Have to overthink how that might be achieved but I presume it certainly will be possible.

Thanks from a (for now) sunny Holland.

-Bart
 
The trick you have to use for the non-wrapped fields on the right is to concatenate them into one field that you define in the detail band to be tall enough to show all of the fields that are concatenated.

i.e. nw_field1 + chr(13) + nw_field2 + chr(13) + nw_field3



Andy Snyder
SnyAc Software Services Hyperware Inc. a division of AmTech Software
 
SnyAc,

take a look at the first post with the layout description. The values on the right side ceom from 3 records while the left side has several lines, but all of these lines are part of one record.

At least that's how I read it. Marking the values coming from a single field of a single record with borders, my guess would be it's this way:

Code:
+--------------------+---------------------------------------+--top of record 1---...
|wrapped field line1 |    another not wrapped field record1  |
|                    +---------------------------------------+
|wrapped field line2 |
|                    |
|wrapped field line3 |
+--------------------+---------------------------------------+--top of record 2---...
                     |    another not wrapped field record2  |
                     +---------------------------------------+--top of record 3---...
                     |    another not wrapped field record1  |
                     +---------------------------------------+

That is, the left side is a stretching report control displaying a memo multline value, while the right side is a non strching report control displaying a single line text field.

Bye, Olaf.
 
PS: So taken for granted what I've drawn in my "code" section above, you can only have the lower right two lines of record 2 and 3 within the band of record 1, if you'd have the values in record 1.

As a side node: the lower right text should end in record3 of course, not record1, just a pasting error.

Bye, Olaf.
 
My approach would be to create a cursor prior to running the report wherein the "not wrapped" fields are combined in the same record as the wrapped field.


Jim
 
Ok, jimstarr. If it always would be three lines, I'd agree. You'd only need to assure no right side field would be set to be fixed to the bottom of the band so they will never be pushed down.

But how about situations you'd want the next 4 records to print gapless on the right side? Or 8 or 20? You'd need to preprocess data in accordance of the height of the stretching field. It's not so easy.

Bye, Olaf.
 
Right, Olaf. My solution assumes a fixed number of fields.

Jim
 
Olaf,
You are exact describing my situation.
So I definitive need to manipulate my printcursor to achieve my goal as described on top of this thread based upon varying number of records.
-Bart
 
A far more productive use of your time would be rethinking your presentation of data in this report. It's easy enough to make "spanning" data horizontal instead of vertical and then use boxes and lines to make clear how the data is grouped.

(Note that I did not say "better". Only you know your requirements.)
 
I'd no go that route. As you say you need a varying number of records to put together you create a hard to maintain unelegant workaround needing to solve several problems:

1. Determining how many records you need to pull together into one. You will not only need to predict to how many lines the left multiline text will wrap, you also need to consider how many records are empty in the left area and if their empty area leaves enough space for the stretch and overflow.

2. Though you have a varying number of rows on the right side you need to prepare a report cursor with as many fields as you need at max. A limit of 254 fields is the end of that. As many fields as you provide as many report controls you will need to put in the detail band on the right side. Even if you can say at max this will just grow up to 20 lines, there will be no way of handling the one case in the future you'd need 21 or more.

3. The preparation of data is so complicated, that it would be easier to solve your problem by using something else. Another reporting engine/tool, eg crystal or list&label or change over to excel, where you can have such overlaps of multipline text automatically.

Consider, that FRX is no solution for you, don't force it, even if you have an idea, how to do it. If it's not simple enough to pick up on it and extend it later, it's something to avoid.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top