Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
LINQ Reporting Engine enables you to access the following public (static and instance) members of accessible types (see “Working with Types” for more information) in template expressions:
Note – To access a static member of a type in a template expression, the type must be set known for the engine (see “Setting up Known External Types” for more information).
A function type member can be used in a template expression only if the following additional requirements are met:
The engine supports the following features when dealing with function members:
In addition to C# Language features, the engine provides the following extra features to simplify type member access:
Q: How can I access a static field or method of a Java class inside a LINQ Reporting Engine template?
A: First register the class as a known external type using engine.getKnownTypes().add(ClassName.class). Then you can reference the static member directly in the template, e.g., <<ClassName.StaticField>> or <<ClassName.StaticMethod(arg)>>.
Q: Are instance methods of objects passed to the template callable from the template expression?
A: Yes. If an object is supplied to the engine as a data source, you can invoke its public instance methods directly, such as <<objectInstance.InstanceMethod()>>. The method must be public and return a value.
Q: Can I create a new object inside a template using a constructor?
A: Constructors are supported as long as they are public, have no generic type arguments, and return a value (the new instance). Use the syntax <<new ClassName(arg1, arg2)>> after the type has been added to the known types list.
Q: What restrictions apply to methods used as function members in template expressions?
A: The method must return a value and cannot have generic type parameters. Overload resolution follows the C# Language Specification 5.0 rules, and methods that accept a variable number of arguments (params) are also supported.
Q: Why does the engine report “type must be known” when I try to use a static member?
A: The engine only allows static members of types that have been explicitly added to the known external types collection. Add the type with engine.getKnownTypes().add(YourClass.class) before processing the template.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.