Quick Report Question 
Author Message
 Quick Report Question

Hi,

I am trying to printout a DBMemo field on a QuickReport (Delphi 4.0).  The
documentation that I have says you can use a QRDBtext for the DBMemo field.  I
tried this and nothing prints.  I tried a QRDBRichText and get Application
Error.  Can somebody shed some light.

thanks,
tony



Wed, 18 Jun 1902 08:00:00 GMT  
 Quick Report Question

Quote:
>Hi,

>I am trying to printout a DBMemo field on a QuickReport (Delphi 4.0).  The
>documentation that I have says you can use a QRDBtext for the DBMemo field.  I
>tried this and nothing prints.  I tried a QRDBRichText and get Application
>Error.  Can somebody shed some light.

>thanks,
>tony

Tony,
You have to convert the memo field into strings that QR can handle.
This is what I use:

I declare this in datamodule DC for use by all the different report
forms used in my app:

var mstream: TMemoryStream;

procedure TDC.LoadMemo(var fromx: TMemoField; var tox: TQRmemo);
// used for printing memo fields in QR
begin
  try
    mstream.clear;
    fromx.savetostream(mstream);
    mstream.position := 0;
    tox.lines.loadfromstream(mstream);
  except
  end;
end;

Then, in the report form, I have a query to get the info to print. The
query is qCCR, in this case, and has a memo field 'Summary'. I the
beforeprint event for the band where the TQRmemo object is placed, put
the following line:

    loadmemo(qCCRsummary, mSummary);

[qCCRsummary is the TMemoField, fromx, and mSummary is the name of the
TQRmemo object on the report form]

HTH,
Dan
--
Dan Brennand
CMDC systems, inc.
Configuration Management and Document Control: Consulting, Software,
and the only comprehesive textbook on this subject.
visit us at www.cmdcsystems.com
[Remove the SPAM from my e-mail address]



Wed, 18 Jun 1902 08:00:00 GMT  
 Quick Report Question
There were once(?) a bug that stopped printing when you had empty strings in the
Memo.  The solution was to put a non-printable character into those lines.

Aage J.

Quote:

> Hi,

> I am trying to printout a DBMemo field on a QuickReport (Delphi 4.0).  The
> documentation that I have says you can use a QRDBtext for the DBMemo field.  I
> tried this and nothing prints.  I tried a QRDBRichText and get Application
> Error.  Can somebody shed some light.

> thanks,
> tony



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Quick Report Question

2. Quick Reports Question

3. Quick Report Question : Group by a certain field?

4. Quick Report Question

5. quick reports quick questions!

6. Quick Reports Composite report Delphi 7 question

7. Question regarding Quick Report and runtime packages

8. Quick Report or TQuery calculation question

9. Quick Reports and SQL question

10. Quick report group probs and questions

11. Quick Report form design question

12. Crystal Report, Quick Report - where to get ?

 

 
Powered by phpBB® Forum Software