Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QuickReport Title Band 1

Status
Not open for further replies.

lhenry

Programmer
Feb 24, 2002
8
MY
How to start printing, from 2nd page onwards, the top of the pages is equal to the bottom of the title band?
 
lhenry,

I'm not sure what you want to print on pages 2 and greater, but if you're looking to know how to control what's printed based on page number, here's what I do:

1. Drop a QRSysData field into the header. Set its Data property to qrsPageNumber and its Font.Color to clWhite (which effectively hides the content from the user).

2. In an appropriate OnPrint (or BeforePrint) event, either disable components in the header or change captions as needed. For example, here's an example of one way to use a Page Header to print a value only on the first page:

Code:
procedure TQuickReport1.QRLabel1Print(sender: TObject; var Value: String);
begin
   QRLabel1.Enabled := ( QRSysData1.Caption = '1' );
end;

There are, of course, other ways to do this...

Hope this helps...

-- Lance
 
Hi, Lance,

Sorry for not having expresed myself clear enough.

The user is using preprinted paper. The title band is used to hold the invoice # and the customer's address. From 2nd page onwards, I'd like the detail band to start printing below the preprinted logo and address.

Thanks.
 
lhenry,

Well, the basic technique I outlined will certainly work for that. Just be careful to make certain your title band doesn't shrink and you should be fine.

To keep from having to throw in too many event handlers, just create one that disables all the printable controls in the header and then share that as needed.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top