Link to home
Start Free TrialLog in
Avatar of rogerfg7
rogerfg7

asked on

QuickReports keep text together

We have an address field that we do not want to break over columns or pages.  How can we make a child band or a subdetail band print within a column or page?

QR v 3.6.2, Delphi 6
ASKER CERTIFIED SOLUTION
Avatar of Ferruccio Accalai
Ferruccio Accalai
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I can at least help you provide the details to allow the experts to answer your question.  You mention that, "We have an address field that we do not want to break over columns or pages".  Is this truly one field?  Or is it several fields comprising one address?  If it is one database field, could it contain carriage return line feed characters so it would need to be printed on multiple lines?  What is causing the issue?  Is it the width or the height that is causing the issue?  Can you give us an example of 1) the text causing the issue (with the field names you get it from) and 2) an example of the report format that will show us the error the text is causing?

With this information we might be able to help you out.  Let us know.
Avatar of rogerfg7
rogerfg7

ASKER

The report consists of a list of UK Carehome Group companies with a sub-detail list of Carehomes within each Group.

An address consists of a number of database fields concatenated using a comma and space into a single calculated 'FULL_ADDRESS' field which is then displayed in a TQRDBText field (have also tried TQRMemo field).  We have a master/ sub-detail report which has an address field in the master held in a TQRChildBand and also multiple records with addresses in the Sub-detail band.

The master record child band has just a TQRLabel, caption'Address' followed by a TQRDBText displaying the address.

The sub-detail band has a TQRDBText with the Name of the carehome and another TQRDBText on the same line displaying the number of beds in the home.  Underneath that is a TQRDBText field with the home address.  This will normally fit on one line, but occasionally spreads over 2 lines.
qrpLTCDirectory.bmp
Sorry, hit the return key and it submitted the comment.

Further information.  There are no carriage returns embedded within the calculated FULL_ADDRESS field.  We rely on word-wrap to wrap the text as required onto multiple lines.  However when the address prints over more than one line we want the whole address to be contained within a column and not split over separate columns / pages. Ideally within the subdetail band we would like the ORGANISATION / TOTALBeds and FULL_ADDRESS to be not split over a column.  As a further refinement, we would also like the UK postcode e.g. LE8 6JJ not to split over a line.  In MS Word we can have 'Keep lines together' and 'Keep with next' paragraph properties and hard (non-breaking) spaces.  We would like to have a similar facility within QuickReports
LTCDir.bmp
Ferruccio68

Your solution worked, with a bit of adjusting.  Many thanks.  Now, how do I award you the points?
Glad to have helped you.
Got the points, so you found this answer too :-)