SAP Crystal Reports Server 2011 Installation

What is Crystal Reports Server?

Crystal Reports Server is an end-to-end reporting solution that enables you to create, manage, and deliver Crystal reports over the web. It is built on the proven Business Intelligence platform, BusinessObjects Enterprise. It includes a report publisher and a web portal interface which is used to view reports. It also includes a Software Developer Kit (SDK) that enables you to customize Crystal Reports Server and integrate it with other custom applications.

Crystal Reports Server can be installed on a single machine for up to 20 end users. These users can concurrently access, view, and interact with reports on the web without installing Crystal Reports on their respective machines. It enables you to store reports in a central database to ensure data security and data integrity. Users can access the reports by using the web portal.

Using Crystal Reports Server, you can set up security to control access to specific folders and reports. You can also specify the rights for users or groups.

1. Disable Firewall

1) Click Start button and shoot on Control Panel menu

2) Click on Windows Firewall icon

3) Click on “Turn Windows Firewall on or off”

4) Ok. Already turned it off. Good job.

2. MySQL Installation

1) Download both files from this link: [ link ]

2) Copy it out and paste into C:\Windows\System32\libmysql.dll

3) After that, proceed with MySQL installation as usual. Click twice on the package file.

4) MySQL welcome page. Click Next to continue.

5) Choose “I accept the terms in the license agreement”

6) Choose the setup type and click Next button.

7) Click on Install button to proceed.

8) Installing MySQL Server 5.1

9) Click Finish to exit the wizard.

10) MySQL Server Instance Configuration Wizard will be displayed. Click Next button.

11) Configure the MySQL Server 5.1 server instance.

12) Select the server type and click Next button.

13) Select the database usage.

14) Just use the default setting. Click Next to continue.

15) Set the approximate number of concurrent connections to the server.

16) Set the networking options.

17) Select the default character set.

18) Set the Windows options.

19) Set the security options.

20) Processing configuration screen will be displayed.

21) Click on Finish button to close wizard.

22) Login to the MySQL database server as superuser.

23) Create databases as stated below.

3. SAP Crystal Reports Server 2011 Installation

1) Double click on setup.exe package.

2) Choose a setup language.

3) Prerequisite check’s screen will be displayed. Click Next to proceed.

4) Installation wizard will be displayed. Click Next.

5) Choose “I accept the License Agreement”

6) Type your product key to proceed.

7) Choose language packs.

8) Choose install type.

9) Specify the destination folder.

10) Select existing database option.

11) Specify the database type to use for the CMS repository.

12) Specify the database type to use for the Auditing database.

13) Select a Java web application to install.

14) Select a version control system for version management.

15) Configure Server Intelligence Agent.

16) Enter a port number for the CMS.

17) Configure CMS account.

18) Configure CMS repository database.

19) Configure Auditing database.

20) Configure the application server.

21) Configure HTTP listening port.

22) Configure Subversion.

23) Configure SMD Agent.

24) Configure Introscope Integration.

25) Press the Next button to begin the installation.

26) Installing the package.

27) Click Next to complete your installation.

28) Yeah. Finally finished the installation. fuhh!

29) Login to the server.

30) Yeah!

Start Up/Shutdown Shortcuts for SAP Crystal Reports Server

1 – Click on Start button and go to Search programs and files; type “run”

2 – Open this folder

C:\Windows\System32\GroupPolicy

3 – Create new folders in ..\Machine\Scripts\Startup and ..\Machine\Scripts\Shutdown

4 – Paste the bash scripts into that particular folders

5 – Rename your target (1) application server, (2) database server and (3) Server Intelligence Agent based on service name

6 – Create shortcuts for startup and shutdown. Click Next button to continue.

7 – Set shortcut’s target.

Start Up

</pre>
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -ExecutionPolicy RemoteSigned -File

C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup\StartBOE.ps1
<pre>

Shutdown

</pre>
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -ExecutionPolicy RemoteSigned -File

C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown\ShutdownBOE.ps1
<pre>

8. Finish. Yeay!

simple jasperreports tutorial

1. create a new Java Desktop Application project in your netbeans

File > New Project > Java > Java Desktop Application

2. click Next to proceed

3. define your project name and application class; my project name for this tutorial is TestingReport

4. define libraries such below:

5. create table ‘jasper_users’

CREATE TABLE `jasper_users` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `firstname` varchar(64) DEFAULT NULL,
 `lastname` varchar(64) DEFAULT NULL,
 `address` varchar(64) DEFAULT NULL,
 `email` varchar(64) DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `jasper_users` (firstname, lastname, address, email)
VALUES ('John', 'Doe', 'Utah, USA', 'johndoe@email.com');

INSERT INTO `jasper_users` (firstname, lastname, address, email)
VALUES ('Mohd', 'Faizal', 'KL, Malaysia', 'mohdfaizal@email.com');

INSERT INTO `jasper_users` (firstname, lastname, address, email)
VALUES ('Onizuka', 'Sr.', 'Tokyo, Japan', 'onizuka@email.com');

6. Main.java

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mohdfaizal.jasperdemo;

import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.view.JasperViewer;

/**
 *
 * @author mohdfaizal
 */
public class Main extends JFrame implements ActionListener {

