Forum Discussion
error: [BC30451] - paginated report
- 2 years ago
Hi, Maaaaaaaax
The error BC30451 means that you are trying to use a variable or a class that is not declared or not accessible in your code. To fix this, you need to make sure that you have declared the variable or the class with the correct scope and visibility, and that you have imported the necessary namespaces or assemblies.
One possible cause of this error is that you are using a custom code block in your report definition, and you have not declared the Code variable. The Code variable is a special variable that represents the custom code block, and it must be declared as Public Shared in the report properties. For example:
Public Shared Function GetTotal (ByVal value As Decimal) As Decimal Return value * 1.1 End Function
To declare the Code variable, open the Report Properties dialog box, click References, and add the following line in the Declarations section:
Public Shared Code As Object
This will allow you to use the Code variable in your expressions, such as =Code.GetTotal (Fields!Sales.Value).
For more information on how to use custom code in paginated reports, please refer to this article.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Maaaaaaaax
The error BC30451 means that you are trying to use a variable or a class that is not declared or not accessible in your code. To fix this, you need to make sure that you have declared the variable or the class with the correct scope and visibility, and that you have imported the necessary namespaces or assemblies.
One possible cause of this error is that you are using a custom code block in your report definition, and you have not declared the Code variable. The Code variable is a special variable that represents the custom code block, and it must be declared as Public Shared in the report properties. For example:
Public Shared Function GetTotal (ByVal value As Decimal) As Decimal Return value * 1.1 End Function
To declare the Code variable, open the Report Properties dialog box, click References, and add the following line in the Declarations section:
Public Shared Code As Object
This will allow you to use the Code variable in your expressions, such as =Code.GetTotal (Fields!Sales.Value).
For more information on how to use custom code in paginated reports, please refer to this article.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.