//Create a new Report Application Session
ReportAppSession reportAppSession = new ReportAppSession();
//Create a Report Application Server Service
reportAppSession.createService("com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");
//Set the RAS Server to be used for the service. You can also use "localhost" if the RAS server is running on your local machine.
reportAppSession.setReportAppServer("127.0.0.1");
//Initialize RAS
reportAppSession.initialize();
//Create the report client document object
ReportClientDocument clientDoc = new ReportClientDocument();
//Set the RAS Server to be used for the Client Document
clientDoc.setReportAppServer(reportAppSession.getReportAppServer() );
Note: All ReportClientDocuments created from the same ReportAppSession communicate with the same RAS server.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24167472/viewspace-1038867/ ,如需转载,请注明出处,否则将追究法律责任。