In case you are getting this error this is how I solved it.
First do not use the StoreInDFM property, it appears to not be supported yet.
Store the report file in a resource file and add the resource file to the unit. Then load the file like this procedure TForm1.Button1Click(Sender: TObject);
var
ReportSL : TStringStream;
begin
ReportSL:=TStringStream.Create(LazarusResources.Find('codigos').Value);
try
frReport1.LoadFromXMLStream(ReportSL);
finally
ReportSL.Free;
end;
frReport1.PrepareReport;
frReport1.ShowReport;
end;
initialization
{$I 'codigos.lrs}
end.
I added the include resource statement to the example. The important difference is to use LoadFromXMLStream, instead of the more intuitive LoadFromStream, because LoadFromXMLStream seems to initialize some critically needed internal variables of the report object.