How to Get .rsd File in Silverlight Application

A Silverlight application does not provide user access to a report document file (.rsd). This file is rendered on the server side. Then the document is exported to XAML and the results are sent to client's Silverlight Viewer.

However, sometimes you may need to get a .rsd file. For example if an error occurs and you want to troubleshoot it or send a document to our technical support (they usually need this file to detect the cause of the issue).

To get the .rsd document you need to make some changes in the server-side code.

Just override the RenderCore method in the ReportService class (this class may have another name but it should be a subclass of the ReportServiceBase) This method should look like the code below:

protected override PerpetuumSoft.Reporting.DOM.Document     RenderCore(System.Collections.Generic.IDictionary<string, object> parameters,
           string reportName)
{
    Document doc = base.RenderCore(parameters, reportName);
    XSerializationManager.Write(doc,
                   string.Format((@"c:\temp\{0}.rsd",doc.Name));
  
    / / you can use any other name of path to save the document.
    return doc;
}

This method saves a .rsd to the file system of the server (to c:\temp folder in our example). So you can find it there after the rendering is complete and the report is shown in Silverlight.

Add Feedback