Data Dynamics Reports Online Help
Adding Code
See Also Support Forum
User Guide > How-To Section > Adding Code

Glossary Item Box

Add custom code to a report to make it available for use in expressions.

To add code

  1. On the Code tab of the report, enter your custom code in the provided text box using instance based Visual Basic .NET. For example:
    Function CalcDiscount (x As Double, y As Double, z As Double) As Double
    	Dim disc As Double
    	disc = (x * y * z)
    	Return disc
    End Function
  2. On the Layout tab of the report, use your custom code in report item expressions with syntax like the following.
    =Code.CalcDiscount(Fields!Quantity.Value, Fields!Price.Value, Fields!Discount.Value)

See Also

©2010. GrapeCity, inc. All Rights Reserved.