How To…Edit Templates as Text

Question

“How do I manually edit report templates stored in my database as text files?”

Solution

Stream the templates from thier BLOB field using the GetFieldAsStream routine of the DataPipeline.

Use the built-in Delphi routines ObjectBinaryToText and ObjectTextToBinary to load and save each template to and from text.

Once the template has been edited, use the SetFieldFromStream routine of the Datapipeline to write the template information back to the database.

See the example below on how this can be done

Download: EditTemplatesAsText.zip

Sample Delphi code: