Fast Report s and Richview

General TRichView support forum. Please post your questions here
Post Reply
bobbygal

Fast Report s and Richview

Post by bobbygal »

Hi

Is it possibly to use Fast Reports to print the contents of memo fields created with Richview

Regards

Bobby Gallagher
Sergey Tkachenko
Site Admin
Posts: 17534
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Not yet. Planned for this Autumn
rowisoft
Posts: 3
Joined: Wed Apr 22, 2009 9:26 am

Post by rowisoft »

Hi,

Autumn 2005 is over :-)

Any news on this topic?

Regards,
Robert
Sergey Tkachenko
Site Admin
Posts: 17534
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Still no news, sorry.
MarcoWarm
Posts: 2
Joined: Fri Aug 05, 2011 5:04 am

Post by MarcoWarm »

Hello there,

it's been quite a time in this thread without any post :-D.

As long as there is no official support for FastReport just take the component that can be found here:

http://code.google.com/p/theunknownones ... chViewView

it is called TfrxRichViewView. We developed it for RichView V12 but it should work with the current version as well.

Regards
Marco
Sergey Tkachenko
Site Admin
Posts: 17534
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Thank you!
I'll test it when I complete a current work.
BvOsten
Posts: 9
Joined: Wed Mar 15, 2006 6:38 pm

Post by BvOsten »

MarcoWarm wrote: As long as there is no official support for FastReport just take the component that can be found here:

http://code.google.com/p/theunknownones ... chViewView

it is called TfrxRichViewView. We developed it for RichView V12 but it should work with the current version as well.

Regards
Marco
Marco, I just gave the component a try (with D7, Fastreport 4.9.123, TRichView 12.5.2).
Is the source on code.google.com really the latest, working version?
There is one compiler Error in it ( ms:=TCompressionStream.Create(Stream,zcMax); <- parameter wrong arrangement, zcmax is not defined; clmax?) and an unused variable ( tmpH: Integer;).
However, after fixing that the report designer is working but the preview shows nothing, giving exception errors of several kinds or EAccessViolation errors.
It would help me a lot to get a better Fastreport support for TRichview components.
erich_k4
Posts: 4
Joined: Fri Nov 25, 2005 12:15 pm

Post by erich_k4 »

Thank you Marco!! :D :D

your component is the long awaited (i'm sure i'm not the only one ;)) "missing link" between trichview and fastreport...

Here is a small demo project (http://www.kmedv.at/delphi/TRichView_Fa ... t_Demo.zip) if someone would like to give it a try.

I've tested it with Delphi XE, Fastreport 4.11.9, Trichview 13.1 and ufrxRichViewView.pas r859

Thank you again Marco, i hope that we will get an "official" version for TRichView soon (Sergey?)

Best Regards
Erich
erich_k4
Posts: 4
Joined: Fri Nov 25, 2005 12:15 pm

Post by erich_k4 »

Here is a component to install (Delphi XE):

http://www.kmedv.at/delphi/TfrxRichView.zip


Erich
BvOsten
Posts: 9
Joined: Wed Mar 15, 2006 6:38 pm

Post by BvOsten »

I'm still debugging on the FestReport with no success.
Environment:
Still D7, Fastreport 4.12, TRichview 13.7

The source still has a syntax error, as mentioned above.
I corrected it this was:

Code: Select all

procedure TfrxCustomRichViewView.WriteData(Stream: TStream);
var
  ms: TCompressionStream;
begin
  if (FMetaFile.Width > 0) and (FMetaFile.Height > 0) then
  begin
    ms := TCompressionStream.Create(clMax,Stream);
    FMetaFile.SaveToStream(ms);
    ms.Free;
  end;
end;
So the code has no syntax error any more; it does compile and the new Richview-Komponent is visible in the Designer and can be place.
But during preview or print, the component stays blank/empty. This happens either if it should be loaded with a file or a query field or with direct content.

Does anybody has successfully get this working with D7 and can share the source with us here?

Thanks
Bernd
MarcoWarm
Posts: 2
Joined: Fri Aug 05, 2011 5:04 am

Post by MarcoWarm »

Hi Bernd,

unfortunately I never tested the component with D7 since we don't have that here. As far as I see it it should not be a problem of your FR or TRichView version. Maybe you can put togehter a small demo project and send it to me. So I can see whether there is any other problem - or you try to compile the demo of erich_k4.

regards
Marco
BvOsten
Posts: 9
Joined: Wed Mar 15, 2006 6:38 pm

Post by BvOsten »

I'm still not any further with this issue. I'm trying to get the demo from erich_k4 running. But the "Show report" is failing with
" raise EDecompressionError.CreateRes(@sInvalidStreamOp);"
=> invalid Stream Operation.

Or is this simply related to the image stuff (gifimg, pngimg et cetera), which is present in XE2 but not in D7?

I also reduced the rvf file to a simple "test" text to be sure it's not a image processing issues, but no luck.

Does anybody reading here has a clue, how to get this Fast Report wrapper running with D7?
BvOsten
Posts: 9
Joined: Wed Mar 15, 2006 6:38 pm

Post by BvOsten »

I'm debugging on this for hours now. I can't get that demo from erich_k4 to work. So I'm working within my application to nail down the problem.
I managed to change some stuff so that data from the tables memo fields (contain the RTF text) is correctly transferred by a FReportHelper.RichView.LoadRTFFromStream (procedure TfrxCustomRichViewView.GetData).

But the Trichviewview fields on the report are still empty/blank.
Maybe someone can help me with that.

1.) What data is transfered through TfrxCustomRichViewView.DefineProperties?
My Debugger shows no data and nearly all variable are not available/visible (although $D+, l+, y+ are set)

2.) What is the purpose of FMetafile? How is it written and read?
This stays allways empty in my debugging. Maybe the procedures ReadData and Writedate should Read/Write into FMetafile, but the Stream argument in ReadData (which reads from Stream, decompresses it and writes into FMetafile) is always size=0. Therefore WriteData (which Reads from FMetafile and writes compressed into TStream) also stays empty.
3.) What should be the content of the Stream argument.

I assume: For a TRichviewview field the data is read from the database table by procedure GetData and the RTF/RVF blob is transferred to FReportHelper.RichView.
Then Trichview is drawing/rendering the RTF on the canvas, which is then stored in FMetafile in EMF/WMF Format. This Metafile is then stored in a compressed stream within Fastreport (through WriteData).
For the printing or preview process fastreport shovels the compressed streams of each field back by ReadData, which then displayed/printed directly from the EMF/WMF format.

4.) Is my above assumption about the data processing correct?
Post Reply