Forum > LazReport

LazReport: Report Pages Count

(1/2) > >>

InfoMan:
Good afternoon, everyone!

I'm using LazReports to view the reports in my program. Everything is going very well, but how do I know the number of pages that the report will have when printed without viewing it first? I have a button that will print the report directly, but use it only prints the first page. How do I fix this? Thanks to all who respond.

JD:
Look at the sample programs in the Lazarus\components\lazreport\samples directory.

They'll show you how to print preview reports and how to print reports with many pages.

InfoMan:
I've done it and still not working. Still printed only one page.

JD:
Can you post some of your code or a sample project here?

InfoMan:
Unfortunately, I think there's no way it would have to post the entire program for that. It turns out that I am developing a program that reads DBF files exported by another program and from these DBFs I view various reports.

The access component Tdbf called DadosEsp. The component is called LazReport RelEsp. I have a button on the form that prints the form. Basically after specifying the required data such as: Name of the report, and others use the following code:

  DadosEsp.PrepareReport RelEsp.PrintPreparedReport then if ('1 ', 1);

I've tried changing the value ('1 ', 1) for other values ​​but it keeps printing only the first page, even putting eg ('100', 1).

Absolutely no way to solve this, but until now could not. Thanks to all who respond.

Navigation

[0] Message Index

[#] Next page

Go to full version