cancel
Showing results for 
Search instead for 
Did you mean: 

How To Email External Crystal Report PDF In SAP Business One SDK. Add on connection timed out Error.

mk1909_sap
Active Participant
0 Kudos

Hello All,

Greetings !!!

I am Developing Add-on Which Sends Email With Following Two Report Selection Options.

  1. Selection Of Reports Which are Imported in SAP Business One Through Report and Layout Manager. DocCode Will be Used as Selection Parameters. - Its Working Fine.
  2. I had issue In Passing Selection Of Crystal Reports Path Which are not Stored in SAP Business One Database.

Kindly Guide me How To Pass Crystal Reports Path Which are not stored in SAP Business One Database.

I am Using Following Code.In Code Its Working Fine.But When I Test Add-on.Add-on connection timed out. Error Message Showing

Public Sub ExportReport(ByVal ReportPath As String, SQLUserName As String, ByVal SQLPassword As String, ByVal ServerName As String, ByVal DBName As String)
        Dim crReportDocument As New ReportDocument()
        Dim Param As Object = 1
        crReportDocument.Load(ReportPath)
        crReportDocument.SetDatabaseLogon(SQLUserName, SQLPassword, ServerName, DBName)
        crReportDocument.SetParameterValue("DocKey@", Param.ToString)
        crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, Left(ReportPath, ReportPath.Length - 4) & ".pdf")
        System.Diagnostics.Process.Start(Left(ReportPath, ReportPath.Length - 4) & ".pdf")
        crReportDocument.Dispose()
    End Sub

DLL's Used in Add-on are email-dlls.jpg and Other Supporting Class is mainclass.txt

Thanks and Regards,

Mahendrakumar

Accepted Solutions (0)

Answers (0)