SQL Server Performance

How to get error code from Custom Code

Discussion in 'SQL Server Reporting Services' started by jmk_98513, Aug 17, 2004.

  1. jmk_98513 New Member

    I have added the custom code below to my report and am trying to call it with this code

    Everything compiles, but I get an #Error instead of the expected string.
    The code works in a standard ASP.NET page without issue. Is anyone aware of a way to return the actual error code that is being generated?



    Declare Sub BarcodeEAN8 Lib "barcode.dll" ( _
    ByVal FontString As String, _
    ByVal ProductCode As String)

    Public Function AzaleaEAN8(ByVal ProductCode As String) As String

    If Len(ProductCode) = 7 Then
    Dim outBuff As String

    'A resonable buffer size
    outBuff = Space(15)

    BarcodeEAN8(outBuff, ProductCode)

    AzaleaEAN8 = outBuff
    AzaleaEAN8 = ""
    End If

    End Function

Share This Page