易截截图软件、单文件、免安装、纯绿色、仅160KB

Automatically Printing Crystal Reports in ASP.NET


This server-based method is documented in the Visual Studio help files.  Open the Help Index, and enter PrintToPrinter in the "Look for:" box.  The syntax for this method is:
Report.PrintToPrinter(<copies as int>, <collated as True/False>, <startpage as int>, <endpage as int>)
'Collated' in this context has nothing to do with database collation.  Some advanced printers (like copier/printers) will sort each document into its own shelf.  Not every printer supports this functionality, so check the printer dialog before setting to true.  To print the entire report, set startpage and endpage each to 0. 
An example in use might look like
MyReport.PrintToPrinter(1,False,0,0)
One limitation of this method is that a printer name must be specified.  You can set the default printer at design time in the report, and you can change the printer name at run time by setting the ReportDocument.PrintOptions.PrinterName property (the PrintOptions are also where you can assign page margins, portrait/landscape, etc.).  Keep in mind that this method prints from the server itself, not from the client machine.  This means that any printer you wish to use must be accessible from the server.  You cannot print to a client's desktop printer using this method unless that printer is shared on the network and mapped to the server.
If your LAN has networked printers, you can make some guesses as to which printer to assign as the default in each report.  For instance, if the Accounting Department has a departmental printer, that would be a good choice to use for the default in an accounting report.  You can provide users the option to choose a networked printer by enumerating the printers mapped to the server and populating a drop-down list.  The PrinterSettings.InstalledPrinters property returns a collection of installed printers, and can be bound to a DropDownList as below.


相关文档:

asp.net学习步骤


第一步 掌握一门。NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是一个全面向对象的技术,不懂OO,那绝对学不下去!
第二步 对。NET Framework类库有一定的了解 可以通过开发Windows Form应用程序来学习。NET Framework。ASP.NET是建构在。NET Framework之 ......

ASP.NET面试题(一)

SP.NET面试题
(转 原文地址http://blog.sina.com.cn/s/blog_524c848901009e7b.html~type=v5_one&label=rela_nextarticle 作者
李洋的博客
http://blog.sina.com.cn/liiyang)
1. 简述 private、 protected、 public、 internal 修饰符的访问权限。
答 . private : 私有成员, 在类的内部才可以访问。
prote ......

ASP.NET MVC 入门3、Routing

在一个
route
中,通过在大括号中放一个占位符来定义
(
{ and } )
。当解析
URL
的时候,符号
"/"

"."
被作为一个定义符来解析,而定义符之间的值则匹配到占位
符中。
route
定义中不在大括号中的信息则作为常量值。
下面是一些示例
URL


Valid route definitions
Example ......

ASP.NET页面传值的方法


在面试的时候,经常会遇到这样的问题,其实我们会对其中的几种方法比较熟悉,因为项目中经常使用。但是要全面的回答ASP.NET中页面传值的方式,估计往往很难全面。
一.
使用QueryString变量
    QueryString是一种非常简单也是使用比较多的一种传值方式,但是它将传递的值显示在浏览器的地址栏中,如果是传递一个或 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号