You can create instance methods that draw on your custom C# or Visual Basic assemblies and use them in expressions in your reports.
To create an instance method
- Create a custom assembly.
- Make the assembly available to the report definition by saving a copy of it in the Data Dynamics Reports Assemblies folder (C:\Program Files\Data Dynamics\Reports\Build Number\Assemblies).
- Add an assembly reference to the report.
- From the Report menu, choose Report Properties to open the Report smart panel.
- On the References page under Assemblies, add your assembly using the Add icon.
- On the References page under Classes, enter the namespace and class name (for example, if you have an Invoicing assembly which contains a Tax class, you would enter Invoicing.Tax under Class name).
- Under Instance name, enter the name you want to use in your expressions.
- Click the Accept icon to accept the changes and close the smart panel.
To use an instance method in an expression
- In the Value property of a textbox, enter an expression like the following:
=Code.InstanceName.Method(parameter)
For example:=Code.Inv.GetTax("CA")
Reference
Custom Code