|
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:
- The first parameter specifies the name of the report file to save to. Include the file extension (.rpt).
- The second parameter accepts a String object that specifies the file path to save the report to.
- The third parameter accepts an integer value that specifies the save options. See the CdReportClientDocumentSaveAsOptionsEnum enumeration for details.
|
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:
- CrystalDecisions.ReportAppServer.ClientDoc
© 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