Data Dynamics Reports Online Help
Creating an Instance Method
See Also Support Forum
User Guide > How-To Section > Creating an Instance Method

Glossary Item Box

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

  1. Create a custom assembly.
  2. 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).
  3. 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.
  4. 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).
  5. Under Instance name, enter the name you want to use in your expressions.
  6. Click the Accept icon to accept the changes and close the smart panel.

To use an instance method in an expression

  1. In the Value property of a textbox, enter an expression like the following:
    =Code.InstanceName.Method(parameter)
    For example:
    =Code.Inv.GetTax("CA")

See Also

Reference
Custom Code

©2010. GrapeCity, inc. All Rights Reserved.