Export / Import a form to edit with notepad
Hi I would like to edit a form in ASCII
I tried several methods using ObjectBinaryToText etc.
But this fails. I can convert the binary content to ascii and back to a
binary format
but this new file is not opened correctly by reportbuilder
Then I tried to use TppTemplate
(lvRepDataset.FieldByName('TEMPLATE') as
TBlobField).SaveToStream(lvMemoryStream);
lvTemplate := TppTemplate.Create(Self);
try
lvtemplate.Format := ftBinary;
lvMemoryStream.Position := 0;
lvtemplate.LoadFromStream(lvMemoryStream);
lvtemplate.FileName := 'c:\testout.txt';
lvtemplate.Format := ftASCII;
lvtemplate.SaveToStream(lvMemoryStream);
finally
lvtemplate.Free;
end;
But I'm getting and AV in loadfromstream?
What is the correct procedure to be able to edit the form in ascii and put
it back in?
Best whishes
Ebo Dieben
I tried several methods using ObjectBinaryToText etc.
But this fails. I can convert the binary content to ascii and back to a
binary format
but this new file is not opened correctly by reportbuilder
Then I tried to use TppTemplate
(lvRepDataset.FieldByName('TEMPLATE') as
TBlobField).SaveToStream(lvMemoryStream);
lvTemplate := TppTemplate.Create(Self);
try
lvtemplate.Format := ftBinary;
lvMemoryStream.Position := 0;
lvtemplate.LoadFromStream(lvMemoryStream);
lvtemplate.FileName := 'c:\testout.txt';
lvtemplate.Format := ftASCII;
lvtemplate.SaveToStream(lvMemoryStream);
finally
lvtemplate.Free;
end;
But I'm getting and AV in loadfromstream?
What is the correct procedure to be able to edit the form in ascii and put
it back in?
Best whishes
Ebo Dieben
This discussion has been closed.
Comments
An example of editing report templates stored in a database as text can be
downloaded from...
http://www.digital-metaphors.com/tips/EditTemplatesAsText.zip
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com