Solved

Memo fields in QuickReport

Posted on 1997-10-21
6
1,333 Views
Last Modified: 2013-11-22
G'day,

The QuickReport Help files say that when you pass a Memo field to a qrdbText component, it stretches the detail band to accomodate all the lines of the memo.

I say this: Crap. It does not.

My problem is that the qrdbtext component will only show the first line of the memo when its autosize property is false, and only shows the first letter when autosize is set to true.

What in QuickReport would cause this if it is not supposed to happen? Has anyone had this problem before?

BadBart.
0
Comment
Question by:BadBart
6 Comments
 
LVL 1

Expert Comment

by:fsanchez
ID: 1348549
You need to set the AutoStretch property of the QRDBText to True (not the AutoSize). It is working for me (I am currently using the 2.0i version). If you are using an older version may be it won't work. You can download it from http://www.qusoft.no

Good luck
0
 
LVL 3

Expert Comment

by:Pegasus100397
ID: 1348550
BadBart,

I had this same problem awhile back (in Delphi 1.0). If your qrdbText component is truncating the # of lines try this in the BeforePrint() section of the band:

(First determine the # of lines in the memo, use a temp memo object or something to get a count, in this example Memo1)

qrdbText1.Height := Memo1.Lines * 12 {If each line is 12 units high}
If qrdbText.Height < 12 then qrdbText.height := 12 {if no lines,then default to "normal" height. }

This should take care of the growing/shrinking height problem of the band, just make sure the length of the field is enough to accomidate the longest line.

Hope this helps & good luck with your project :)
Pegasus



0
 

Author Comment

by:BadBart
ID: 1348551
When I change the height of the QRDBText component, it still does not display more than one line of the Memo. I tried setting the QRDBText height and the Band height at 100 during design time and it still won't diaplay the rest of the Memo.

Could it be something else?
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:BadBart
ID: 1348552
Sorry, but I think it's something else. Something to do with the data source it comes from, perhaps?

0
 

Author Comment

by:BadBart
ID: 1348553
I'm using QuickReport version 1, Delphi version 1, and paradox tables. I have noticed that the QRDBText fields used to display the entire memo in every QRDBText field there is in my project. But now they don't in any of them.

Is there some setting that makes paradox tables incompatible
with QuickReport, or something like that? What is going wrong?
0
 
LVL 1

Accepted Solution

by:
Zonnald earned 170 total points
ID: 1348554
I don't know about QRDBText fields but I find the QRMemo field works just fine - by setting the QRMemo field during the detail bands BeforePrint method as such :

QRMemo1.Lines.Clear;
QRMemo1.Lines.Add(tblBOFQ.fieldbyName('Description').AsString);
QRMemo1.Wordwrap := True;

Did this in D1 /QR1 and still works in D3/QR2.XX
Where the table field is a MEMO, everything works great.
I don't use autostretch or autosize because they may mess up the band and if the user needs it larger then I can easily update the report.

Is there any reason that you are using the QRDBText field (other than the obvious datalink that it gives you?).

Any how try this - good luck

Zonnald


0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 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