Rave Report 7.7 - Delphi 2010 and the TStrings

Hi

I am trying to print the content of a TStringlist into a MemoField of Rave Report 7.7 (RR77). This should normally be a triavial operation but I can`t get it to work correctly under D2010. The application perfectly compile and run under D2007 (which is non-unicode and that is probably explaining why it works correctly). 

It`s only under D2010 that it`s not working at all (I get random chars and "?" printed into the report fields).

Here is the code I use to write a TStringlist content into a RR77 MemoField. This proc is called within RvConnection.OnGetRow event for each Memo fields I need to write to:

procedure TDistributorManifest.DistManifestCXNGetRow(Connection: TRvCustomConnection);
begin
  inherited;
  with Connection do
  begin
    WriteStrData('', ClientName);                                 //String
    ....

  -->  StringsToBlobData(DistributorInfos, Connection);    //TStringlist 
    ....
  end;
end;

procedure TRepBase.StringsToBlobData(AStrings: TStrings; CNX: TRvCustomConnection);
var
  MS: TMemoryStream;
begin
  MS := TStringStream.Create;
  try
    AStrings.SaveToStream(MS);
    MS.Position := 0;
    CNX.WriteBlobData(MS.Memory^, MS.Size);
  finally
    MS.Free;
  end;
end;

Suppose to be easy enough no? 
Well, even if  I try to send a string created on the fly, it's not working:

procedure TRepBase.StringsToBlobData(AStrings: TStrings; CNX: TRvCustomConnection);
var
  S: AnsiString;
begin
  S := 'This is a string test.';
  CNX.WriteBlobData(AnsiString(S), Length(S));
end;


I read few articles about the fact that RR77 is not Unicode ready. If this is the case, is there any work-around or alternate solution that I could use to get this this up and running again (besides stepping back to D2007)?

Any help would be greatly appreciated.

Thanks,
 Guy
0
Guy
12/22/2009 8:05:48 PM
embarcadero.delphi.reporting 487 articles. 0 followers. Follow

10 Replies
1111 Views

Similar Articles

[PageSpeed] 3

Have you talked to the Rave developers? Try www.nevrona.com

George
 
> I am trying to print the content of a TStringlist into a MemoField of Rave Report 7.7 (RR77). This should normally be a triavial operation but I can`t get it to work correctly under D2010. The application perfectly compile and run under D2007 (which is non-unicode and that is probably explaining why it works correctly). 
> 
> It`s only under D2010 that it`s not working at all (I get random chars and "?" printed into the report fields).
> 
> Here is the code I use to write a TStringlist content into a RR77 MemoField. This proc is called within RvConnection.OnGetRow event for each Memo fields I need to write to:
> 
> procedure TDistributorManifest.DistManifestCXNGetRow(Connection: TRvCustomConnection);
> begin
>   inherited;
>   with Connection do
>   begin
>     WriteStrData('', ClientName);                                 //String
>     ....
> 
>   -->  StringsToBlobData(DistributorInfos, Connection);    //TStringlist 
>     ....
>   end;
> end;
> 
> procedure TRepBase.StringsToBlobData(AStrings: TStrings; CNX: TRvCustomConnection);
> var
>   MS: TMemoryStream;
> begin
>   MS := TStringStream.Create;
>   try
>     AStrings.SaveToStream(MS);
>     MS.Position := 0;
>     CNX.WriteBlobData(MS.Memory^, MS.Size);
>   finally
>     MS.Free;
>   end;
> end;
> 
> Suppose to be easy enough no? 
> Well, even if  I try to send a string created on the fly, it's not working:
> 
> procedure TRepBase.StringsToBlobData(AStrings: TStrings; CNX: TRvCustomConnection);
> var
>   S: AnsiString;
> begin
>   S := 'This is a string test.';
>   CNX.WriteBlobData(AnsiString(S), Length(S));
> end;
> 
> 
> I read few articles about the fact that RR77 is not Unicode ready. If this is the case, is there any work-around or alternate solution that I could use to get this this up and running again (besides stepping back to D2007)?
> 
> Any help would be greatly appreciated.
> 
> Thanks,
>  Guy
0
George
12/24/2009 6:10:34 PM
No I haven't - it seems useless.

They are writing on the web site (on the one out of few pages that have something on it...) that they provide support only for BEX users,  those who bought Rave from them (and I am using the BE - the version bundled with D2010). They mention we must address questions throught Embarcadero. 

http://www.nevrona.com/Products/BEUpgradeInformation/tabid/76/Default.aspx


Maybe somebody from Nevrona and or Embarcadero will catch this thread and will be willing to test and answer...

Meanwhile, I am seriously looking at FastReport 4, which appears to me like a great product. Since I will have to burn few hundred dollars on a report engine, I'd rather do it on something that worth it.

thanks anyway for your reply.

Guy.

> {quote:title=George Winkler wrote:}{quote}
> Have you talked to the Rave developers? Try www.nevrona.com
> 
> George
>  
> > I am trying to print the content of a TStringlist into a MemoField of Rave Report 7.7 (RR77). This should normally be a triavial operation but I can`t get it to work correctly under D2010. The application perfectly compile and run under D2007 (which is non-unicode and that is probably explaining why it works correctly). 
> > 
> > It`s only under D2010 that it`s not working at all (I get random chars and "?" printed into the report fields).
> > 
> > Here is the code I use to write a TStringlist content into a RR77 MemoField. This proc is called within RvConnection.OnGetRow event for each Memo fields I need to write to:
> > 
> > procedure TDistributorManifest.DistManifestCXNGetRow(Connection: TRvCustomConnection);
> > begin
> >   inherited;
> >   with Connection do
> >   begin
> >     WriteStrData('', ClientName);                                 //String
> >     ....
> > 
> >   -->  StringsToBlobData(DistributorInfos, Connection);    //TStringlist 
> >     ....
> >   end;
> > end;
> > 
> > procedure TRepBase.StringsToBlobData(AStrings: TStrings; CNX: TRvCustomConnection);
> > var
> >   MS: TMemoryStream;
> > begin
> >   MS := TStringStream.Create;
> >   try
> >     AStrings.SaveToStream(MS);
> >     MS.Position := 0;
> >     CNX.WriteBlobData(MS.Memory^, MS.Size);
> >   finally
> >     MS.Free;
> >   end;
> > end;
> > 
> > Suppose to be easy enough no? 
> > Well, even if  I try to send a string created on the fly, it's not working:
> > 
> > procedure TRepBase.StringsToBlobData(AStrings: TStrings; CNX: TRvCustomConnection);
> > var
> >   S: AnsiString;
> > begin
> >   S := 'This is a string test.';
> >   CNX.WriteBlobData(AnsiString(S), Length(S));
> > end;
> > 
> > 
> > I read few articles about the fact that RR77 is not Unicode ready. If this is the case, is there any work-around or alternate solution that I could use to get this this up and running again (besides stepping back to D2007)?
> > 
> > Any help would be greatly appreciated.
> > 
> > Thanks,
> >  Guy
0
Guy
12/24/2009 8:18:18 PM
<Guy Roberge> wrote

> ... Since I will have to burn few hundred dollars on a report engine, ....

Spending them for Rave would in fact be like burning them, spending them for 
QR will give you a valid report engine ... It's the right way. Go on.

Regards,

Klaus
0
Klaus
12/27/2009 5:03:44 PM
Hi Klaus,

Thanks for your answer.

Do you mean QuickReport ?

Do you have any comments/recommandations on FastReport 4?

Regards,

Guy

> {quote:title=Klaus Edelmann wrote:}{quote}
> <Guy Roberge> wrote
> 
> > ... Since I will have to burn few hundred dollars on a report engine, ....
> 
> Spending them for Rave would in fact be like burning them, spending them for 
> QR will give you a valid report engine ... It's the right way. Go on.
> 
> Regards,
> 
> Klaus
0
Guy
12/27/2009 10:03:21 PM
I've been using Rave since Version 1 and have always used the RVSystem component because I can print anything anywhere. I have D2009 and there is Rave 8 which is compatible. I does work. Yeah, it cost me $$ but I can print what I want.

George

> {quote:title=Guy Roberge wrote:}{quote}
> Hi Klaus,
> 
> Thanks for your answer.
> 
> Do you mean QuickReport ?
> 
> Do you have any comments/recommandations on FastReport 4?
> 
> Regards,
> 
> Guy
> 
> > {quote:title=Klaus Edelmann wrote:}{quote}
> > <Guy Roberge> wrote
> > 
> > > ... Since I will have to burn few hundred dollars on a report engine, ....
> > 
> > Spending them for Rave would in fact be like burning them, spending them for 
> > QR will give you a valid report engine ... It's the right way. Go on.
> > 
> > Regards,
> > 
> > Klaus
0
George
12/28/2009 4:23:17 PM
In article <197714@forums.codegear.com>, George Winkler wrote:
> I've been using Rave since Version 1 and have always used the RVSystem component because I can print anything anywhere. I have D2009 and there is Rave 8 which is compatible. I does work. Yeah, it cost me $$ but I can print what I want.

How did you get Rave 8? I paid for it 18 months ago and have heard nothing since.

Andrew
0
Andrew
12/31/2009 7:39:22 AM
> {quote:title=Andrew Sowerby wrote:}{quote}
> In article <197714@forums.codegear.com>, George Winkler wrote:
> > I've been using Rave since Version 1 and have always used the RVSystem component because I can print anything anywhere. I have D2009 and there is Rave 8 which is compatible. I does work. Yeah, it cost me $$ but I can print what I want.
> 
> How did you get Rave 8? I paid for it 18 months ago and have heard nothing since.
> 
> Andrew

I got Rave 8.0 Beta from Nevrona. It has problems and now it appears they are gone. BUMMER. I have used it since V1 and have always been able to print anything. This really stinks.

George
0
George
1/5/2010 7:56:47 PM
George

I am using RvSystem as well to send the data to the report.

If I can ask, how do you print a TStringlist content to a RvMemo under D2010? Do you have an example that I can try?

Like I said, the code I use (through a MemoryStream object - see "StringToBlobData" in my first post in this thread) works correctly under D2007. It's only in D2010 that I experienced problems with the same code.

Many thanks,

Guy


> {quote:title=George Winkler wrote:}{quote}
> > {quote:title=Andrew Sowerby wrote:}{quote}
> > In article <197714@forums.codegear.com>, George Winkler wrote:
> > > I've been using Rave since Version 1 and have always used the RVSystem component because I can print anything anywhere. I have D2009 and there is Rave 8 which is compatible. I does work. Yeah, it cost me $$ but I can print what I want.
> > 
> > How did you get Rave 8? I paid for it 18 months ago and have heard nothing since.
> > 
> > Andrew
> 
> I got Rave 8.0 Beta from Nevrona. It has problems and now it appears they are gone. BUMMER. I have used it since V1 and have always been able to print anything. This really stinks.
> 
> George
0
Guy
1/8/2010 3:52:44 AM
For those who were interested into the problem exposed in this thread, just want to share what I did to fix the problem and why.

Short and straightfoward answer: I bought FastReport 4 Enteprise edition and got rid of RAVE - forever.

I must mention: Even if it looks like an extreme move (and it is indeed), the sum of time and efforts required to learn (first) and rebuild all my reports under FR4 appeared to me quiet less than the pain in the neck and trouble that I have been going through with Rave to achieve the same exact result, since day one. 

Although I have always been able to go around and find a way to do what I need to do with Rave over the years (except this last time), I never really liked it.

With my very short experience of FR4, I must say it appears to me like a very good and mature product, well built, well documented, and easy to learn (this is a personnal opinion). Plus, when you dig into discussion forums, you see here and there FR4 personal interjecting into discussions, answering users and trying to help (well... sometime they promote there own product but I suppose this an acceptable commercial behaviour...).

This conforts me into the decision I made and I am quit confident that, in the event I encounter difficulties, these guys will be there to help me. Future will tell.

So many thanks to those of you who have tried to help me - much appreciated.

Sincerly,
Guy

(FLS: I am not under contract in any way with FR, nor I have any link or interests into this company. I am just expressing a personal opinion).
0
Guy
1/20/2010 2:51:59 AM
Guy,

the following works for me:

procedure TRepBase.StringsToBlobData(AStrings: TStrings; CNX: 
TRvCustomConnection);
var
    MS: TMemoryStream;
begin
    MS := TStringStream.Create;
    try
      //Rave 7.7 expects Unicode:
      AStrings.SaveToStream(MS, TEncoding.Unicode);
      MS.Position := 0;
      CNX.WriteBlobData(MS.Memory^, MS.Size);
    finally
      MS.Free;
    end;
end;

Regards

Lars
0
Lars
4/28/2010 10:40:41 AM
Reply: