Saving reports

Parent Previous Next

 

Report Application Server .NET SDK Developer Guide

Saving reports


 







After making changes to a report using the ReportClientDocument class, you may want to save the modified report. Use the SaveAs methods of the ReportClientDocument class to write to a report file (.rpt).

Saving a report to a file path

To save a new report to a file path accessible to the RAS server, specify the values of three parameters in the SaveAs method:

Visual Basic

Private Sub SaveReportToFilepath(ByVal rcd As ISCDReportClientDocument)
 Dim saveDirectory As String = "C:\"
 Dim saveDir As Object = DirectCast(saveDirectory, Object)
 rcd.SaveAs("MyLocalReport.rpt", saveDir, CInt(CdReportClientDocumentSaveAsOptionsEnum.cdReportClientDocumentSaveAsOverwriteExisting))
 rcd.Close()
End Sub

C#

private void SaveReportToFilepath(ISCDReportClientDocument rcd)
{
 string saveDirectory = "C:\\";
 object saveDir = (object)saveDirectory;
 rcd.SaveAs("MyLocalReport.rpt", ref saveDir, (int)CdReportClientDocumentSaveAsOptionsEnum.cdReportClientDocumentSaveAsOverwriteExisting);
 rcd.Close();
}

This list includes the namespaces used by the sample code:

© 2021 SAP AG. All rights reserved.

http://www.sap.com/sapbusinessobjects/

Support services

http://service.sap.com/bosap-support/

Created with the Personal Edition of HelpNDoc: iPhone web sites made easy