VCL2010 LoadChartFromStream Issue: "Wrong *.tee file format"
Posted: Mon Sep 20, 2010 5:29 pm
Hi,
I am using TeeChart Standard 9 and facing an issue with saving and loading charts from a TStream object. Upon loading from a TStream object using the LoadChartFromStream I get a runtime ChartException indicating "Wrong *.tee file format". Can someone help me figure out what's wrong in the code below?
Thanks,
Sajjad
I am using TeeChart Standard 9 and facing an issue with saving and loading charts from a TStream object. Upon loading from a TStream object using the LoadChartFromStream I get a runtime ChartException indicating "Wrong *.tee file format". Can someone help me figure out what's wrong in the code below?
Code: Select all
#include "export_chart_sample.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Chart"
#pragma link "Series"
#pragma link "TeEngine"
#pragma link "TeeProcs"
#pragma link "TeeStore"
#pragma link "TeeEdiSeri"
#pragma link "TeExport"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
TStringStream * myStream = new TStringStream();
SaveChartToStream(Chart1, myStream);
LoadChartFromStream(static_cast<Chart::TCustomChart*>(Chart1), myStream);
}
Sajjad