Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

custom code function error [BC30451] 'Test' is not declared. it may be inaccessible due to its protection level.

$
0
0

looking at custom code facility in RS 2012

using tutorial from  http://www.sql-server-performance.com/2011/custom-code-ssrs-reporting-services-2008-r2/

This is the function in report/report properties

Public Shared Function Test(ByVal profit As Decimal) As String
        Dim st As String
        If profit >= 1000 Then
            st = "High Profit"
        ElseIf profit >= 500 Then
            st = "Moderate Profit"
        Else
            st = "Average Profit"
        End If
        Return st
   End Function

This the expression calling function

= Test(fields!ProductProfit.Value)

error.

"The value expression for the textrun 'textbox12.paragraphs[0].textruns[0] contains an error:[BC30451] 'Test' is not declared. it may be inaccessible due to its protection level."


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>