易截截图软件、单文件、免安装、纯绿色、仅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配置文件Web.config

一、认识Web.config文件
Web.config文件是一个XML文本文件,它用来储存 ASP.NET Web 应用程序的配置信息(如最常用的设置ASP.NET Web 应用程序的身份验证方式),它可以出现在应用程序的每一个目录中。当你通过VB.NET新建一个Web应用程序后,默认情况下会在根目录自动创建一个默认的
Web.config文件,包括默认的配置设置 ......

学习asp.net比较完整的流程

如果你已经有较多的面向对象开发经验,跳过以下这两步:
  第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是一个全面向对象的技术,不懂OO,那绝对学不下去!
  第二步 对.NET Framework类库有一定的了解 可以通过开发Windows Form应用程 ......

ASP.NET播放视频文件

///C#中的媒体播放类
using System;
namespace ConfigTools
{
/// <summary>
/// PlayClass 的摘要说明。
///原作CSDN,经本人稍加修改
/// </summary>
public class PlayClass
{
public PlayClass()
{
......

asp.net超链接传值问题

最近开发中在页面之间传递值的过程中,多处应用了超链接传值的方式。但是当传递的参数中含有中文字符时,在调用Request.QueryString[]方法接收参数时,总是出现错误,而且错误的出现总是随机的。表现为接收的中文参数不全,后加通配符“?”,或者把中文参数后的那个参数和中文参数混在一起,不加区分。
 & ......

asp.net + jquery+json 的简单实例

这里是我的一个简单的jquery+json的连库操作,只是一个简单查询,
//后台代码
<%@ WebHandler Language="C#" Class="show" %>
using System;
using System.Web;
using System.Collections.Generic;
using Model;
using DAL;
using System.Web.Script.Serialization;
public class show ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号