Results 1 to 10 of 10

Thread: [RESOLVED] [2005] Hi, how to create automatically pdf report based on crystal report data

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2007
    Posts
    839

    Resolved [RESOLVED] [2005] Hi, how to create automatically pdf report based on crystal report data

    hi, based on the data displayed in the crystal report...
    i wanted to automatically make it as pdf report..

    codes below is work perfectly.. how could i create a .pdf report when i click create pdf button and save it to c: drive how to do..?

    here is my codes:
    Code:
     Private Sub ConnectionPrint()
            If cnReport.State = ConnectionState.Closed Then
                cnReport = New OleDbConnection
                cnReport.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Data\RSODB.mdb;User Id=admin;Password=;"
                cnReport.Open()
            End If
    
        End Sub
    
       Private Sub GetRecords() '(ByVal myRSONOfilter As String)
            myRSONOfilterReport = Me.TextBox1.Text
            dsReport.Clear()
            dsReport = New DataSet
            daReport = New OleDbDataAdapter("Select * from FinalReportV2 where RSONO=" & myRSONOfilterReport & "", cnReport)
            daReport.Fill(dsReport, "FinalReportV2")
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Priview.Click
    
            ConnectionPrint()
            GetRecords()
    
            ' Fill the DataSet.
            daReport.Fill(dsReport)
    
            ' Make a report and bind the DataSet to it.
            Dim rpt As New CrystalFinalOff
            rpt.SetDataSource(dsReport)
    
            ' Bind the viewer to the report.
            CrystalReportViewer1.ReportSource = rpt
            'CrystalReportViewer1.PrintReport()
    
        End Sub
    Please help...
    Last edited by edgarbenilde; Jul 30th, 2008 at 01:51 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width