Thanks for your response,
I've done the stream position setting to 0 but the problem still occur.
I think there is a problem with the Export.Template.Save() method, I've notice that some times I catch the Exception below when trying to save the chart (ten file or stream) :
(translation from French, may be some some differences in real english message).
The 'TextContrast' property accessor on object 'System.Drawing.Graphics' has thrown a exception : 'invalid parameter'
à System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
à Steema.TeeChart.Export.TemplateExport.SerializeProperty(String Title, Object value, PropertyDescriptor i, SerializationInfo info)
à Steema.TeeChart.Export.TemplateExport.SerializeObject(String Prefix, Object value, SerializationInfo info)
à Steema.TeeChart.Export.TemplateExport.SerializeProperty(String Title, Object value, PropertyDescriptor i, SerializationInfo info)
à Steema.TeeChart.Export.TemplateExport.SerializeObject(String Prefix, Object value, SerializationInfo info)
à Steema.TeeChart.Export.TemplateExport.SerializeProperty(String Title, Object value, PropertyDescriptor i, SerializationInfo info)
à Steema.TeeChart.Export.TemplateExport.SerializeObject(String Prefix, Object value, SerializationInfo info)
à Steema.TeeChart.Export.TemplateExport.Serialize(SerializationInfo info, StreamingContext context)
à Steema.TeeChart.Chart.GetObjectData(SerializationInfo info, StreamingContext context)
à System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
à System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
à System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
à System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
à System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
à Steema.TeeChart.Export.TemplateExport.Serialize(Stream stream)
à Steema.TeeChart.Export.TemplateExport.Save(Stream stream)
à Steema.TeeChart.Export.TemplateExport.Save(String FileName)
May be it could be related to this post from Adrian
http://www.teechart.net/support/viewtop ... plate+save
Yann.