SQL Server Data Source From Java
SQL Server Data Source From Java
This document shows how to create a simple program with Sql Server as the datasource used to
create a report using Windward Reports. To keep it very simple it creates a command line
application. The sample here is created using IntelliJ running on Windows XP.
1. Download the Sql Server JDBC driver.
a. The driver for Sql Server 2000 and 2005 is at
http://www.microsoft.com/downloads/details.aspx?familyid=e22bc83b-32ff-
4474-a44a-22b6ae2c4e17&displaylang=en. This driver is good for both Sql
Server 2000 and Sql Server 2005. It is available as both an exe (Windows install)
and .tar.gz (unix install).
If you want the Sql Server 2000 JDBC driver, the latest version is at
http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-
461A-B138-2AA54BFDC03A&displaylang=en.
b. Click Download:
c. We are running on Windows so click “…want to download the Microsoft
Windows…” link
d. Save the download and the run it. You will then be asked for the file to unzip to.
You should add the root directory you want this installed to to the default folder
which is just “Microsoft SQL Server 2005 JDBC Driver” (I added c:\net\). Then
click Unzip.
3. Add all of the Windward Reports jar files to the libraries for this project. These are found
in c:\Program Files\Windward Studios\Windward Reports Java Engine\lib if you installed
to the default directory when installing Windward Reports.
And we need to add the jar file for Sql Server.
6. To keep things simple, there is no error checking and this will always create a PDF
report. To see a complete version of this simple approach, please look at RunReport.java
in sample 1.
7. Passing templates to the engine and getting the created report back is all done withCsee7 Tc -0.0007 Tw -