Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2003.05.01;
Download: [xml.tar.bz2];


DX: QuickReport351. The problem with counting pages before viewing Find similar branches

MaxSit   (2003-04-17 19:01) [0]

Before viewing the document, you need to know the number of pages in the generated report.

I used to do this:
PageCount: = Form1.QuickRep1.QRPrinter.PageCount;
Form1.QuickRep1.Preview; // when building using PageCount

But, when reports began on 200-300 pages, then use
Prepare became unbearable, because it runs as much as the Preview. On this site I found: << How to insert in "QuickReports" Page No. of ">>. There it is suggested to use:
, but I do not have qrsPageCount, I looked at older versions of QR, it is also absent there.

What are the ideas. Thank you in advance.

Anatoly Podgoretsky   (2003-04-17 19:37) [1]

But there is a PageCount for QrPrinter, but where did they get the qrsPageCount, probably delirious.
And tell me you are doing QuickRep1.Prepare; so waste time.

MaxSit   (2003-04-17 19:54) [2]

The fact is that if you do this:

Form1.QuickRep1.Tag: = Form1.QuickRep1.QRPrinter.PageCount;

crashes AV error on the first line.

This is how it works:

MaxSit   (2003-04-17 19:58) [3]

In dogonku:
Form1.QuickRep1.Tag - this is my PageCount variable

Anatoly Podgoretsky   (2003-04-17 20:28) [4]

And why do you need a separate variable, when the value is right in QuickRep1.QRPrinter.PageCount; at any time directly accessible.

MaxSit   (2003-04-17 20:38) [5]

Precisely in order to fill out a preview on each page: "PageNo Page of PageCount".
If this filling is hanged on the print event of the QRLabel itself, then we will see the following:

Page 1 from 1
Page 1 from 2
Page 1 from 3
Page 1 from 100

and only after the formation of the entire document, we will get a real QuickRep1.QRPrinter.PageCount.

Anatoly Podgoretsky   (2003-04-17 20:59) [6]

This part is done by Prepare.
And with QRPrinter you have to be more cautious, it is installed in NIL in many places, therefore access to it is very dangerous.

Anatoly Podgoretsky   (2003-04-17 21:03) [7]

You will have two / three times the formation of pages, prepare, preview, print
The loss of time is terrible.

MaxSit   (2003-04-17 21:49) [8]

QR karyavy, I certainly agree, well, there are no other options yet. And I have been using QR for a long time, we are with you (Anatoly Podgoretsky) not for the first time discussing this issue. To redo the entire project under the new generator is not yet possible.
And customers require that each page have a signature of the number of pages and the current page, and somewhere they are right, this is convenient.

Anatoly Podgoretsky   (2003-04-17 22:26) [9]

MaxSit © (17.04.03 21: 49)
It’s impossible to tell what is squatting, but you have to understand what you are doing, in this case, clearly, the QRPrinter is at this stage equal to NIL-
Here's what the FAQ says.

QuickRep1.ReportTitle: = "This report has" +
IntToStr (QuickRep1.QRPrinter.PageCount) + "pages";
QuickRep1.QRPrinter: = nil;


This should help you.

MaxSit   (2003-04-17 22:40) [10]

Yes, but again:

And so you want without him.

Johnmen   (2003-04-18 00:04) [11]

To know in advance the total number of pages, you need to generate a report. So ? So. So the preliminary run is inevitable.
Despite the fact that we already have the image of the report, it does not quite satisfy us - it does not indicate the total number of pages. So we have to re-generate it, i.e. a second run is also inevitable ...

Pages: 1 whole branch

Forum: "Main";
Current archive: 2003.05.01;
Download: [xml.tar.bz2];


Memory: 0.59 MB
Time: 0.027 c
We answer immediately.
2003-04-20 04:18
How to select items in the TreeView with the right mouse button?

We answer immediately.
- = Korn = -
2003-04-13 19:37
String => Char (Help with conversion)

We answer immediately.
2003-04-17 17:22
ListView Save and Load ..?

We answer immediately.
2003-04-15 09:58

We answer immediately.
Maria V.
2003-04-11 11:43
How to read and write the contents of binary TBlobField?

afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
English French German Italian Portuguese Russian Spanish