Solved

Delphi Programming question

Posted on 1997-08-29
3
169 Views
Last Modified: 2010-04-06
We are in the progres of developing an application with Delphi 3.0. And we want now to create the programs which generates output on a printer. We have looked at quickreport 2 but we can't (so it seems) use it.
We must have full control in our program over which band is printed when and in which order the bands are printed, and not the way quickreport does. We are having a complex structure of statements when to print a band and in which order the bands are printed. For example we want to print the 2e detail band in some situation before the first or print a differend heading based upon the data. In other words all bands are detail band and the data specifies in which order and if a band is printed.
0
Comment
Question by:poppema
3 Comments
 
LVL 1

Expert Comment

by:jturpin
ID: 1342896
The best way I found of doing this is as you are
processing your data to write the lines, header,
footers etc out to a TMemo.

This gives you complete control over what is
written when, and over the font size etc.

Then you simple read the TMemo and print it.
(If you include a few special characters
you can trap these after reading the memo
and before printing the lines. This will
eneable you to switch fonts, eject pages,
etc.
0
 

Author Comment

by:poppema
ID: 1342897
Thanks for the quick answer. But we think that it isn't what we want. We don't want to interrupt the printing process because the process can be some where in the world  
0
 

Accepted Solution

by:
cashew earned 50 total points
ID: 1342898
I thingk that QuickReport may still be your best bet, but from the description of your problem, you are not making full use of the capabilities that QR has.

The basic premise of QR is that there is one table that is traversed as the report is generated, and you do what you want with each record.  QR provied the grouping and summary abilities.

You are correct that QR does not let you alter the order of band printing, but it does allow control over whether or not a band is printed at all.  Note that in a band, you could have just one long expression, rather than a database field, and then in the OnPrint, evaluate the expression and fill it in however you choose.  In that way, you could change how the expression is evaluated at will, "switching" order of bands by switching how expressions are evaluated.

You do not specify why your report requirements are so complicated.  Presence or absence of bands is easier than changing the order of the bands.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question