cancel
Showing results for 
Search instead for 
Did you mean: 

The database DLL 'crdb_b1.dll' could not be loaded on clients

Former Member
0 Kudos

Hi Experts,

         I am trying to export the Crystal report using the following source code.

Try

            Dim objRecSet As SAPbobsCOM.Recordset

            Dim strSQL, strFolder As String

            Dim objFSO

            Dim CryRpt As ReportDocument

            CryRpt = New ReportDocument

            objRecSet = objSBOAPI.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

            strSQL = "select * from [@ZAM_SRVPSWD]"

            objRecSet.DoQuery(strSQL)

            If objRecSet.RecordCount > 0 Then

                strFolder = objRecSet.Fields.Item("U_Path").Value

                objFSO = CreateObject("Scripting.FileSystemObject")

                    CryRpt.Load("Voucher.rpt")

                    Dim crParameterDiscreteValue As ParameterDiscreteValue

                    Dim crParameterFieldDefinitions As ParameterFieldDefinitions

                    Dim crParameterFieldLocation As ParameterFieldDefinition

                    Dim crParameterValues As ParameterValues

                    crParameterFieldDefinitions = CryRpt.DataDefinition.ParameterFields

                    crParameterFieldLocation = crParameterFieldDefinitions.Item("DocKey@")

                    crParameterValues = crParameterFieldLocation.CurrentValues

                    crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue

                    crParameterDiscreteValue.Value = objform.Items.Item("Item_4_U_G").Specific.value

                    crParameterValues.Add(crParameterDiscreteValue)

                    crParameterFieldLocation.ApplyCurrentValues(crParameterValues)

                    Dim crtableLogoninfos As New TableLogOnInfos

                    Dim crtableLogoninfo As New TableLogOnInfo

                    Dim crConnectionInfo As New ConnectionInfo

                    Dim CrTables As Tables

                    Dim CrTable As Table

                    With crConnectionInfo

                        .ServerName = objSBOAPI.oCompany.Server

                        .DatabaseName = objSBOAPI.oCompany.CompanyDB

                        .UserID = objRecSet.Fields.Item("U_username").Value

                        .Password = objRecSet.Fields.Item("U_password").Value

                    End With

                    CrTables = CryRpt.Database.Tables

                    For Each CrTable In CrTables

                        crtableLogoninfo = CrTable.LogOnInfo

                        crtableLogoninfo.ConnectionInfo = crConnectionInfo

                        CrTable.ApplyLogOnInfo(crtableLogoninfo)

                    Next

                    Dim CrExportOptions As ExportOptions

                    Dim CrDiskFileDestinationOptions As New  _

                    DiskFileDestinationOptions()

                    Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions()

                    Dim strNo As String = objform.Items.Item("Item_4_U_G").Specific.value

                    Dim strFolderPath As String

                    strFolderPath = strFolder & "\" '+"\" + objRecSet.Fields.Item("CardName").Value &"\"

                    If Not objFSO.FolderExists(strFolderPath) Then

                        objFSO.CreateFolder(strFolderPath)

                    End If

                    CrDiskFileDestinationOptions.DiskFileName = _

                                         strFolderPath + strNo & ".pdf"

                    CrExportOptions = CryRpt.ExportOptions

                    With CrExportOptions

                        .ExportDestinationType = ExportDestinationType.DiskFile

                        .ExportFormatType = ExportFormatType.PortableDocFormat

                        .DestinationOptions = CrDiskFileDestinationOptions

                        .FormatOptions = CrFormatTypeOptions

                    End With

                    CryRpt.Export()

                    Dim strPDFFileName As String

                    strPDFFileName = strFolderPath + strNo & ".pdf"

                    releaseObject(CryRpt)

                    GC.Collect()

                End If

                    Catch ex As Exception

            objSBOAPI.SBO_Appln.MessageBox(ex.ToString)

        End Try

When I execute the addon on the client of the server the report successfully exported, but when is executed on a client I am getting the Error:          "The database DLL 'crdb_b1.dll' could not be loaded" At the CryRpt.Export() command

We have already check the threat The database DLL 'crdb_b1.dll' could not be loaded | SCN

We are using

SAP Business One 9.0 PL: 13 and Crystal Report 2013

Please Advice

Kind regards
Vasilis Korolis

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Moved to the B1 forum

Are you using the CR 2013 downloaded from B1 Site? If not that would be why. Standard CRD versions do not install that driver.

Don

Former Member
0 Kudos

Dear Don,

Thank you for your reply,

We are using Crystal Reports 2013 and we have already installed the (Support Pack 15 v.13.0.15.1840) .msi according to this link

Kind Regards

Vasilis Korolis

0 Kudos

Ah,

CR for VS does not include any of the B1 DB drivers. Nor does B1 include the 32 bit runtime on the client install.

B1 Team may be able to get you working, You also need to use the same version of the runtime as what B1Server is using.

Don