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

Printing Report With Detail Band Limit 2

Status
Not open for further replies.

alisaif

ISP
Apr 6, 2013
418
AE
Hi

This is my first thread!

Can I set the detail band with my choice. As I have a pre printed form and have more than 20 records which will take two form to print. I want to print 10 items on each form. From 11 record it should jump to 2nd page.

Thanks
 
Well for the other things to go into the right horizontal position, you have to make your footer height higher.

All your report obejcts seem to be anchored to the bottom, that can stay, but the footer is too narrow and therefore that report objects print too low.

Bye, Olaf.
 
I created a table and frx for the same records. Please check it.

Thanks

Saif
 
I don't know what you want to say with "I created a table and frx for the same records" I am not Mike, I don't have your mail, I can only see the screenshots.

But it's clear you need to higher your footer height.

Also, as you want exactly 10 records in the Detail band, which is 12 cm high from your pictures, the detail band needs to be 1.2cm. BUT: It seems you have each record in it's own group, because you have a gap between each record in the printout, which must come from the Group header band. So the sum of the Group Header and Detail band heights must be 1.2 cm to get exactly 10 records. Instead of "misusing" the Group header you can also higher the Detail band height to get gaps between rows, that would be the normal way to create the spacing between the records.

You seem to have a misunderstanding about the VFP report behavior: The detail band is printed per row, so it's height needs to be multiplied, footer and header are of course only printed once per page. so the place for detail records is total page height minus header minus footer.

Bye, Olaf.
 
In light of Olaf's comment: You seem to have a misunderstanding about the VFP report behavior: you might want to spend some time looking over the free, on-line video tutorials on VFP at:
Of particular interest might be:
Basic Reporting - Pt. 1
Basic Reporting - Pt. 2


Good Luck,
JRB-Bldr
 
Olaf said:
The detail band is printed per row, so it's height needs to be multiplied, footer and header are of course only printed once per page. so the place for detail records is total page height minus header minus footer.

Saif, this is what I was telling you in the first place.

Then take the height of the paper (210 mm if you are using A4). Subtract the height of the page footer and the page header. Divide the result by ten. That's the height you want for your detail band.

You also need to get rid of the group bands. That only confuses the issue.

Before we go any further, it would help if you could tell us exactly what happens when yo do the above steps. Do you see ten items in the main part of the page? If not, do you see more than ten? Or less than ten? It really is difficult to solve the problem without having the answer to that basic question.

Mike




__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
OK, I have had a closer look at this now.

Your page header is 8.46 cm. The page footer is 2.67 cm. Remove the group bands. That leaves 9.87 cm for the main part of the page (21 - 8.46 - 2.67). Divide 9.87 by ten, and you get 0.987 cm.

But your detail band is 0.87 cm. That's going to give you 11 detail items per page (9.87 / 0.87 = 11.344).

Are you seeing 11 items per page? Is that essentially what the problem is?

If so, then the solution is to slightly increase the height of the detail band. Make it as close as you can get to 0.987 cm, and you should be fine.

Have I understood the problem correctly? Does the above solution make sense to you? What happens when you do it?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike said:
Your page header is 8.46 cm. The page footer is 2.67 cm.

Well, that's the foxpro report I assume, the template you print on shown in saif3.jpg has a 9cm header, 12 cm detail and 7 cm footer.

1. I agree with Mike, remove the group band.
2. The remaining three bands in the foxpro report trhen will be header, detail and footer. Header and footer must be as high as the template, so you have to adjust your header band to be slightly higher, 9cm instead of 8.46cm, the footer is your main problem, it's height must be 7cm, not 2.67cm, it's no wonder the report objects don't print at the desired positions. And the detail band is what really differs, in the template it's 12cm, but what you set in the FRX is the height per record, so that must be 1.2 cm for 10 records. And then everything falls into it's place, unless you have less than 10 records. We can address that problem later, for a test of the layout simply print a report with at least 10 records and only care for the first page for the moment.

Your footer report controls are simply set at the wrong places. The total line in the template has captions on the left, so you have to move the qntymaj, totwt and totsize to the right to not print them over the caption, in short: Simply move the controls, where you want them to print. For the vertical positioning that is straight forward, isn't it? I can understand, that you have problems with the horizontal positioning, but not why you align them to the left, where the template has it's captions.

Bye, Olaf.
 
Thanks Mr.Mike and Mr.Olaf

After continuous efforts and as per your suggestions I succeed to obtain the result which I was looking for. Really it is a great achievement for me.

Thanks a lot!!

Saif
 
Saif,

I'm delighted you've got it working.

I've uploaded the image of the final copy that you sent me - click on the link below to view it.

That said, this image seems to show 12 items on the page, not 10. But if you're happy that it's what you want, that's fine.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
 https://www.dropbox.com/s/ocidfnxh1zinibg/saif4.jpg
Thanks Mike

It is not necessary to print exactly 10 records, initially I was unaware about the specifications so I kept 10 records, now I think I can fit the 13th record also.

BTW, what font is suitable for the multiple copies as it is printing slow as compared to the printing in Dos2.6a.

Saif
 
Saif, As far as printing multiple copies are concerned, no font is better or worse than any other. Choose the one that is most suitable for the type of document.

If it is printing more slowly than under DOS, that might be because the DOS version used printer-resident fonts, whereas the Windows version will use TrueType or other Windows fonts. Printer-resident fonts will always be faster, and you can use them in Windows as well, but they have several disadvantages: (i) You have to be sure that they are present on the end-user's printer (and will continue to be available when the user eventualy changes printer); (ii) They are not scalable, so you don't have so much choice on font size; and (iii) On-screen previews will look different from printed output.

Before you start looking for different fonts, you need to make sure that the slowness really is a font issue and not somehting else.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top