Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3458

Re: How to export crystal report directly from SAP Business One to rpt format via API

$
0
0

Hi Martin,

This is how I did it in VB.Net

    Public Sub GetCrystalReportFile(ByVal RDOCCode As String, ByVal outFileName As String)        Try            Dim oBlobParams As SAPbobsCOM.BlobParams = oCompany.GetCompanyService().GetDataInterface(SAPbobsCOM.CompanyServiceDataInterfaces.csdiBlobParams)            oBlobParams.Table = "RDOC"            oBlobParams.Field = "Template"            Dim oKeySegment As SAPbobsCOM.BlobTableKeySegment = oBlobParams.BlobTableKeySegments.Add()            oKeySegment.Name = "DocCode"            oKeySegment.Value = RDOCCode            Dim oBlob As SAPbobsCOM.Blob = oCompany.GetCompanyService().GetBlob(oBlobParams)            Dim sContent As String = oBlob.Content            Dim buf() As Byte = Convert.FromBase64String(sContent)            Using oFile As New System.IO.FileStream(outFileName, System.IO.FileMode.Create)                oFile.Write(buf, 0, buf.Length)                oFile.Close()            End Using        Catch ex As Exception            Throw ex        End Try    End Sub

Hi Maik Delly,

Just wondering, the SaveBlobToFile, does not specify any file location,

Where does this saved to ?

 

Regards

Edy


Viewing all articles
Browse latest Browse all 3458

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>