Skip to content

Use the DOCVARIABLE field to provide additional information which is dependent on the value of a merged field.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/wpf-richedit-use-docvariable-fields

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DXRichEdit for WPF: How to use document variable (DOCVARIABLE) fields

This example illustrates the use of a DOCVARIABLE field to provide additional information which is dependent on the value of a merged field.

Implementation Details

This technique is implemented so each merged document contains geocoordinates for a location that corresponds to the current data record.

Note

We do not provide code for retrieving geocoding and weather information, empty data are returned instead. You can implement a custom geocoordinate and weather information provider.

The location is represented by a merge field. It is included as an argument within the DOCVARIABLE field. When the DOCVARIABLE field is updated, the Document.CalculateDocumentVariable event is triggered. A code within the event handler obtains the information on geocoordinates. It uses e.VariableName to get the name of the variable within the field, e.Arguments to get the location and returns the calculated result in e.Value property. The MailMergeRecordStarted event is handled to insert a hidden text indicating when the document is created. To display hidden text and all non-printing characters, use the CTRL-SHIFT-8 key combination. The MyProgressIndicatorService class is implemented and registered as a service to allow progress indication using the ProgressBar control.

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use the DOCVARIABLE field to provide additional information which is dependent on the value of a merged field.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages