|By Ravi M||
|December 11, 2009 12:17 PM EST||
SAP (Business Objects) has recently released Crystal Reports for Eclipse version 2.0 to provide reporting solutions for Java-based applications. This is available as free to use (within an organization) and has the advantage that it is built on the most tested and reliable component (Java Reporting Component in Crystal Reports) that has been in market for quite a few years now. This article discusses the features of CR4Ev2.0, usability of its designer and API, and starting off with an overview of Crystal Reports product architecture.
Crystal Reports - Product Overview
Crystal Reports is delivered in three editions with features added upon with each edition and its core feature diagrammatically depicted in Figure 1.
Crystal Reports Developer and Server editions have SDKs for Report Integration that aid in report viewing, printing and exporting in applications, customizable report viewers and report creation APIs. In case of Developer editions, the report processing resides within application and in Server editions it can be offloaded to a Reporting Server.
There are two sets of SDKs available for each of SAP (Business Objects) supported technology platforms (Java and .NET) and for Java these are namely:
- Java Reporting Component (JRC): This is used to perform report processing within application.
- Report Application Server SDK (RAS SDK): This is used to work with Report Application Server where report processing is done on the server and Java application uses RAS SDK for communication with the server.
JRC shares many classes with the RAS SDK, and the JRC-specific classes are thin wrappers around RAS classes.
CR4E vs JRC
JRC was introduced in Crystal Reports 9 and is a reliable component in Crystal Reports product. Crystal Reports have refined this component and bundled it as a separate package known as CR4E, which contains Crystal Reports for Java (CRJ) and Crystal Reports Designer components. The designer component is available as a plug-in to Eclipse and is used for designing and previewing reports. The Crystal Reports for Java component is used for the runtime generation of reports within Java applications.
RAS SDK is the client component for the RAS server-client reporting solution, where the SDK communicates with the RAS server for report processing. With the CRJ SDK, the same classes as that of RAS SDK are used but report processing requests are sent to an in-process Java Report Engine.
A great enhancement of CRJ over JRC is the introduction of RAS-type report creation and modification capabilities. With the CRJ, it's possible to programmatically modify a report on-the-fly: create new fields, introduce new data connections and tables, modify images, add lines and boxes, etc. Anything that can be done to a report using the CR4E embedded designer can also be done programmatically using CRJ as the designer uses the same SDK.
Few points in comparison between CR4E and JRC are jotted in Table 1.
Features of CR4E
Already, few features of CR4E are exposed through its comparison with the JRC above, the following makes the list complete:
- Ability to integrate reporting into Java-based web or desktop applications.
- Provides SDK that enables report creation and modification within Java code.
- Helps Java developer switch on to the Report designer role easily in reporting projects.
- POJO can also be used as a data source for reports.
- Accesses all major databases from within Eclipse IDE as report template data source.
- Supports for all major operating systems and browsers.
- Comes with extension SDKs to extend and enhance the default Eclipse editor.
- Use of Eclipse Update Manager to check and install updates automatically.
Aspects of CR4E Designer
CR4Ev2.0 is provided as a plug-in for Eclipse IDE and works for an Eclipse version greater than 3.4.1. Figure 2 captures the commonly used aspects in the designer and same is detailed further.
Layout tab: Layout tab is the designer view and has the palette with all reporting controls. The controls from palette can be dragged & dropped onto the designer area at the required position.
Preview tab: Preview tab is used to preview the report designed in layout view and the report can also be directly edited in this view. The data source for the report is changed using the ‘Set Datasource Location' menu item under ‘Crystal Reports'.
Datasource Explorer wizard: This wizard is used to create a connection profile for the datasource used in the reports. The CR4E supports relational databases, flat file, web services, XML and POJO as datasources. Once the connection profile is created, the required objects in datasource can be dragged & dropped onto the data view (tab).
Field Explorer wizard: This wizard displays the database objects in the data pane for use in the report. Also, parameters and formulas are created using this view and then placed on to the report layout.
Usage of CR4E APIs
After creating report templates using CR4E designer, the common reporting need is to generate reports dynamically from report templates based on the parameters passed to it. This scenario is walked through below to demonstrate the use of CR4E APIs for generating reports from a standalone Java application (see Figure 3).
The use of CR4E API programmatically in each of this task is explained below:
Report processing is done by Crystal Report Java component (and not by Report Application Server) and this component is initiated as below:
ReportClientDocument boReportClientDocument = new ReportClientDocument();
Next task is loading the report template for report generation as below:
This task is a two-step process; one is to set the connection information for datasource and next is to set the values for input parameters in the report.
a) Set connection information: In most cases, the datasource configured in report template during report design will not be the same one used by the report generation application. So, the datasource connection information for the report template needs to be replaced thro' the following lines of code:
dbController.replaceConnection(oldConnectionInfo, newConnectionInfo, pFields, replaceParams);
dbController - DatabaseController object that is retrieved from ReportClientDocument object for managing database connections
oldConnectionInfo - ConnectionInfo object that is retrieved from DatabaseController object and contains details of existing datasource such as database URL, Server Type, username, password etc.
newConnectionInfo - New ConnectionInfo object that is constructed to replace oldConnectionInfo object
b) Set input parameters: Data displayed on the report is restricted based on the parameter values supplied to the report, same is programmatically done below:
ParameterFieldController parameterFieldController =
The final step is to export the generated report in required format as in lines of code below:
PrintOutputController printOutputController =
ByteArrayInputStream byteIS = (ByteArrayInputStream) printOutputController.export(ReportExportFormat.PDF);
The report stream can be written to a file etc. as needed.
An important point to note during development using CR4E is that it contains both JRC and CRJ APIs and both the APIs have most classes with same name so import statement is critical in determining which APIs are used. To use CRJ, import classes under package name:
com.crystaldecisions.sdk.occa.report.application and for JRC, package name is com.crystaldecisions.reports.sdk
The design and development of reporting solution using CR4E is done using the designer plug-in for Eclipse and Crystal Reports for Java components that are enhanced from reliable Java Reporting Component of Crystal Reports. Modeled with ease of use, intuitive report design and toolset, simple licensing and support from SAP (Business Objects) helps CR4E to be considered as a reporting solution for Java projects.
|dhamikd 03/14/10 10:12:00 AM EDT|
Very much useful writing and very much explanative, where I was confused with JRC and Crystal Report for JAVA. Also the steps you have mentioned for loading and exporting a report was very much useful for me. Other than SAP site, Im seeing another useful write up. If possible, could you please clarify my doubt?
With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo in Silicon Valley. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be! Internet of @ThingsExpo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 17th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal an...
May. 22, 2015 11:30 AM EDT Reads: 2,498
The security devil is always in the details of the attack: the ones you've endured, the ones you prepare yourself to fend off, and the ones that, you fear, will catch you completely unaware and defenseless. The Internet of Things (IoT) is nothing if not an endless proliferation of details. It's the vision of a world in which continuous Internet connectivity and addressability is embedded into a growing range of human artifacts, into the natural world, and even into our smartphones, appliances, and physical persons. In the IoT vision, every new "thing" - sensor, actuator, data source, data con...
May. 22, 2015 11:00 AM EDT Reads: 6,150
Buzzword alert: Microservices and IoT at a DevOps conference? What could possibly go wrong? In this Power Panel at DevOps Summit, moderated by Jason Bloomberg, the leading expert on architecting agility for the enterprise and president of Intellyx, panelists will peel away the buzz and discuss the important architectural principles behind implementing IoT solutions for the enterprise. As remote IoT devices and sensors become increasingly intelligent, they become part of our distributed cloud environment, and we must architect and code accordingly. At the very least, you'll have no problem fil...
May. 22, 2015 10:00 AM EDT Reads: 1,798
IoT is still a vague buzzword for many people. In his session at @ThingsExpo, Mike Kavis, Vice President & Principal Cloud Architect at Cloud Technology Partners, discussed the business value of IoT that goes far beyond the general public's perception that IoT is all about wearables and home consumer services. He also discussed how IoT is perceived by investors and how venture capitalist access this space. Other topics discussed were barriers to success, what is new, what is old, and what the future may hold. Mike Kavis is Vice President & Principal Cloud Architect at Cloud Technology Pa...
May. 22, 2015 10:00 AM EDT Reads: 7,695
Disruptive macro trends in technology are impacting and dramatically changing the "art of the possible" relative to supply chain management practices through the innovative use of IoT, cloud, machine learning and Big Data to enable connected ecosystems of engagement. Enterprise informatics can now move beyond point solutions that merely monitor the past and implement integrated enterprise fabrics that enable end-to-end supply chain visibility to improve customer service delivery and optimize supplier management. Learn about enterprise architecture strategies for designing connected systems tha...
May. 22, 2015 10:00 AM EDT Reads: 5,824
There's Big Data, then there's really Big Data from the Internet of Things. IoT is evolving to include many data possibilities like new types of event, log and network data. The volumes are enormous, generating tens of billions of logs per day, which raise data challenges. Early IoT deployments are relying heavily on both the cloud and managed service providers to navigate these challenges. In her session at Big Data Expo®, Hannah Smalltree, Director at Treasure Data, discussed how IoT, Big Data and deployments are processing massive data volumes from wearables, utilities and other machines...
May. 22, 2015 10:00 AM EDT Reads: 3,892
SYS-CON Events announced today that the "First Containers & Microservices Conference" will take place June 9-11, 2015, at the Javits Center in New York City. The “Second Containers & Microservices Conference” will take place November 3-5, 2015, at Santa Clara Convention Center, Santa Clara, CA. Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities.
May. 22, 2015 10:00 AM EDT Reads: 2,012
SYS-CON Events announced today that MetraTech, now part of Ericsson, has been named “Silver Sponsor” of SYS-CON's 16th International Cloud Expo®, which will take place on June 9–11, 2015, at the Javits Center in New York, NY. Ericsson is the driving force behind the Networked Society- a world leader in communications infrastructure, software and services. Some 40% of the world’s mobile traffic runs through networks Ericsson has supplied, serving more than 2.5 billion subscribers.
May. 22, 2015 09:45 AM EDT Reads: 1,285
The 4th International Internet of @ThingsExpo, co-located with the 17th International Cloud Expo - to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA - announces that its Call for Papers is open. The Internet of Things (IoT) is the biggest idea since the creation of the Worldwide Web more than 20 years ago.
May. 22, 2015 09:00 AM EDT Reads: 1,475
The 17th International Cloud Expo has announced that its Call for Papers is open. 17th International Cloud Expo, to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, APM, APIs, Microservices, Security, Big Data, Internet of Things, DevOps and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportunity. Submit your speaking proposal today!
May. 22, 2015 08:00 AM EDT Reads: 4,179
Since 2008 and for the first time in history, more than half of humans live in urban areas, urging cities to become “smart.” Today, cities can leverage the wide availability of smartphones combined with new technologies such as Beacons or NFC to connect their urban furniture and environment to create citizen-first services that improve transportation, way-finding and information delivery. In her session at @ThingsExpo, Laetitia Gazel-Anthoine, CEO of Connecthings, will focus on successful use cases.
May. 22, 2015 06:00 AM EDT Reads: 4,836
The explosion of connected devices / sensors is creating an ever-expanding set of new and valuable data. In parallel the emerging capability of Big Data technologies to store, access, analyze, and react to this data is producing changes in business models under the umbrella of the Internet of Things (IoT). In particular within the Insurance industry, IoT appears positioned to enable deep changes by altering relationships between insurers, distributors, and the insured. In his session at @ThingsExpo, Michael Sick, a Senior Manager and Big Data Architect within Ernst and Young's Financial Servi...
May. 22, 2015 06:00 AM EDT Reads: 4,694
The recent trends like cloud computing, social, mobile and Internet of Things are forcing enterprises to modernize in order to compete in the competitive globalized markets. However, enterprises are approaching newer technologies with a more silo-ed way, gaining only sub optimal benefits. The Modern Enterprise model is presented as a newer way to think of enterprise IT, which takes a more holistic approach to embracing modern technologies.
May. 22, 2015 06:00 AM EDT Reads: 5,942
17th Cloud Expo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises are using some form of XaaS – software, platform, and infrastructure as a service.
May. 22, 2015 05:00 AM EDT Reads: 2,329
One of the biggest impacts of the Internet of Things is and will continue to be on data; specifically data volume, management and usage. Companies are scrambling to adapt to this new and unpredictable data reality with legacy infrastructure that cannot handle the speed and volume of data. In his session at @ThingsExpo, Don DeLoach, CEO and president of Infobright, will discuss how companies need to rethink their data infrastructure to participate in the IoT, including: Data storage: Understanding the kinds of data: structured, unstructured, big/small? Analytics: What kinds and how responsiv...
May. 22, 2015 05:00 AM EDT Reads: 4,380
The Workspace-as-a-Service (WaaS) market will grow to $6.4B by 2018. In his session at 16th Cloud Expo, Seth Bostock, CEO of IndependenceIT, will begin by walking the audience through the evolution of Workspace as-a-Service, where it is now vs. where it going. To look beyond the desktop we must understand exactly what WaaS is, who the users are, and where it is going in the future. IT departments, ISVs and service providers must look to workflow and automation capabilities to adapt to growing demand and the rapidly changing workspace model.
May. 22, 2015 04:30 AM EDT Reads: 3,071
From telemedicine to smart cars, digital homes and industrial monitoring, the explosive growth of IoT has created exciting new business opportunities for real time calls and messaging. In his session at @ThingsExpo, Ivelin Ivanov, CEO and Co-Founder of Telestax, shared some of the new revenue sources that IoT created for Restcomm – the open source telephony platform from Telestax. Ivelin Ivanov is a technology entrepreneur who founded Mobicents, an Open Source VoIP Platform, to help create, deploy, and manage applications integrating voice, video and data. He is the co-founder of TeleStax, a...
May. 22, 2015 04:00 AM EDT Reads: 6,275
The Internet of Things (IoT) promises to evolve the way the world does business; however, understanding how to apply it to your company can be a mystery. Most people struggle with understanding the potential business uses or tend to get caught up in the technology, resulting in solutions that fail to meet even minimum business goals. In his session at @ThingsExpo, Jesse Shiah, CEO / President / Co-Founder of AgilePoint Inc., showed what is needed to leverage the IoT to transform your business. He discussed opportunities and challenges ahead for the IoT from a market and technical point of vie...
May. 22, 2015 04:00 AM EDT Reads: 6,640
Sensor-enabled things are becoming more commonplace, precursors to a larger and more complex framework that most consider the ultimate promise of the IoT: things connecting, interacting, sharing, storing, and over time perhaps learning and predicting based on habits, behaviors, location, preferences, purchases and more. In his session at @ThingsExpo, Tom Wesselman, Director of Communications Ecosystem Architecture at Plantronics, will examine the still nascent IoT as it is coalescing, including what it is today, what it might ultimately be, the role of wearable tech, and technology gaps stil...
May. 22, 2015 04:00 AM EDT Reads: 4,303
DevOps tends to focus on the relationship between Dev and Ops, putting an emphasis on the ops and application infrastructure. But that’s changing with microservices architectures. In her session at DevOps Summit, Lori MacVittie, Evangelist for F5 Networks, will focus on how microservices are changing the underlying architectures needed to scale, secure and deliver applications based on highly distributed (micro) services and why that means an expansion into “the network” for DevOps.
May. 22, 2015 03:00 AM EDT Reads: 2,848