Monday, 27 August 2012

BIRT REPORT


Business Intelligence and Reporting Tools (BIRT) is an Eclipse-based open source reporting system for web applications, especially those based on Java and Java EE.
BIRT has two main components: a report designer based on Eclipse, and a runtime component that you can add to your app server. BIRT also offers a charting engine that lets you add charts to your own application.
With BIRT, you can add a rich variety of reports to your application.
  • Lists - The simplest reports are lists of data. As the lists get longer, you can add grouping to organize related data together (orders grouped by customer, products grouped by supplier). If your data is numeric, you can easily add totals, averages and other summaries.
  • Charts - Numeric data is much easier to understand when presented as a chart. BIRT provides pie charts, line & bar charts and many more. BIRT charts can be rendered in SVG and support events to allow user interaction.
  • Crosstabs - Crosstabs (also called a cross-tabulation or matrix) shows data in two dimensions: sales per quarter or hits per web page.
  • Letters & Documents - Notices, form letters, and other textual documents are easy to create with BIRT. Documents can include text, formatting, lists, charts and more.
  • Compound Reports - Many reports need to combine the above into a single document. For example, a customer statement may list the information for the customer, provide text about current promotions, and provide side-by-side lists of payments and charges. A financial report may include disclaimers, charts, tables all with extensive formatting that matches corporate color schemes.
BIRT reports consist of four main parts: data, data transforms, business logic and presentation.
  • Data - Databases, web services, Java objects all can supply data to your BIRT report. BIRT provides JDBC, XML, Web Services, and Flat File support, as well as support for using code to get at other sources of data. BIRT's use of the Open Data Access (ODA) framework allows anyone to build new UI and runtime support for any kind of tabular data. Further, a single report can include data from any number of data sources. BIRT also supplies a feature that allows disparate data sources to be combined using inner and outer joins.
  • Data Transforms - Reports present data sorted, summarized, filtered and grouped to fit the user's needs. While databases can do some of this work, BIRT must do it for "simple" data sources such as flat files or Java objects. BIRT allows sophisticated operations such as grouping on sums, percentages of overall totals and more.
  • Business Logic - Real-world data is seldom structured exactly as you'd like for a report. Many reports require business-specific logic to convert raw data into information useful for the user. If the logic is just for the report, you can script it using BIRT's JavaScript support. If your application already contains the logic, you can call into your existing Java code.
  • Presentation - Once the data is ready, you have a wide range of options for presenting it to the user. Tables, charts, text and more. A single data set can appear in multiple ways, and a single report can present data from multiple data sets 
    Designing a new report:
    Create a Report
     to create our first report:
  • Choose File→New→Report. The new report dialog appears.
  • Enter the file name
  • Click Next.
You can create a report in three ways: as a blank report, by using a BIRT-defined template, or by copying one of your report designs.

Introduction to Java



History
Java is a programming language created by James Gosling from Sun Micro systems in 1991. The first public available version of Java (Java 1.0) was released 1995. Over time several version of Java were released which enhanced the language and its libraries. The current version of Java is Java 1.6 also known as Java 6.0.
From the Java programming language the Java platform evolved. The Java platform allows that code is written in other languages then the Java programming language and still runs on the Java virtual machine.

Overview
The Java programming language consists out of a Java compiler, the Java virtual machine, and the Java class libraries. The Java virtual machine (JVM) is a software implementation of a computer that executes programs like a real machine.
The Java compiler translates Java coding into so-called byte-code. The Java virtual machine interprets this byte-code and runs the program.
The Java virtual machine is written specifically for a specific operating system.
The Java run time environment (JRE) consists of the JVM and the Java class libraries.


Characteristics

The target of Java is to write a program once and then run this program on multiple operating systems.
Java has the following properties:

Platform independent: Java programs use the Java virtual machine as abstraction and do not access the operating system directly. This makes Java programs highly portable. A Java program which is standard complaint and follows certain rules can run unmodified all several platforms, e.g. Windows or Linux.
Object-orientated programming language: Except the primitive data types, all elements in Java are objects.
Strongly-typed programming language: Java is strongly-typed, e.g. the types of the used variables must be per-defined and conversion to other objects is relatively strict, e.g. must be done in most cases by the programmer.
Interpreted and compiled language: Java source code is transferred into byte-code which does not depend on the target platform. This byte-code will be interpreted by the Java Virtual machine (JVM). The JVM contains a so called Hotspot-Compiler which translates critical byte-code into native code.
Automatic memory management: Java manages the memory allocation and de-allocation for creating new objects. The program does not have direct access to the memory. The so-called garbage collector deletes automatically object to which no active pointer exists.



The Java syntax is similar to C++. Java is case sensitive, e.g. the variables my Value and my value will be treated as different variables.


Development with Java

The programmer writes Java source code in an text editor which supports plain text. Normally the programmer uses an IDE (integrated development environment) for programming. An IDE support the programmer in the task of writing code, e.g. it provides auto-formatting of the source code, highlighting of the important keywords, etc.
At some point the programmer (or the IDE) calls the Java compiler (javac). The Java compiler creates platform independent code which is called byte code. This byte-code is stored in ".class" files.
Byte code can be executed by the Java run time environment. The Java run time environment (JRE) is a program which knows how to run the byte-code on the operating system. The JRE translates the byte code into native code and executes it, e.g. the native code for Linux is different then the native code for Windows.
By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with -d

Thursday, 23 August 2012

Java First Program




Java Hello World Program
/** Comment
 * Displays "Hello World!" to the standard output.
 */
class HelloWorld {

  public static void main (String args[]) {

    System.out.println("Hello World!");   //Displays the enclosed String on the Screen Console

  }
  
}