×
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!
  • Students Click Here

*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.

Students Click Here

Jobs

How to correctly make a box on a VFP-Report
2

How to correctly make a box on a VFP-Report

How to correctly make a box on a VFP-Report

(OP)
Hi,

I need to make on a report a box containing nNumber of fields.
When I set the top line of the box just above the detail band and the bottom line of the box
just over the bottom of the detailband I get a box high as the detailband the records which fit into that box are printed inside the remaining outside.
Increasing the box with just 1 pixel in height will result in a box spanning the whole page.
See picture enclosed. (Have enlarged the picture of the box in the report designer here, to make things more clearly.
Anybody who can advise me how to arrange a box with all the records, inside?
It seems to me this is also an old similar matter, which was by that time solved with instructions of Mike.
This one I can't get it working.
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Hi Koen,

Under "Properties" of the box click the "Stretch relative to height of band"



hth
MarK

RE: How to correctly make a box on a VFP-Report

Obviously stretching/floating helps, but what you got very likely was that way, because the band under the detail band was the page footer band, right? If you add further detail bands or a group and use those bands, the box ends at that level. Quite straight what you're asking for.

Bye, Olaf.



Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Mr. MjMcsksrsm,
Olaf,

The option to set the stretch did not result in the desired result.
Funny (or not) this options in Stretch downward and the options in Object position are sometimes disabled. Don't know why.
What do I want to achieve:

A report with a given number of boxes in these boxes a textfield. The box should stretch over the bad and contain these boxes. Don't seem to be a difficult thing, except that the box does not stretch over the band, it remains its size.
See picture enclose. Also constructed a desired output.

And yes this detailband is just on top of the Page Footer.Adding an other detailband in between did not help.

Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Koen,
I think Olaf is on the right track, try adding a Data Grouping to your report and make sure your horizontal lines of the box are in the header and footer of the Grouping and the vertical line reach the header and footer as well. This should give you what you are looking for. Keep in mind that it can get tricky when the data breaks over two pages but I believe it should still do what you are looking for.

Hope this helps,

Ed

RE: How to correctly make a box on a VFP-Report

Hi Koen,

Data Grouping helps.



However Ed might be right if the data stretches over more than one page
hth
MarK

RE: How to correctly make a box on a VFP-Report

(OP)
Hi,
Now I am facing the impossibility to add a second detail band.
This disturbs the boxes in the firts detail band completely,
Any clue what to be done so that I can have in my first detail bands boxes with several contents and below that, in the second detail band several rows with content?
If required, I have a test cursor and report avaiable to upload here.
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Well, use the same solution again: Let your new detail band have associated header/footer bands. Put the bottom line of the box into the header of the second detail band.
Obviously set the targetalias of the second detail band and have a relation between the alias of the first detail band and the second detail band.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

How to add associated header and footer bands:


Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Hi,
I suppose I have not explained correctly what my prolem is.
I dont want to make a second detail band with some boxes inside, like I have done on the first Detail band. I just want to add a second detailband with some text and labels inside.
Problem is that when you add a second band the boxes on the first band are affected.
I have uploaded an image showing on the left side a part of my report under development with 2 bands, next to that the result. Look at the boxes.
On the right side you can see the same report, now with only one band and the result next to that.
So problem is when you add a second detailband, the first gets messed up.
Obviously I am doing something wrong here, question is, 'how can I add an other detailband to my report without having the first messed up?
Regads,
Koen

RE: How to correctly make a box on a VFP-Report

You should limit the vertical lines to the detail band and have upper and lower border right at the edges of the neighbor bands. Then the lines get the correct height.

But now, if you left design has the bottom line for Detail1 in Detail2 and you have multiple records for Detail2, that horizontal line repeats. And you solve that by letting Detail2 have associated header and footer bands, which are only printed once.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,

I have no records in Detailband 2 only 1 label.
I have no lines in the left nor right situation, I have a box. This box shows correctly in the design at right and gets messed up in the design at left, which is basicly exaclty the same as the right design, just only added a 2nd detail band.
If I have only one detailband, with a correct formatted box and set a tick in the 'associate header and footer bands'checkbox, my box get's messed up
When I add a 2nd detailband and set the tick also in either or first and or second band, my box get's messed up.

Regards,
Koen

RE: How to correctly make a box on a VFP-Report

If you only wamt to print a label below detail1 data, then add a footer to that detail band. A Detail band is always driven by data and printed as many times as there are records to print.

Besides that, use four lines, not a box. and keep each line inside a single band. So the top and bottom lines are at the edge of their band. That way the stretching of the vertical side lines works out.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
the four lines will result in the same unwanted result. And 'only a label' is in the test environment. In production the band will be filled with a textbox and data.
When I add a footer band, it will automaticaly also add a header band and what is worse, the box is meesd upfind
Any other suggestions?
It looks like I have to find an other layout, this does not seem to work in VFP.
Thanks for all your well-intended advice.
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

It surprises me the box and lines crossing bands are printed with gaps or too long or bold, but if I respect my latest advice it works:


The box around order details (products and quantity) is made of 4 lines, not a box. And that looks this way:


If I stretch the vertical lines in Detail 1 to cross over to header and footer this happens:


If I use a box from Detail1HEader to Detail1Footer this happens:


I remembered Reports with elements covering several bands once worked better, but it becomes obvious boxes work worst, single lines work as long as you keep each one in a single band. And it helps to have header and footer as those are only printed once, so there is the top and bottom line.

This is done with Northwind data:

The relation between orders and orderdetails is done with OneToMany set to .T.

The other relations are normal.

The same principle should work, if you have a secondary detail band for a secondary list. If Northwind would have records about orderprocessing status history that could be printed in a separate box with another Detailband with associated headers and footers.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
would you mind to upload that correct report?
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,

Your example would work fine. Unfortunately this does not exactly comply to my situation.
You have a Groupheader1, GroupHeader2 with one field only and a Detail with nRecords.
I have no such only one Detail with a group on field.
What I would like is to have below that an other band (Detail2) with nRecords.
When I introduce an other band my boxes get messed up.
When I replace the boxes with 4 lines, same result: messed up boxes.
I have included a to test report 'Planning' with boxes and working fine. Now please insert a second detailband and you will notice what mess it resulsts.
I have also included a 2nd testreport Planningtest2 now instead of boxes lines.
The reports includes a dbfReport in the dataenvironment.
Please note in the report in the 2nd Band all data from cDag8 should be listed. If ness. I could construct an other data with 2 separate tables, one with fields cdag1 ~ cdag7 plus ID a.s.o. and second table with only cDag8 plus ID a.s.o. however there is no relation between those 2 tables except that they come from one and the same masteralias. So my report is not like your example a situation with relation between 2 tables it is a simple listing of fields.
Now if my desire to have the listing in a seperate band is not possible I shall have to look for an other presentation. 'Problem' field cDag8 does not have a field relation cagdeel.
Grr. I thought this would be an easy thing to do. Turns out to be an unmatched obstacle. However I haven't given up already.
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Anyway, there is something buggy with the rendering.

It could work better with the usual idea of pulling all data into one report cursor with a query instead of making use of relations.

Maybe Monday.

B<e, Ola.f

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
Fortunately my tst form using a one dbf only, no relations involved.
Maybe.....
Have a nice weekend
Koen

RE: How to correctly make a box on a VFP-Report

Hi,

There seems indeed to be something buggy when rendering boxes - Labels and H-Lines are positioned correctly, boxes are not. I tried both ReportBehavior 80 and ReportBehavior 90 - no difference
This is the design



and this the output



Maybe Cathy Pountney knows a way out

hth

MarK

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
I am so sorry, and feel also sorry you gave me the impression you did not explore the two test reports I have uploaded:
planning.frx works with boxes: fine
The boxes are placed according to the tip of Mark here.
planningtest2 works with lines: a mess

Now I want to insert another band under my Detail1. Try it with planing.frx, I get a mess
No need to do this with planningtest2 as it is already a mess.

The screenprint from your last mesage is not so clear to me. What are lines and what are boxes and what goes wrong where as the whole thing looks like a mess to me.

Yes if Cathy would jump in and help that whould be great, or Lica Nichols, however it seems she is not active in advising anymore. :(
Maybe it is a good idea to post this question on aToutFox hoping that Francis wull notice my request. Or do you have a better idea?
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Hi
It gets even worse when you work with rounded rectangles!

Design:



Output:



hth

MarK

RE: How to correctly make a box on a VFP-Report

Hi,

After playing around with the Report Designer I found out that a rectangle is NOT rendered correctly when traced between the DetailHeader and DetailFooter. Rectangles are rendered correctly in Groups, Columns and also Pages

ReportDesigner:



Output:



hth

MarK

RE: How to correctly make a box on a VFP-Report

(OP)
Mark,

When you take my planning.frx (uploaded July 5th at 21:40) would you be able to enhance it with an other band, without the boxes being messed up?
Or otherwise show me how to construct a report with:
1)a ground textboxes in a box
2)below that a listing of text boxes (not in box 1)
The data is plain simple, one cursor only, if requested I could construct a second cursor with data for 2) This 2cnd cursor has no relation to the maincursor.
Basic, basic - no 'complicated' relations and so on.
Regards,
Koen

