Help - Search - Members - Calendar
Full Version: Problem with LoadFromSteram .. help
Fast Reports forum > Fast Reports Products > FastReport 4.0
Efren2005
I charged at a table in my DB on a BLOB field that the XML report before it was saved with ... SaveToStream, the problem is that when using Reporte.LoadFromStream (VarStream) does not call the file properly, will be a BUG Version FR 4.7.5?

I check the following;
-Writes perfectly into the BLOB field

function that calls the Report:

CODE
Function TDataImpresion.BusFormato:Boolean;
Var
Campo:TStream;
begin
  Archivo:='';
  Campo:=nil;
  Result:=False;
  Try
  FormaReporte.Open;
  FormaReporte.First;
  if FormaReporte.Reccoercount>0 Then
      Campo := FormaReporte.CreateBlobStream(FormaReporte.FieldByName('DISENO'), bmRead)
  if Campo.Size<>0 then
     Begin
     Campo.Position := 0;
     Reporte.Clear;
     Reporte.LoadFromStream(Campo);
     Reporte.ReportOptions.Description.Add(ReportesNOMBREPO.Value);
     Result:=True;
     end;
  Finally
     Campo.Free;
     FormaReporte.Close;
  End;
end;
gordk
To save:
stream := TMemoryStream.Create;
TfrxReport.SaveToStream(stream);
stream.Position := 0;
(dataset.fieldByName('my_blob') as TBlobField).LoadFromStream(stream);

To load:
stream := TMemoryStream.Create;
(dataset.fieldByName('my_blob') as TBlobField).SaveToStream(stream);
stream.Position := 0;
TfrxReport.LoadFromStream(stream);
Efren2005
QUOTE(gordk @ Mar 10 2010, 06:41 AM) *
To save:
stream := TMemoryStream.Create;
TfrxReport.SaveToStream(stream);
stream.Position := 0;
(dataset.fieldByName('my_blob') as TBlobField).LoadFromStream(stream);

To load:
stream := TMemoryStream.Create;
(dataset.fieldByName('my_blob') as TBlobField).SaveToStream(stream);
stream.Position := 0;
TfrxReport.LoadFromStream(stream);


Friend gordk

This test and perform and still have the problem, apparently for what I think is when recording in the BLOB field, changes when you call something that is not the same .. could be the way they think the BLOB field in the table .. What would be the way correct?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.