一般步驟:

1. 新建一個xsd,把table/view拖进来,会生成一个dataadapter,修改其sql,获得你需要的数据

2.新建一个rpt,数据源选择刚才新建的xsd,把字段拖到合适的位置。

3. 新建一个aspx页面,后台代码

        Dim rpt As New RptCustomer
        Dim da As New DsRptCustomerTableAdapters.Sale_by_CustomerTableAdapter
        Dim ds As New DsRptCustomer

        da.FillByCustomerID(ds.Tables(0), Request("CustomerID"))
        rpt.SetDataSource(ds)

        rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, "")

 

posted on 2008-10-23 12:49  Gu  阅读(841)  评论(4编辑  收藏  举报