Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 15th, 2007, 05:26 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default JSP with SQL Server reporting service

Hi,
  I am new to JSP and SQL Server world.
I have to design a report using SQL Server Reproting service
and call that report form a JSP page.
 Can anyone please help me to know how
 to access the reports.

 I am using Tomcat and SQL Server 2005 version.

  Any help would be appreciated

Thanks
Shyam Prabhu


Reply With Quote
  #2 (permalink)  
Old February 17th, 2007, 12:53 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

here is one very smaple example.

<%@ĦĦpageĦĦimport="java.lang.*,ĦĦjava.io.*,ĦĦjava. sql.*,ĦĦjava.util.*"ĦĦcontentType="text/html"ĦĦ%>
<html>
<body>
<%ĦĦClass.forName("com.microsoft.jdbc.sqlserver.SQ LServerDriver").newInstance();
ĦĦĦĦĦĦStringĦĦurl="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=testdb";

ĦĦĦĦĦĦStringĦĦuser="sa";
ĦĦĦĦĦĦStringĦĦpassword="password";

ĦĦĦĦĦĦConnectionĦĦconn=ĦĦDriverManager.getConnecti on(url,user,password);

ĦĦĦĦĦĦStatementĦĦstmt=conn.createStatement(ResultS et.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABL E);

ĦĦĦĦĦĦStringĦĦsql="selectĦĦid,titleĦĦfromĦĦbooks";

ĦĦĦĦĦĦResultSetĦĦrs=stmt.executeQuery(sql);

ĦĦĦĦĦĦwhile(rs.next())ĦĦ{ĦĦ%>
ĦĦĦĦĦĦĦĦrs.getString(1)%><br>
ĦĦĦĦĦĦĦĦ<%=rs.getString(2)%><br>
<%ĦĦ}ĦĦ%>

<%ĦĦrs.close();

stmt.close();
conn.close();
%>
</body>
</html>


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql server reporting service smtp password config sunarcteam Reporting Services 2 October 17th, 2015 11:37 AM
SQL Server Reporting Service gunjan.sh Reporting Services 1 June 24th, 2008 02:47 PM
JSP with SQL Server reporting service shyamprabhu JSP Basics 0 February 15th, 2007 05:29 AM
JSP with SQL Server reporting service shyamprabhu Reporting Services 0 February 15th, 2007 05:27 AM
Sql Server Express 2005 Reporting Service pkhussain Reporting Services 2 December 23rd, 2006 08:08 AM



All times are GMT -4. The time now is 05:43 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
İ 2013 John Wiley & Sons, Inc.