Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Delphi Programming question

Posted on 1997-08-29
3
Medium Priority
?
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 100 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

661 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