Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.
We thank you for choosing Syncfusion� and appreciate your understanding.
Export Report as XLS
You can export the report to XPS by using the fixed document of the rendered report. ReportViewer has “GetFixedDocument()” that returns the FixedDocument format, it can be given as input to the XPS document generator as shown in below code sample.
|
var package = Package.Open(dlg.FileName, FileMode.Create); var xpsDoc = new XpsDocument(package, CompressionOption.Normal); XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(xpsDoc);
// xps documents are built using fixed document sequences var fixedDocSeq = new FixedDocumentSequence(); var docRef = new DocumentReference(); docRef.BeginInit(); docRef.SetDocument(reportViewerControl.GetFixedDocument()); docRef.EndInit(); ((IAddChild)fixedDocSeq).AddChild(docRef);
// write out our fixed document to xps xpsWriter.Write(fixedDocSeq.DocumentPaginator);
xpsDoc.Close(); package.Close(); |
Also we have prepared a sample based on this and it can downloaded from the below link.
http://www.syncfusion.com/downloads/support/directtrac/123606/REPORT~1-1124290928.ZIP
Regards,
Vinoth.S
Thanks for your update.
Please let us know if you need any further assistance.
Regards,
Vinoth.S
- 4 Replies
- 2 Participants
-
MF Michael Faisst
- Apr 3, 2016 06:02 PM UTC
- Apr 6, 2016 04:20 AM UTC