 private Logger logger = Logger.getLogger(Main.class);
 private JTextField txtFirstname = new JTextField(20);
 private JButton submitButton = new JButton("Submit");

public Main() {
 init();
 }

private void init() {
 Container conn = getContentPane();
 conn.setLayout(new FlowLayout());
 conn.add(new JLabel("Search by First Name: "));
 conn.add(txtFirstname);
 conn.add(submitButton);
 setLocationRelativeTo(null);
 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 submitButton.addActionListener(this);
 pack();
 }

public void actionPerformed(ActionEvent e) {
 if (e.getSource().equals(submitButton)) {

Connection connection = null;
 JasperReport jasperReport = null;
 JasperPrint jasperPrint = null;

 try {
 // get search input
 String parameterName = txtFirstname.getText();
 String reportSource = "src/com/mohdfaizal/template/ReportTemplate.jrxml";
 // set parameters
 Map map = new HashMap();
 map.put("param", parameterName);
 // establish database connection
 Class.forName("com.mysql.jdbc.Driver");
 connection = DriverManager.getConnection("jdbc:mysql://localhost/tutorial", "root", "password");
 // compile report
 jasperReport = (JasperReport) JasperCompileManager.compileReport(reportSource);
 jasperPrint = JasperFillManager.fillReport(jasperReport, map, connection);
 //close connection
 connection.close();
 //view report to UI
 JasperViewer.viewReport(jasperPrint, false);

} catch (Exception ex) {
 // exception handling
 logger.error(ex.getMessage(), ex);
 System.err.println(ex.getMessage());
 }
 }
 }

public static void main(String[] args) {
 new Main().setVisible(true);
 }
}

7. ReportTemplate.jrxml


<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ReportTemplate" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
 <property name="ireport.zoom" value="1.5"/>
 <property name="ireport.x" value="0"/>
 <property name="ireport.y" value="0"/>
 <parameter name="param" class="java.lang.String"/>
 <queryString>
 <![CDATA[
SELECT
 id,
 firstname,
 lastname,
 address,
 email
FROM
 jasper_users
WHERE
 firstname LIKE $P{param}]]>
 </queryString>
 <field name="id" class="java.lang.Integer"/>
 <field name="firstname" class="java.lang.String"/>
 <field name="lastname" class="java.lang.String"/>
 <field name="address" class="java.lang.String"/>
 <field name="email" class="java.lang.String"/>
 <background>
 <band splitType="Stretch"/>
 </background>
 <title>
 <band height="56" splitType="Stretch">
 <staticText>
 <reportElement x="0" y="0" width="555" height="46"/>
 <textElement textAlignment="Center" verticalAlignment="Middle">
 <font size="22" isBold="true"/>
 </textElement>
 <text><![CDATA[Jasper Reports Demo]]></text>
 </staticText>
 </band>
 </title>
 <pageHeader>
 <band height="13" splitType="Stretch"/>
 </pageHeader>
 <columnHeader>
 <band height="25" splitType="Stretch">
 <staticText>
 <reportElement x="50" y="0" width="100" height="20"/>
 <textElement>
 <font isBold="true"/>
 </textElement>
 <text><![CDATA[First Name]]></text>
 </staticText>
 <staticText>
 <reportElement x="161" y="0" width="100" height="20"/>
 <textElement>
 <font isBold="true"/>
 </textElement>
 <text><![CDATA[Last Name]]></text>
 </staticText>
 <staticText>
 <reportElement x="274" y="0" width="100" height="20"/>
 <textElement>
 <font isBold="true"/>
 </textElement>
 <text><![CDATA[Address]]></text>
 </staticText>
 <staticText>
 <reportElement x="395" y="0" width="149" height="20"/>
 <textElement>
 <font isBold="true"/>
 </textElement>
 <text><![CDATA[E-mail]]></text>
 </staticText>
 <staticText>
 <reportElement x="10" y="0" width="27" height="20"/>
 <textElement>
 <font isBold="true"/>
 </textElement>
 <text><![CDATA[ID]]></text>
 </staticText>
 </band>
 </columnHeader>
 <detail>
 <band height="25" splitType="Stretch">
 <textField>
 <reportElement x="50" y="0" width="100" height="20"/>
 <textElement/>
 <textFieldExpression class="java.lang.String"><![CDATA[$F{firstname}]]></textFieldExpression>
 </textField>
 <textField>
 <reportElement x="161" y="0" width="100" height="20"/>
 <textElement/>
 <textFieldExpression class="java.lang.String"><![CDATA[$F{lastname}]]></textFieldExpression>
 </textField>
 <textField>
 <reportElement x="274" y="0" width="100" height="20"/>
 <textElement/>
 <textFieldExpression class="java.lang.String"><![CDATA[$F{address}]]></textFieldExpression>
 </textField>
 <textField>
 <reportElement x="395" y="0" width="149" height="20"/>
 <textElement/>
 <textFieldExpression class="java.lang.String"><![CDATA[$F{email}]]></textFieldExpression>
 </textField>
 <textField>
 <reportElement x="10" y="0" width="27" height="20"/>
 <textElement/>
 <textFieldExpression class="java.lang.Integer"><![CDATA[$F{id}]]></textFieldExpression>
 </textField>
 </band>
 </detail>
 <columnFooter>
 <band splitType="Stretch"/>
 </columnFooter>
 <pageFooter>
 <band height="23" splitType="Stretch"/>
 </pageFooter>
 <summary>
 <band splitType="Stretch"/>
 </summary>
</jasperReport>


8. run the application



9. finish. yeay!

mysql odbc in crystal reports 10

1. click on Start > Control Panel > Administrative Tools > Data Sources (ODBC). Configure your settings and click Ok button to proceed. (I’m using jsf_hibernate database for this tutorial)

2. hit Crystal Reports 10 to open report designer

3. create a new crystal report document as a blank report

4. expand ODBC (RDO)

5. select Data Source Name as per-configured earlier

6. key-in userid and password (refer your configuration in MySQL ODBC connector)

7. select table name

8. drag-n-drop table column to design your report

9. preview your report

10. finish – happy designing..