Report Name Extension Replacement

If your report contains the parameter Globals!ReportName and you decided to move this report from SharePoint to Native Mode it is very likely that you have to add &”.rdl” to the end since Globals!ReportName does not contain the extension in Native Mode.

For the report to work on both environments add the following code under Report Properties > Code

Public Function ReportExtension(ByVal ReportName As String) As String
        If Not ReportName.ToLower.Contains(".rdl") Then
            ReportName += ".rdl"
        End If
        Return ReportName
    End Function

Then just call it by using the code


by william Mendoza

Related Posts

Comments are closed.