[toc on_off::hide=1]
The following are steps that can be followed to set up a data source within iReport to connect to a Microsoft SQL database:
Note:These instructions will work for iReport version 3.1 and greater.
- Download the JDBC driver (sqljdbc4.jar) from Microsoft: http://msdn.microsoft.com/en-us/data/aa937724.aspx
- in iReport Designer, go to the following menu Window =>Services
Expand the Database tree that shows in the Services window and right-click on the Drivers folder and select "New Driver..."
Add the jar file; Give it a name i.e. "Microsoft SQL Server" and click OK
- Right Click on the new "Microsoft SQL Server" driver that appears in the Services window and selected "Connect Using..."
- Set up the database connection - as an example, you might use "jjdbc:sqlserver://host:1433;databaseName=yourDatabase", your username and password - and click ok
- Add a new datasource using the NetBeans Database JDBC connection - the new connection defined should be in the dropdown
- Open the report wizard and you are on your way....
See Also
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now