Solved

Memo fields in QuickReport

Posted on 1997-10-21
6
1,312 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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