Hello,
When I serialize a report template, I serialize it as part of a larger object that contains additional serializable objects. (Some of my classes implement IXmlSerializable) Currently, my class stores the serialized template as a string. But this results in ugly and difficult-to-read XML for the section that contains the template string:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<StiSerializer version="1.0" application="StiReport">
<Dictionary Ref="1" type="Dictionary" isKey="true">
</Dictionary>...
...</StiSerializer>
Do you have any suggestions? Is there a field in StiReport in which I may store my own serializable objects?
Thanks,
Spruce
custom serialization
custom serialization
I have seen only one way:
You can create class derived from StiReport.
after then you need assign type of your report to static property of StiReport:
after then report designer will be use your type of report.
Thanks.
You can create class derived from StiReport.
Code: Select all
public MyReport : StiReport
{
private string myProp = string.Empty;
[StiSerializable]
[DefaultValue(string.Empty)]
[Browsable(false)]
public string MyProp
{
get
{
return myProp ;
}
set
{
myProp = value;
}
}
Code: Select all
StiReport.ReportType = typeof(MyReport);
Thanks.
custom serialization
That tip was helpful, thanks.
Will StiSerializer work on a complex object that implements IXmlSerializable?
Will StiSerializer work on a complex object that implements IXmlSerializable?
custom serialization
Sorry, StiSerializer does not support IXmlSerializable.
Thanks.
Thanks.