Solved

Delphi Programming question

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

9 Experts available now in Live!

Get 1:1 Help Now