Board index » delphi » Can't view a Formated Memo (RTF) Field in ReportSmith ... HELP PLEASE!!

Can't view a Formated Memo (RTF) Field in ReportSmith ... HELP PLEASE!!

I just can't get ReportSmith to show the contents of a Formatted memo
field. I can get it to show a standard memo field, just by including the
field in the report, but when I use a formatted memo, it leaves the field
blank in the report.
This is a major problem, as I need to create reports that contain formatted
memos (Paradox) pleeeeeeese help!!!
Thanks
Adrian

 

Re:Can't view a Formated Memo (RTF) Field in ReportSmith ... HELP PLEASE!!


Quote
"ADRIAN WREYFORD" <wreyf...@icon.co.za> wrote:
>I just can't get ReportSmith to show the contents of a Formatted memo
>field. I can get it to show a standard memo field, just by including the
>field in the report, but when I use a formatted memo, it leaves the field
>blank in the report.
>This is a major problem, as I need to create reports that contain formatted
>memos (Paradox) pleeeeeeese help!!!
>Thanks
>Adrian

Paradox Formatted memos are not RTF ! I've setup a solution
to display them in data-aware components, but you're on your own with
RS.

Just to give you an idea, for forms, I setup a basic solution, for which
the source is given hereunder.

The idea is to define a calculated String field for the Query or
Database used. Say be call it FMT in a table TBL, so its object name
will be TBLFMT. In the OnGetText event for the field, add this code:

{ This is the header created by Delphi }
procedure TForm1.TBLFMTGetText(Sender: TField; var Text: OpenString;
  DisplayText: Boolean);

var     s       : TMemoryStream ;
        cs      : PChar ;

begin
s := TMemoryStream.Create ;
TBLChamp2.SaveToStream (s) ;
cs := s.Memory ;
Text := StrPas (cs + 44) ;
s.Clear ;
end;

And that's all there is to it: your TBLFMT can now be used in any DB
control and display in ASCII form the contents of your Paradox formated
field.

One glitch that I noticed, however: collating sequences are not taken
into account, so, depending of the collating sequence actually used in
your application, you may not see non-ASCII characters properly. Just
add a transliteration step if this is a problem.

If anyone uses this, has comments or a better idea, please write me
about it at f...@soon.com

-------------------------
   Frederic G. MARAND
  Agorus SA / OSI SARL
      f...@soon.com
-------------------------

Re:Can't view a Formated Memo (RTF) Field in ReportSmith ... HELP PLEASE!!


I would like to intercept the datachange message that gets sent
to a datasource one one form and prevent it from seeing changes, while a
user prints out the database using a datasource on another form.

That way the user will not see the print components iterating through
the database, and at the same time the data will not disappear from the
screen.

 I don't believe the TTable.DisableControls command is what I want since
the reports themselves use a datasource.

-Rob

Re:Can't view a Formated Memo (RTF) Field in ReportSmith ... HELP PLEASE!!


Try  (Delphi 1... maybe Delphi 2?)

LockWindowUpdates(form1.handle);   {turn off form updates}
 do your stuff;
LockWindowUpdates(0);  {turn 'em back on}

Quote
R wrote:

> I would like to intercept the datachange message that gets sent
> to a datasource one one form and prevent it from seeing changes, while a
> user prints out the database using a datasource on another form.

> That way the user will not see the print components iterating through
> the database, and at the same time the data will not disappear from the
> screen.

>  I don't believe the TTable.DisableControls command is what I want since
> the reports themselves use a datasource.

> -Rob

Other Threads