Results 1 to 3 of 3

Thread: Problem printing report!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2006
    Posts
    106

    Problem printing report!

    Im using ADO connection, Visual Basic 6 and Crystal Reports 4.6.

    Im trying to print some reports but nothing happens and dont give me any error.

    This is my code:

    VB Code:
    1. Private Sub cmdImprimir_Click()
    2.  
    3. Dim rsRecordSet As Recordset
    4. Set rsRecordSet = New Recordset
    5.  
    6. Formula = "{Facturas.Id_Factura} =" & Val(lblFact.Caption)
    7.  
    8. If (Val(lblIVA.Caption) = 5) And (Val(lblImprimir.Caption) = False) Then
    9.  
    10.     frmImprimir.Show
    11.     frmImprimir.Hide
    12.    
    13.     CrystalReport2.ReportFileName = App.Path & "\facturaio.rpt"
    14.     CrystalReport3.ReportFileName = App.Path & "\facturaid.rpt"
    15.     CrystalReport4.ReportFileName = App.Path & "\facturaivat.rpt"
    16.     CrystalReport5.ReportFileName = App.Path & "\reciboio.rpt"
    17.  
    18. End If
    19.  
    20. If (Val(lblIVA.Caption) <> 5) And (Val(lblImprimir.Caption) = False) Then
    21.  
    22.     frmImprimir.Show
    23.     frmImprimir.Hide
    24.    
    25.     CrystalReport2.ReportFileName = App.Path & "\facturao.rpt"
    26.     CrystalReport3.ReportFileName = App.Path & "\facturad.rpt"
    27.     CrystalReport4.ReportFileName = App.Path & "\facturat.rpt"
    28.     CrystalReport5.ReportFileName = App.Path & "\reciboo.rpt"
    29.  
    30. End If
    31.  
    32. CrystalReport2.SelectionFormula = Formula
    33. CrystalReport3.SelectionFormula = Formula
    34. CrystalReport4.SelectionFormula = Formula
    35. CrystalReport5.SelectionFormula = Formula
    36.  
    37. CrystalReport2.PrintReport
    38. CrystalReport3.PrintReport
    39. CrystalReport4.PrintReport
    40. CrystalReport5.PrintReport
    41.  
    42. End Sub

    What i need to setup my crystal report objects manualy(with code and not in the properties)

    Thanks in advance!

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Problem printing report!

    Moved to reporting section

  3. #3
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: Problem printing report!

    Are you sure all reports are connected to the database?
    "The dark side clouds everything. Impossible to see the future is."

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