problems with report template in xml

Stimulsoft Reports.NET discussion
Post Reply
SK06
Posts: 4
Joined: Wed Jan 27, 2010 5:28 am

problems with report template in xml

Post 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
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

problems with report template in xml

Post 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);
Post Reply