Solved

Delphi Programming question

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now