Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Web Report Designer - How to open a report with an untyped DataSet as a data source

$
0
0
Currently, strongly typed DataSets are serialized, while untyped are not. 

Obviously, this behavior produces incorrect results if you save/load a report layout to/from XML.

Since the Web Report Designer works with the XML report representation, incorrect results may be also produced when loading a report which an untyped data set as a data source.

To resolve this, we need to serialize an untyped data source.
To do so, implement a custom serializer which implements the DevExpress.XtraReports.Native.IDataSerializer interface and use the XML-serialization capabilities exposed by the DataSet class to serialize/deserialize this data set as follows. 

In the IDataSerializer.Serialize method, serialize a DataSet into XML through the DataSet.WriteXml (or DataSet.GetXml) method.
In the IDataSerializer.Deserialize method, create a new DataSet instance and populate it from a properly formatted XML stream by using the DataSet.ReadXml method.

Viewing all articles
Browse latest Browse all 7205

Trending Articles