Board index » delphi » Quick Report 3.0 in Delphi 4 (TQRDBText) for Memo field Not show up in the report

Quick Report 3.0 in Delphi 4 (TQRDBText) for Memo field Not show up in the report

Hello everyone! I hope you are doing great lately.

I remember TQRDBText come with D3 will capture the Memo field in a table and
print
it in the report, but now it comes with D4, it does not print it any more. I
do not know why.

If anyone know how to make it work please let me know. Thanks inadvance.

Sincerely yours

Tin Le

This is what I did

Here is what it said in the help file of TQRDBText that I copied here.
"A data-aware version of the TQRLabel that prints the value of a database
field. Calculated fields and text field types can be printed, including
String fields, various numeric fields, date fields and memo fields. Text can
span multiple lines and pages. You connect the component to the data field
by setting the DataSource and DataField properties. Unlike regular
data-aware components, TQRDBText works even with dataset controls disabled
to improve speed"

 

Re:Quick Report 3.0 in Delphi 4 (TQRDBText) for Memo field Not show up in the report


Hi! This is me.
I found a way to work around with QR3.0 for the TQRBDBtext with memo field
is that
in the detail ban or whatever band on the Before print define a variable
(mmDC) type  string
and assign the memo field to this string than in the report put a quick
report label (QRLabel64) and
reassing the caption = to mmDC
for example:

procedure TfrmOccuReports.QRBand2BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
Var mmDC : String;
begin
  Screen.Cursor := crHourGlass;
  With dmOH.qryReports DO
    Begin
      If FieldByName('Type').AsString = 'SUR' Then
        lblrptHisType.Caption := 'Surveillance'
      Else If FieldByName('Type').AsString = 'IMM' Then
        lblrptHisType.Caption := 'Immunization'
      Else If FieldByName('Type').AsString = 'EXP' Then
        lblrptHisType.Caption := 'Exposure';
      mmDC := FieldByName('Detail_Comment').AsString;
      QRLabel64.Caption := mmDC;
    End;
  Screen.Cursor := crDefault;
end;

Hope this could help someone with D4 for QuickReport 3.00

Best Regards

Tin Le

Re:Quick Report 3.0 in Delphi 4 (TQRDBText) for Memo field Not show up in the report


Download the patch from QuSoft, and when have a QRDbText pointing at a memo
field make sure you have AutoStretch set to True.

Enjoy!

Quote
tin...@mhcs.org wrote:
> Hi! This is me.
> I found a way to work around with QR3.0 for the TQRBDBtext with memo field
> is that
> in the detail ban or whatever band on the Before print define a variable
> (mmDC) type  string
> and assign the memo field to this string than in the report put a quick
> report label (QRLabel64) and
> reassing the caption = to mmDC
> for example:

> procedure TfrmOccuReports.QRBand2BeforePrint(Sender: TQRCustomBand;
>   var PrintBand: Boolean);
> Var mmDC : String;
> begin
>   Screen.Cursor := crHourGlass;
>   With dmOH.qryReports DO
>     Begin
>       If FieldByName('Type').AsString = 'SUR' Then
>         lblrptHisType.Caption := 'Surveillance'
>       Else If FieldByName('Type').AsString = 'IMM' Then
>         lblrptHisType.Caption := 'Immunization'
>       Else If FieldByName('Type').AsString = 'EXP' Then
>         lblrptHisType.Caption := 'Exposure';
>       mmDC := FieldByName('Detail_Comment').AsString;
>       QRLabel64.Caption := mmDC;
>     End;
>   Screen.Cursor := crDefault;
> end;

> Hope this could help someone with D4 for QuickReport 3.00

> Best Regards

> Tin Le

Other Threads