Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 19th, 2003, 03:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default Print (Report in ASP)

I use print function

<input type=button value=Print onClick="print()" id=button1 name=button1>

but it is only print two columns with respect to width of column,


how can print the following query records by the ASP ?
how can print full record which is retrieve by the query in ASP ?

i.e

<%
ssql=”select * from software order by manufacturer”

set rs=cn.Execute(ssql)

do while rs.eof=false

Response.Write("<tr>")

fieldData = rs("manuf") & ""
If Len(fieldData) = 0 Then fieldData = " - "
Response.Write("<td align=center>" & fieldData & "</td>")

fieldData = rs("software") & ""
If Len(fieldData) = 0 Then fieldData = " - "
Response.Write("<td align=center>" & fieldData & "</td>")

fieldData = rs("sofcd") & ""
If Len(fieldData) = 0 Then fieldData = " - "
Response.Write("<td align=center>" & fieldData & "</td>")

fieldData = rs("version") & ""
If Len(fieldData) = 0 Then fieldData = " - "
Response.Write("<td align=center>" & fieldData & "</td>")

fieldData = rs("vendor") & ""
If Len(fieldData) = 0 Then fieldData = " - "
Response.Write("<td align=center>" & fieldData & "</td>")

rs.movenext
loop
%>

Mateen
 
Old November 19th, 2003, 04:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

How is your table defined? If its a set width in pixels it may be that some columns are outside the page width, so they get clipped. Try using a proportonal width, like <table width="85%">.

Also, don't you need Response.Write("</tr>") before rs.movenext?

This is more of an HTML question than a SQL Server one.
 
Old November 22nd, 2003, 12:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks

Quote:
quote:Originally posted by pgtips
 How is your table defined? If its a set width in pixels it may be that some columns are outside the page width, so they get clipped. Try using a proportonal width, like <table width="85%">.

Also, don't you need Response.Write("</tr>") before rs.movenext?

This is more of an HTML question than a SQL Server one.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Report print set-up lryckman Access 4 February 25th, 2008 09:04 AM
how to print sub report NagarajuK Crystal Reports 0 December 3rd, 2007 10:05 AM
Print Crystal Report, ASP s2elise Classic ASP Basics 0 November 1st, 2004 10:38 AM
print report lazio Crystal Reports 0 November 1st, 2004 08:38 AM
print a report from the server Filipa Crystal Reports 3 September 25th, 2003 10:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.