Forum Discussion
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
- CVVRFrequent Visitor
Hello Guys,
Any help on this?
We are using the below url to post the rdl file.
https://api.powerbi.com/v1.0/myorg/groups/$GroupId/imports?datasetDisplayName=$fileName&nameConflict=$nameConflictIs there any way to skip the compilation error and continue the upload ?
Thanks
- AnonymousNot applicable
Hi sharvan270,
What type of license are you worked on? As the document said, currently you can only publish the paginated reports to the workspace that hosts in premium capacity.
Publish a paginated report to the Power BI service - Power BI | Microsoft Docs
Regards,
Xiaoxin Sheng