Learn notes (3) - USING RAS SDK

zhaozj2021-02-16  54

Using Ras SDK

Notes: If you need to create and modify reports at runtime, you must use the service provided by RAS to implement.

1. Installing SDK JAR Files Ras SDK and RAS Server can be installed on the same machine or on different machines. Default installation, SDK JAR file installed in C: / Program Files / Common files / Crystal Decisions / 2.0 / Jars / (9.0) or C: / Program Files / COMMON FILES / CRYSTAL DECISIONS / 2.5 / JAVA / LIB / (10.0) . 2. Different installation methods and running usage RAS services can be used separately with Crystal Report, or a component of Crystal Enterprise and it runs together. In both ways, we use the main difference between RAS services to establish a session, specifying directories, and reports of the RAS Server. A. Establishing a ras session In CE, you must first have an Enterprise Session and then build a RAS Session. An RAS session is initialized by calling the GetService method of the IentralPriseSession object. This method returns an IreportAppFactory object that provides features that have existing reports and create new reports in CESTEM. In Standalone mode, create b. Specifying Reports and Folders Separate Edition and integrated RAS services is the different ways of managing reports. The integrated version of RAS is designed to allow users to modify report objects managed by CE InfoStore, and separate version of RAS Server is designed to modify report files (.rpt files) on the server. When you open and save the report, you need to specify which statement is opened and you want to save the report to which directory. The specified method of the report and directory is as follows: Standalone mode, specify the report and path to provide a file path; CE, specify the report object to provide an Infoobject reference, or provide its ID attribute. Ras SDK provides an application programming interface for applying more than two ways. C. Backward Compatibility is compatible with RAS Server Component in CE, is built on Standalone Ras Server. At this time, when applying the RAS Server connected in the CE, the user will automatically log in to the CE as a guest user. RAS Server Component Accesses the reports in the CE and report files that are not on the RAS server. If you cancel guest users in CE, these applications cannot be connected to RAS Server.3. Accessing Data Sources Ras can use many different data sources. From conceptual, these data sources can be divided into the following categories: a. Runtime Data Sources RAS can use the running data generated by the program as the data source of the report. These data can be obtained from the database or from the data stream, and can also be obtained from a general file through the application. Method for using runtime data sources:. Put the data to be manipulated into the RowSet object; Create a DataSet object and populate data in RowSet; Create a RowSetController object; Use the RowSetController method to set the data source separately. At this time, the dynamic data source can be used. Note: If you create a report based on a DATA SET data source, then the data used will not be saved with the report. When the next time you reopen the report, you must have the process of obtaining data to assemble the report.

转载请注明原文地址:https://www.9cbs.com/read-19103.html

New Post(0)