Autor Tema: Error en Crystal REport  (Leído 1662 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Bazooka

  • Terabyte
  • *****
  • Mensajes: 951
  • Reputación: +31/-20
  • El pibe Bazooka
    • Ver Perfil
    • Desof sistemas
Error en Crystal REport
« en: Diciembre 15, 2012, 07:48:27 pm »
Hola amigos tengo este code y en mi PC y en algunas donde instalo el programa anda bien pero en otras me tira el error  y no puede entender por que por que incluso le instalo el Crystal report a la pc donde no anda y sigue haciendo lo mismo:

Código: [Seleccionar]
    Dim strSelFormula As String, strTitle As String
   
    GenerateDSN

    With MAIN.CR
        .Reset: MAIN.InitCrys
       
        If obRecToPrint(0).Value = True Then
            .ReportFileName = App.Path & "\Reports\rptCustomer.rpt"
        Else
            .ReportFileName = App.Path & "\Reports\rptCustomerWB.rpt"
        End If

        .Connect = "DSN=" & App.Path & "\rptCN.dsn;PWD=*******"
   
        If obPrintOp(1).Value = True Then
            strSelFormula = "{tbl_AR_Customer.VanFK}=" & dcVan.BoundText
            strTitle = "LISTADO DE CLIENTES (" & dcVan.Text & ")"
        Else
            strTitle = "LISTADO DE CLIENTES"
        End If
       
        If chkNew.Value = 1 Then
            If strSelFormula = "" Then
                strSelFormula = "{tbl_AR_Customer.Status}='Nuevo'"
            Else
                strSelFormula = strSelFormula & " AND {tbl_AR_Customer.Status}='Nuevo'"
            End If
           
            strTitle = "NUEVOS " & strTitle
        End If
       
        If obRecToPrint(1).Value = True Then
            strSelFormula = Replace(strSelFormula, "tbl_AR_Customer", "qry_AR_CustomerWB")
        End If

        .SelectionFormula = strSelFormula
   
        .WindowTitle = strTitle

        .ParameterFields(0) = "prBussAddr;" & CurrBiz.BUSINESS_ADDRESS & ";True"
        .ParameterFields(1) = "prmBussContact;" & CurrBiz.BUSINESS_CONTACT_INFO & ";True"
        .ParameterFields(2) = "prmTitle;" & strTitle & ";True"
           
        .PageZoom 100
        .Action = 1
    End With

    RemoveDSN
   
    strSelFormula = vbNullString: strTitle = vbNullString

cuando llega a la linea .Action = 1

me da un El error “20599 Cannot open SQL Server”
« última modificación: Diciembre 16, 2012, 07:26:03 am por Bazooka »
Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las mismas cosas.