P.S. My test reports are with fields in Dutch wordings, if you want I could compose a new test now with 100% English wordings. And maybe we should start a fresh new topic as this one gets toooo long with much side problems which are not relevant to my basic problem.

RE: How to correctly make a box on a VFP-Report

Hi Koen,
1)
ReportDesigner with 3 columns - Rectangles over Page, Column and Group - H-Lines in DetailHeader 1 and DetailFooter 1



Output



2) Unfortunately VFP does NOT render the boxes correctly if you stretch them form DTHeader to DTFooter - you have to adopt Olaf's suggestion 4 lines - 2V and 2H

hth

MK

RE: How to correctly make a box on a VFP-Report

...
a more detailed illustration



hth

MarK

RE: How to correctly make a box on a VFP-Report

Hi Koen

Quote:


Or otherwise show me how to construct a report with:
1)a ground textboxes in a box
2)below that a listing of text boxes (not in box 1)

ad 1) This does not work (from my experience) since you'll have to stretch the box from Detail Header to Detail Footer. You may want to adopt Olaf's suggestion - 2V and 2H lines - or have a box around the set of textboxes in the Detail bands. But then each set of data will be "boxed" (see below)



hth

MarK

RE: How to correctly make a box on a VFP-Report

...

My explanation to all this: since Multiple Detail Bands are only around since VFP9, "MS" probably forgot to test this possibility (Box from DTBandHeader to DTBandFooter) and we have to rely on a workaround.

hth

MarK

RE: How to correctly make a box on a VFP-Report

Hi Koen,

Please don't stretch the V-lines over the Header and Footer bands (see below) - and everything should work fine.



hth

Mark

RE: How to correctly make a box on a VFP-Report

Hi Mark,

thanks for all these Tests. Koen, that was him picking up, not me.

Taking the final words: Using multiple is problematic. I see that using Detailbankd Footer and HEader or not, using single lines instead of a box also doesn't help. So I don't see a fix in that problem, unless you can do with just one Detail band and rather do more groupings or otherwise reorganisation of the report sections.

Or use something like Word automation creating a docx and printing that.

A solution you might have is neither using boxes nor lines but just a reportlistener with its Render method. Looking into how foxypreviewer uses that might give an insight, then you'd draw lines with GDI+ functions. Maybe based on indicators in the source DBF pointing out to your specific reportlistener when to begin a box (drawing the top line) and from then on until the end signal printing side line segments in whatever current detail height up to the bottom line.

Aside of the hint on foxypreviewer I don't know how to straight from the top of my head and you might put that down and rather use another alternative, as that's simpler to apply than digging into reportlisteners and gbi+ drawing. It sounds trivial, but surelys has its hurdles also with DPI and not drawing too long lines. As far as I know you are getting a render event for each control of the report and not for each record of the dbf, and I don't know whether the graphics object you get at hand is the current page, the current band or even just the rectangle forseen for the control. That also doesn't make it simple.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Mark,

Your tip results in single boxes containing only one record. Not the desired boxes containing all the records.
Please change my planningtest2.frx to confirm my findings.

Regards,

Koen

RE: How to correctly make a box on a VFP-Report

Well, Mark already shows, that you can only have multiple element boxes with groups, so everything has to be done with grouping.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

Hi Koen,
What you intend to do is NOT feasible! Either you have to drop the second detail band and put those information into the group footer or find a different solution.

Design



Output



Please do also read Olaf's comments.
hth
MarK

RE: How to correctly make a box on a VFP-Report

