Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Expression Editor - How to implement a custom New Line and Format functions

$
0
0

This example demonstrates how to implement custom functions for the Expression Editor available in the WinForms End-User Report Designer. In this example, we implement two custom functions.

1. The new line function allows you to insert a new line at the required place in a string. This function uses the Environment.NewLineconstant, which returns a new line string defined for the current environment. Note that to make the label recognize this string as a line break, the XRLabel.Multiline option must be enabled.

2. The CustomFormatFunc(string format, object arg0) accepts a format string and a value that should be formatted. In this function's Evaluate method, we're using the String.Format Method (String, Object) method. By using this function, you can format a static string and/or a field / calculated field value. 

See also:
Implementing Custom Functions 
How to: Implement a Custom Criteria Language Operator 
String.Format Method


Viewing all articles
Browse latest Browse all 7205

Trending Articles