using crystalreport generate PDF--2

    Dim rpt As New ReportDocument
            Dim DirPath As String = Application.StartupPath & "\"

            Dim DataSet1 As DataSet
            DataSet1 = New Xsd_Invoice
            DataSet1.Tables("Students").Merge(Invoice.INVOICE_GetStudentInfo_One _
            (FamilyID))
            DataSet1.Tables("tblStudentPaymentInvoice").Merge(Invoice.INVOICE_GetStudentPaymentInvoice_One _
                         (InvoiceID, SessionID))
            DataSet1.Tables("tblStudentPaymentDetailForInvoice").Merge(Invoice.INVOICE_GetStudentPaymentDetail_One _
                         (InvoiceID, SessionID))
            DataSet1.Tables("Parent").Merge(Invoice.INVOICE_GetParentInfo_One _
                         (FamilyID))
            DataSet1.Tables("TblSession").Merge(Invoice.INVOICE_GetSession(SessionID))
            rpt.Load(DirPath & "Report\Rpt_StudentFeeInvoice.rpt")
            rpt.SetDataSource(DataSet1)

            '-----开始导出PDF-------
            rpt.ExportToDisk(ExportFormatType.PortableDocFormat, path)
posted @ 2012-06-04 12:59  zyip  阅读(130)  评论(0编辑  收藏  举报