Here I am using some crystal report which will connect to database and fetch the data to create report.
It will expect username and password from the calling function.
Also it will expect some parameter(Name) from the calling function. Below is the code
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Date;
import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
import com.crystaldecisions.*;
import com.crystaldecisions.sdk.occa.report.data.Connections;
import com.crystaldecisions.sdk.occa.report.data.Fields;
import com.crystaldecisions.sdk.occa.report.data.IConnection;
import com.crystaldecisions.sdk.occa.report.data.ParameterField;
import com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat;
public [...]
Archive for the ‘Languages’ Category
Export Crystal Report to PDF by using Java Program
Posted in Java, tagged Crystal report, export to pdf, Java on August 20, 2009 | Leave a Comment »
Difference between Struts and Spring Framework,
Posted in Spring, tagged difference between struts and spring framework on July 24, 2009 | Leave a Comment »
Sl. No
Struts
Spring
1
Struts is a web framework
Spring is an application
framework
2
Using MVC pattern
spring MVC is one of the
modules
3
Hard code to use applications
like hibernate, JDBC
Inbuilt hibernate, JDBC etc
4
Struts allows only JSP
Support JSPs, Velocity,
Free maker etc.,
5
Struts is heavy weight
Spring is light weight
6
Struts is tightly coupled
Spring is loosely coupled.
7
Excellent support for
Tag Library
Not that Much
8
Easy to integrate with other
client side technologies
Not [...]
Spring Framework
Posted in Spring, tagged AOP, IOC, POJO, Spring DAO, Spring Framework, Spring ORM on July 24, 2009 | 2 Comments »
Spring is standard in lightweight enterprise application framework. Layered architecture, which allows you to be selective about which of its components you use there are seven modules in Spring Frame work
I> Spring Core:
Uses IOC pattern to separate the application configuration with dependency specification from the actual application code.
IOC (Inversion of control)
No creation of object but [...]
Groovy and Grails
Posted in Java on June 29, 2009 | 1 Comment »
Groovy…
is an agile and dynamic language for the Java Virtual Machine
builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk
makes modern programming features available to Java [...]
WATIR
Posted in Ruby on June 29, 2009 | Leave a Comment »
WATIR, pronounced “Water”, is an acronym standing for “Web Application Testing in Ruby”. Watir is a toolkit used to automate browser-based tests during web application development. This automated test tool uses the Ruby scripting language to drive the Internet Explorer web browser, and is available as a Ruby Gem.
Examples
The google example
# Here we see a [...]