Forum Discussion

sharvan270's avatar
sharvan270
Regular Visitor
4 years ago

Unable to upload paginated report that has custom code to PowerBI portal using PowerShell Script

Unable to upload paginated report that has simple custom code to the PowerBI portal using  the Powershell script.

 

 

 

               Report is invalid. ErrorCode: rsUnexpectedCompilerError, Details: An unexpected error occurred while compiling expressions. Native compiler return value: [BC42105] Function TestFun doesnt return a value on all code paths. A null reference exception could occur at run time when the result is used..

 

The above error is shown for every report we try to upload.

 

 

 

Custom Code:

Public Function TestFun() As String

        Return  "hi"

End Function

 

2 Replies