Page 1 of 1
Export Template
Posted: Sun May 22, 2011 10:34 am
by 15658604
Hi,
i am using
frm.TChart1.Export.Template.IncludeData = True
frm.TChart1.Export.Template.Save(File)
to export my Charts, but when i try to load it back with
frm.TChart1.Import.Template.Load(File)
only the series are displayed, but no Data is there?
during the Export i give the File not an ten extension....
Thanks
Re: Export Template
Posted: Mon May 23, 2011 11:09 am
by 10050769
Hello AGF,
Using next code I couldn't reproduce your problem and last version of TeeChart.Net:
Code: Select all
Steema.TeeChart.Styles.Line line1, line2;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart2.Aspect.View3D = false;
line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line2 = new Steema.TeeChart.Styles.Line(tChart2.Chart);
line1.FillSampleValues();
line2.FillSampleValues();
tChart1.Dock = DockStyle.Top;
tChart2.Dock = DockStyle.Bottom;
tChart1.Export.Template.Save("C:\\tmp\\file1.ten");
}
private void button1_Click(object sender, EventArgs e)
{
tChart2.Import.Template.Load("C:\\tmp\\file1.ten");
}
Could you check if you can reproduce your problem using previous code? If your problem doesn't appear in previous code, please, try to arrange a simple project because we can reproduce exactly your problem here.
On the other hand, you can tell us which version of TeeChart.Net are you using now?
Thanks
Re: Export Template
Posted: Mon May 23, 2011 8:10 pm
by 15658604
Dear Sandra,
i could not use these code, because i have only an vb.net devenv.
i am using teechart net 2010
i have have checked the export again - the series are included but no values inside the series List!
Thanks
Re: Export Template
Posted: Tue May 24, 2011 11:08 am
by 10050769
Hello AGF,
I think you can help you translate C# to VB.NET code and viceversa you can use one those tools:
http://carlosag.net/Tools/CodeTranslator/Default.aspx
http://www.developerfusion.com/tools/co ... arp-to-vb/
Please, try to convert my code and modified it or send us a simple project,so we can reproduce your problem here. On the other hand, tell us which version you can use, exactly for example:
Last version of TeeChart.Net
Build 4.1.2011.04193
Thanks,
Re: Export Template
Posted: Thu May 26, 2011 3:23 pm
by 15658604
Dear Sandra
=======================================
Release Notes 8th February 2011
TeeChart.NET version 2011
Build 4.0.2011.02083
Compiled in .NET Framework 4.0
Build 4.0.2011.02082
Compiled for Visual Studio 2008
Build 4.0.2011.02081
Compiled in .NET Framework 2.0
Build 4.0.2011.02080
Compiled in .NET Framework 1.0
=======================================
Thanks
Re: Export Template
Posted: Fri May 27, 2011 7:49 am
by 10050769
Hello ARG,
Thanks for your information. Please, update your version of TeeChart.Net that you can find in
customer download page and try again my code and check if the problem persist.
Thanks,
Re: Export Template
Posted: Fri May 27, 2011 5:56 pm
by 15658604
Dear Sandra,
it is the same like before! I add some series and save them to an template file with the code i send you.
the (file) comes from an SaveFileDialog an i have tested the *ten and my custom extention with no success.
when i use the TEditor component for Export and Import it works well!
Thanks
Re: Export Template
Posted: Mon May 30, 2011 7:33 am
by 10050769
Hello AGF,
Can you please, send us a simple project we run as-is here, so we can reproduce exactly, your problem?
Thanks,
Re: Export Template
Posted: Wed Jun 01, 2011 4:33 am
by 15658604
Dear Sandra,
it is not possible to make an simple example,because i use teechart inside of an complex framework. If you provide me an email adress from to my accout e mail, i can give you more informations about that .....
Thanks
Re: Export Template
Posted: Wed Jun 01, 2011 7:56 am
by yeray
Hello,
You could explain private details mailing to "info at steema dot com" referencing this thread.
If you want to send us private files, you could use our
upload page.
Re: Export Template
Posted: Wed Jun 01, 2011 9:44 am
by yeray
Hello,
I understand that the framework you use makes it difficult for you to arrange a simple example project isolated from that framework.
However, it's difficult for us too to analyze the problem without being able to debug it, etc.
From what you said in a previous message, using a TEditor component works fine while using a SaveFileDialog doesn't, isn't it?
I'd debug it to see the exact difference between both behaviors. Doesn't SaveFileDialog give you the same string than the TEditor? Why?
Re: Export Template
Posted: Sat Jun 04, 2011 11:31 am
by 15658604
Dear Yeray
during our work arround Import and Export we have received these error
System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Steema.TeeChart.Import.Imports.InternalFindType(String typeName, Assembly a)
bei Steema.TeeChart.Import.Imports.FindType(String typeName)
bei Steema.TeeChart.Import.Imports.DeserializeFrom(SerializationInfo info, StreamingContext context)
bei Steema.TeeChart.Chart..ctor(SerializationInfo info, StreamingContext context)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
bei System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
bei System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
bei System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
bei System.Runtime.Serialization.ObjectManager.DoFixups()
bei System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
bei System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
bei Steema.TeeChart.Import.TemplateImport.Load(Stream stream)
bei Steema.TeeChart.Import.TemplateImport.Load(String fileName)
bei....Cvo_DecrypteFile(String File, String Typ) in C:\Users\....\Documents\Visual Studio 2008\Projects\......\....Pane1.vb:Zeile 467.;
The error occurs during the import of an exported file...
Do have idea's to handle that?
Thanks
Re: Export Template
Posted: Mon Jun 06, 2011 8:14 am
by yeray
Hello,
It sounds like if you were using some series or tool that is exported correctly but fails when trying to be imported.
Could you please send us the .ten file that is failing when trying to be imported? I see you mentioned you've customized the exportation. Is the problem also occurring when exporting&importing using unmodified TeeChart routines?
Re: Export Template
Posted: Tue Jun 07, 2011 5:09 am
by 15658604
Dear Yeray,
i am not sure. When i use the methods from the teeEditor it works, when i try it with code it does not.
I have attached some examples...
Re: Export Template
Posted: Tue Jun 07, 2011 10:07 am
by yeray
Hello,
I've been testing your .ten and .cvo files. I could load all them without problems with the code below except for one: test3.ten
Code: Select all
tChart1.Import.Template.Load(fileName);
The test3.ten file seems to have 2 series and fails when trying to load the first one because for some reason the SeriesCollection is empty.
It would be helpful if you could give us more information about the chart that generated this ten file. What series types are in it? Is it possible for you to send us the code used to create and format the chart?
Thanks in advance.