Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power bi report builder error

when i am using custom code 

for localizing Data 

Public Function GetLocalizedValue(name as String, culture as String) as String
Try
Return PDSReports.LocalizedValue.GetString(TRIM(name), TRIM(culture) )
Catch ex As Exception
Return ex.Message
End Try
End Function

 

i got error like-

There is an error on line 2 of custom code: [BC30451] 'PDSReports' is not declared. It may be inaccessible due to its protection level.

 

i tried so many solutions ... guide me if you know some reference about it...thanks in advance  ...#powerbireportbuilder

1 REPLY 1
d_gosbell
Super User
Super User

Where did you get this code? It's not valid VBA code, there is no built-in PDSReports object in paginated reports.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.