Solved

Delphi Programming question

Posted on 1997-08-29
3
161 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

770 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