Notes: If you need to create and modify reports at run time, you must use the services provided by RAS to implement them.
1. The Installing SDK JAR Files ras SDK and RAS server can be installed on the same machine or on different machines. The SDK jar files are installed in the C:\Program Files\Common Files\Crystal decisions\2.0\jars\ (9.0) or C:\Program Files\Common by default installation files\ Crystal decisions\2.5\java\lib\ (10.0). 2. Different installation and operation modes The ras service can be installed separately with the crystal, or it can serve as a component of Crystal Enterprise and run with it. In both ways, the main difference between our use of the RAS service is to establish a session with RAS server, and to specify how directories and reports are different. a. Establishing a RAS session in CE, you must first have a enterprise session before you can establish a RAS session. Initializes a RAS session by calling the GetService method of the Ienterprisesession object. This method returns a Ireportappfactory object that provides the ability to open existing reports and create new reports in CE system. in standalone mode, reportappsession to create b. Specifying reports and folders The key difference between separate and integrated RAS services is the different ways to manage reports. The integrated RAS is designed to allow users to modify report objects managed by the CE infostore, while a separate version of RAS server is designed to be able to modify the report files (. rpt files) on the server. When you open and save the report, you need to specify which report is open and which directory you want to save the report to. reports and directories are specified as follows: standalone mode specifies that the report and path need to provide a file path; ce, the specified Report object needs to provide a infoobject reference. or provide its id attribute. The ras SDK provides application programming interfaces in both of these ways. c. Backward compatibility The RAS server component in CE is based on the application on the standalone RAS server. At this point, when the application is connected to the RAS server in the CE, the user will automatically log into the CE as the guest user. RAS server component Access reports in CE and report files that are not on the RAS server. If the guest user is canceled in CE, these applications will not be able to connect to the RAS Server.3. Accessing data Sources ras can use a number of different sources. Conceptually, these data sources can be grouped into the following categories: a. Runtime Data Sources RAS can use the data generated by the program at run time as the data source for the report. This data can be obtained from the database, can be obtained from the data stream, or it can be obtained from the general file through the application. Using the method of the Run-time data source: . Put the data to be manipulated into the rowset object; . Creates a DataSet object and populates the; with the data in rowset. Creates a Rowsetcontroller object; . Use the Rowsetcontroller method to set the data source separately. The Dynamic Data source can be used at this time. NOTE: If you create a report based on a data set DataSource, the data used is not saved with the report. The next time you reopen the report, you must redo the process of getting the data to assemble the report. b. Persistent data sources the use of persistent sources is characterized by the fact that the lifetime of the data is beyond the runtime. Using persistent data sources is primarily useful for reports created using the Crystal Report. Because the RAS mirrors all the features of the Crystal Reports, RAS can also use these persistent data sources. in RAS you can use the following three ways to get data source: . Use a data source; for a report that already exists. Create a new data source; . Use the Connectiondirmanager object to select a data source: The Connectiondirmanager object allows you to browse all data sources on the RAS. These data sources are managed by a tree structure and can be achieved by COnnectiondirmanager method Access. c. JavaBean Custom Data sources You can use JavaBean (or a Java class that does not have an extended bean type) as a data source in order to use a custom source. The method is as follows: . Create a Java class that describes the custom data source: This class serves to create Crystal Reports like a Java Beans connectivity data source. This class requires the following characteristics: constructors cannot take parameters; the method used as "tables" must return a ResultSet object; The statement object must be created using the resultset.type_scroll_sensitive and resultset.concur_read_only parameters. Note: The method that returns resultset can take parameters, which will be treated as stored procedure parameters by Crystal Reprots. . Reference a Java class to provide data for a report: to provide the class name for the custom data source class above this class and the method to obtain the data, that is, to return the ResultSet method.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.