One more thing about the behavior of two detail banks: They'll not print like groups. You don't get 5 records of detail1 and then 5 records of detail2. detail1 and detail2 print alternating. That's also causing the messed box drawing with two or more detail bands. What you want is more groups. You want the detail band to be different per group or subgroup, then mahe multiple report controls at the same postion of the sam detail band and use their printwhen. But don'T introduce new detail bands.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
Interesting, but please baar in mind, I cannot create a second band when I have in my fiest band a box, with groups. Box or 4 lines, no difference, they get messed up as soon as you insert a second band. The question is not why but how to, either a bug/feature os mis coding.
Koen

RE: How to correctly make a box on a VFP-Report

Hi Olaf,

Quote:


That's also causing the messed box drawing with two or more detail bands.

I doubt this. Then the Controls in the DTBandHeader and the DTBandFooter would not print correctly either. However they do (please see below). Furthermore the messed box drawing also occurs with ONE band only. I think it is simply bad coding from the MS-Team.



MK

RE: How to correctly make a box on a VFP-Report

Koen

you introduce a new band to print something beneath the previous, don't you? But as I said two detail bands (both within the same group) print alternating. You print record1 band1, record1 band2, record2 band2, record2 band2,.... thus you get messed box lines. You never get a secondary box with a secondary detail band.

Mark all the time shows how multiple blue boxes get into an overall red box, simply by having more groups in the data.

