400分求打印、形
(本想出400分求代,可惜系不。如果有意的外送300分)
求源,有的分享下,,如果不下你也可以mail:cyz_9977@sina.com(附上你的ID,我好分)COPY的上的不要上。
1.我的打印希望能用到CSS(本人一不通),不要把工具打出,就是能控制哪些能打印,哪些不能打印。
2.形我希望是Drawing的方法,而不是“|”西的拼。!
[解决办法]
可以看activerreport或fastreport等第三方组件应该可以的。
[解决办法]
太难了,我不会。
接分...o(∩_∩)o...哈哈
[解决办法]
题外话!好久没上来了,给你代码,你也不能套用上去啊!
1、打印的问题
a)对于2003或者2005可以使用
<object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" width="0">
</object>
加CSS的方法来控制(后面会给部分实例代码)
b)对于2008,可以使用RDLC来做(这个是.net framework 3.5有的)有点类似水晶报表,一般的报表足够应付了。
c)使用WebBrowse的简单例子,注意Style里面的控制部分
- HTML code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default9.aspx.cs" Inherits="Default9" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <style type="text/css"> .tdp { border-top: 2 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000; border-left: 1 solid #000000; border-collapse:collapse; } .tabp { border-top: 0 solid #ffffff; border-right: 0 solid #ffffff; border-bottom: 1 solid #000000; border-left: 1 solid #000000; } </style> <style media="print" type="text/css"> .noprint{display:none;} .PageNext{page-break-after: always;} </style></head><body> <form id="form1" runat="server"> <object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" width="0"> </object> <input type="button" value="打印" onclick="document.all.WebBrowser.ExecWB(6,1)" class="noprint" /> <input type="button" value="直接打印" onclick="document.all.WebBrowser.ExecWB(6,6)" class="noprint" /> <input type="button" value="页面设置" onclick="document.all.WebBrowser.ExecWB(8,1)" class="noprint" /> <input type="button" value="打印预览" onclick="document.all.WebBrowser.ExecWB(7,1)" class="noprint" /> <table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse; width: 500pt; height: 730pt;" bordercolor="#000000" align="center"> <thead style="display: table-header-group"> <tr style="font-weight: bold"> <td style="height: 23px"> This is my body</td> <td style="height: 23px"> This is my body</td> <td style="width: 110px; height: 23px"> This is my body</td> <td style="height: 23px"> This is my body</td> <td style="height: 23px"> This is my body</td> </tr> </thead> <tbody style="page-break-after: always;"> <tr> <td rowspan="2"> This is my body</td> <td> This is my body</td> <td style="width: 110px"> This is my body</td> <td> This is my body</td> <td> This is my body</td> </tr> <tr> <td> This is my body</td> <td style="width: 110px"> This is my body</td> <td> This is my body</td> <td> This is my body</td> </tr> </tbody> </table> </form></body></html>
[解决办法]
2、条码显示的问题
a)如果是一维条码,可以直接定义相关的字体显示,如果害怕客户端没有相关字体,就在服务器上生成图片再显示了(生成图片的代码,现在网络上到处是生成验证码的图片,这样的代码太多了)。
b)对于二维条码(就是一些杂乱无章的点啊、方块啊组成的,Nokia和Intel看到有用,现在的科技手段三维条码还没商业化),暂时我看到网络上有人提供有收费的控件,价格$100多点,免费的暂时没找到。
[解决办法]
快~~~~~
主散分~
接分。。。。。