Page 1 of 1

problems with report template in xml

Posted: Wed Feb 03, 2010 9:03 am
by SK06
Hello,

I want to store any report templates (they have different report titles, colours, logos ...) in a database in xml format. It is no problem to rename the mrt-files to xml and to save it in my database. I am able to get my xml-files back from database in a DataSet witch fill it's content in a xml-file. BUT: The xml file from renamed mrt file is not valid. There are the characters ">" and "<". The xml file witch I get from my database is valid. There is ">" and "<". The mrt file from the valid xml file can not be opened by the Report Designer.

What's wrong?

Regards,
Sabine

problems with report template in xml

Posted: Wed Feb 03, 2010 2:58 pm
by Brendan
You can save your reports to a string or load them from a string.

Code: Select all

//Save Report as a string
StiReport myReport = new StiReport();
/* ... Load or design a report here ... */
string reportString = myReport.SaveToString();


//Load a Report from a string
StiReport myReport2 = new StiReport();
myReport.LoadFromString(reportString);