I assume (don't know) in the box you plan with detail2 band you don't want to print the same fields of your cusor. Either you still do, make it a single field even if it should contain different data, as long it's all string data you can first print names then tasks or whatever. If you want to print other fields, then you can add new report controls into the same detail1 band put them at the same position and only print one of them depending on which group is currently printed.

But the way a second band is processed is ciorrect, that's not a bug, that's never changing, you thing first all data is printed with detail1, then all data with detail2, but it's alternating. Simply startt a new simple report and have 4 sample records and see for yourself.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
have you tried what you propose here on my test Report form I have uploaded? The one with the boxes?
Have you seen how nice it prints?
Have you than just introduced a second Detailband? Do not even put anything not even a label nor textbox in that new band!
See what happens?
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Koen, are you not listening?

I explicitly say that NOT to add any band.
All you need is distinction of more groups with the field defining the group. No more bands!

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

I only suggested to start a simple new report with two bands so you see EVEN WITHOUT ANY BOXES, they print in an order you most likely never would have anticipated. They print alternating, interleaved, not one after the other. So additional bands are no solution to your problem anyway.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
Thanks for the idea.
I will now produce two reports and combine them. Trusting and convinced there is a impossibility in the by me proposed layout.
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

No, also not what I said.

Mark shows multiple blue boxes are possible, doesn't he? That's not done with a band per group or box. That's done with a field to define multiple groups with multiple values.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
Your tip to make use of the blue boxes as shown by Mark do not make me happy.
I will go for 2 reports: one with boxes one without. Combine them to one report.
Thanks for your suggestions.
Regards,
Koen


RE: How to correctly make a box on a VFP-Report

Just remember GROUP BY in SQL is something completely different from groups in reports. And you don't make a band per box.

Otherwise, I don't know how else to make things clearer to you, Mark has posted a lot of screenshots together with report layouts to demonstrate.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
I know for sure the difference between Group by in SQL select and group by in reports.
Have you seen how the blue box bottomline is composed?
I dont know how to tell you that Mark has confirmed the layout I was after is not workable and I dont know why you keep on hammering on a different thing each time. This unknown fact about the 2 group by clause was never discussed in this topic before? What makes you think I did not know?
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

The topic changed as we experienced and tested a few things on the go, that's just natural. And the group by thing vs report groups: Well, you wanted two boxes underneath each other, didn't you? You don't need 2 detail bands for that matter, but two groups in the data.

Anyway, do as you think you're getting to your goal.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

Hi,
An additional illustration how erratic VFP handles its reports (NO fields - only static controls)

Design



Output



hth

Mark

RE: How to correctly make a box on a VFP-Report

How are the objects floated? I'd expect such a page high box, if the ends of it are anchored to page header and footer. Anyway, you can only get lines to stay fine when not leaving stable grounds and it's not even very clear what the limits of this stable ground are.

I just recently had problems with a legacy OCX based in VB5 which crashed with an unspecific "Overflow" error most of the times after something was printed, even if just previewed. Maybe some Windows update broke something with winspool or VFPs report engine breaks something or gdiplus has changed and we see first effects of the legacy state of VFP. As said I remember this working differently but so far I also had no calls from customers of previous days for which I created reports with boxes. Might also already be replaced by something else and they are in the hands of other ISVs. Also, in many cases I only used horizontal lines to separate groups.

The simplest solution is surely like Koen to go other routes instead of forcing it into one report. My goto alternative would always be word or if office isn't available for automation create HTML output.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Hi,

Quote (Olaf)

you wanted two boxes underneath each other, didn't you?
No that's not my design. Don't know where you got that opinion. There is a message in this thread explaining what my proposed layout is, please reread carefully.
To create a HTML output will surely possible, however I will go for a report created VFP in which case I can, by using FoxyPreviewer, leave it up to the final user in which format the report is to be saved, a very elegant option in FP.
Although the HTML output in this case is not the most elegant as boxes and lines with a fine hairline thickness are rendered in lines of 2pix instead of 1 only. The PDF and MS WORD conversion works in this respect correctly. Save the report in Excel results in an mess. So for those users who want to save into Excel an other option should be used. Vilhem created a very fine class to save a cursor into XLS or XLSX. For that output the boxes layout is not applicable.
So to conclude:
To created a report in the by me desired layout I shall have to make two reports which to be combined. To create an Excel output a separate procedure must be composed.
Thanks everybody who helped me with several very useful tips on this one.
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Koen, as far as I remember you put a detail2 band there just to sketch what you want, just a label to see how that prints, and later wanted to put a second list of data there.

Now let me just do as you ask and look back what I find about your desired layout...

Quote (Koen)

I just want to add a second detail band with some text and labels inside.
Problem is that when you add a second band the boxes on the first band are affected.

Well, first of all, a detail band only prints with a record of data, and in fact, two detail bands on a cursor with say 10 records mean printing 2x10 bands. So you can't use a detail band to only print a text/label once. That's where my interpretation of your misconceptions about the use of bands start. And I haven't forgotten I was suggesting to use the header of the next band to end the box and print something else. But a) Then that something else would be in another alias and you'd use the targetalöias of that band so it doesn't interleave with the printing of the main report cursor and b) I assumed you wanted to print another list of data, not just one line/summry, whatever.

Sorry, this was a cascade for misconceptions after misconceptions. I just gave the answers I gave in the understanding of the problem. And I gave some hints tested, some untested and later reverted. This thread shows all the behind the scenes of evolving something to a solution or giving up and finding alternatives.

And about your interpretation of my tip to use HTML: I wasn't talking of a HTML reportlisterner, not FoxyPreviewers HTML output option. I was already talking about alternatives of VFP reports. No report at all, instead outputting HTML, you can use a SCAN loop and Textmerge to create HTML, merge that into a HTML skeleton, even have Javascript inside for interactions or drawing on the HTML canvas, eg drawing boxes, if HTML tables won't suffice. Without any hassles of the VFP report writer. You can then show it as preview in a browser control instead of the report preview and you can use ShellExecute to print HTML to PDF or a real printer or whatrever. If the report engine doesn't fit the needs as easily, then other output mechanisms can solve the problem. Just like Word automation is another solution. HTML just has no requireement of an installed Office.

I don't know, maybe you're in some kind of a deadline stress. I don't condemn you, I just observe your misinterpretaitons and wrong assumptions and ask openly why.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
my misinterpertations? Sorry for that. I merely wanted, for the record, to put it straight and correct what you assumed and seemed to recall.
No I dont want a second detail band with boxes. I want:

Quote (Koen)

I dont want to make a second detail band with some boxes inside, like I have done on the first Detail band. I just want to add a second detailband with some text and labels inside.
No misunderstanding?
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Yes, and if you know a detail band is printed as often as there are records in the report driving alias or targetalias of the band, you can only make one assumption about the "text" in your quote:

Quote (Koen)

...a second detailband with some text and labels inside...

You can only make the assumption that this "text" will come from data and isn't just a one time text like a caption you already write at report design.

So for about the fourth time (?) You don't use a detail band for that, even if the text isn't just a fixed text string literal, then you use a report variable and print that, And you print that into a footer band.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
correct, Text is supposed to come from a cursor.field
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Fine, then we're back to printing a list of things. But you still don't seem to get the order of printing with two detail bands.
You don't get all records printed with detail1 band and then the last record printed in detail2 band. Two detail bands print alternatingly. Unless you specify the detail2 band get its data from another alias.

All you really need is data thath goes into another group. Now, you don't want the box surrounding that further data? Fine, simple, use the printwhen condition on the linens so they only print for the first group.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
Sorry, but it won't work. The moment you have a detail band with a box and a group by, you introduce a second band the first one gets mixed up. :(
Solution I found is to combine two reports: one with the box in the detail band and the second one for the other data.
I am extremely satisfied with this solution .
Regards,

RE: How to correctly make a box on a VFP-Report

Well, running in circles. You don't introduce a new band.

Just a question: How did you assume the report would know when to switch from detail1 to detail2?

There is no logical recno to switch or anything like that.
The box layout depends on printing

groupheader
detail1
detail1
detail1
detail1
gropufooter

Introducing detail2 you get

groupheader
detail1
detail2
detail1
detail2
detail1
detail2
detail1
detail2
groupfooter.

And, of course, that messes the layout.

Bye, Olaf.



Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

(OP)
Olaf,
well spotted indeed a circle.
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

Hi Koen

There is a solution to your problem, but you'll have to process your data/organize them differently and it relies on Memo-Fields



In the zip-file you'll find the PRG, the DBF and the FRX/FRT files. You may of course adapt them to your needs.
hth
MarK

RE: How to correctly make a box on a VFP-Report

(OP)
Mark,
I must say a fine example of thinking out of the box.
Unfortunately this is not the layout I am looking for.
I was looking for a box around a couple of records and below that, in a second band (?) no box but some other records.
Unfortunately VFP does not allow this, a group by with a streched box in detail band with a second detail band without a group by.
I have now changed my layout into 2 reports.
Regards,
Koen

RE: How to correctly make a box on a VFP-Report

As said you could simply set the "print when" condition of the box or lines. The same goes for report fields, so in the same bands you already have you print something else depending on the value defining the group.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: How to correctly make a box on a VFP-Report

Hi Koen

Quote:


I was looking for a box around a couple of records and below that, in a second band (?) no box but some other records.
Unfortunately VFP does not allow this, a group by with a streched box in detail band with a second detail band without a group by.

Don't give up that fast. What about this (please download the files)
hth
MarK


RE: How to correctly make a box on a VFP-Report

(OP)
Hi Mark,
Looks nice I must say. Unfortunately it does not comply with my design :(
The listings below the boxes do not make sense (in my layout). If you could put them in the very last band it would be good.

Regards,

Koen

RE: How to correctly make a box on a VFP-Report

Hi Koen

Quote:


Please note in the report in the 2nd Band all data from cDag8 should be listed.

That's what I did!

Quote:


Unfortunately it does not comply with my design :( The listings below the boxes do not make sense (in my layout).

Now what IS your design? Furthermore it's what you were asking for (see 1st quote) - or do I miss something? Perhaps you could provide some living data and draw a sketch of what you're after.

Quote:


If you could put them in the very last band it would be good.

What do you understand by "very last band" - is it the Detail Band Footer, the Group Band Footer, the Page Footer or ...? You then just may want to drag and drop the data control there.
hth
MarK

RE: How to correctly make a box on a VFP-Report

(OP)
Mark!

Good morning!, I have just had to put a print when = no in the visitors field and that's it.

I shall quickly implant this in my live data, remove the 'vistors' and finalize the report.

Do you have any idea what this was for?
A group of people are scheduled for a daypart viz morning, anood, evening. They can be scheduled once or several times a day or several days.
Also they can be opted for backup-reserve.
So I will list Monday to Sunday, group those for morning and for anoon and evening. That's where the box are for.
Below that a simple list of backup-reserve's.
After al a very simple sheet of paper showing who is when scheduled.
Thanks a lot sir, for your first correct tip how to construct that box. And now your tip how to show the backup-reserve's
I like the idea to ut the group into a memo-field instead of different fields, which did not look so neat and nice as with a memo.
Thanks again.
Koen

P.S. I was never be4 involved in a thread of 68(!) messages. What a mess. Now it is fixed.

RE: How to correctly make a box on a VFP-Report

Hi Koen,

Thanks. Pleased to read that it worked out for you.

Quote:

What a mess.

No - you learned a lot and me too!

MarK

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!

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