Friday, 13 April 2012

Connecting Jasper Report Server to MS SQL Server



To create a connection between MS SQL Server and Jasper-report server you have
 to download sql jdbc driver for MS Sql server.

You can download   "1033\sqljdbc_3.0.1301.101_enu.exe" driver from  Microsoft website
 http://www.microsoft.com/download/en/details.aspx?id=21599

after downloading extract the file  sqljdbc4.jar file from sqljdbc_3.0\enu  and copy
 sjbdc4.jar file in these location-

<jasper-report-server-install-directory>\apache-tomcat\lib
And
<jasper-report-server-install-directory>\apache-tomcat\webapps\jasperserver\WEB-INF\lib

after copying the jar file, restart Jasper-report serve and login to the jasper-report server using this link
 http://localhost:8080/jasperserver
Data source parameters for MS SQL server --

Name: –         Name of database which you want to connect from MS SQL server
Resource id:- It can be same as name
Description:- It can be anything about database
Driver:-         com.microsoft.sqlserver.jdbc.SQLServerDriver
URL:-            jdbc:sqlserver://localhost:1433;databaseName=databasename
Username:-   Username of MS SQL server database
Password:-    Password of MS SQL server
 and then test the connection.


1 comment:

Kishor Kumar said...

super boss its working