Gets a dictionary (IDictionary) with replacements
to be made in the report body.
Namespace:
C1.C1ReportAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
[BrowsableAttribute(false)] public IDictionary OverlayReplacements { get; } |
Visual Basic |
---|
<BrowsableAttribute(False)> _ Public ReadOnly Property OverlayReplacements As IDictionary Get |
Remarks
This property is useful when implementing export filters.
Reports that contain page counts or group page counts save special tags in the report body. When the report finishes rendering, these tags need to be replaced with the actual page counts. Filters can get the list of tags and the replacement values using this dictionary. The key-value pairs in the dictionary contain the tags and their replacements.
Examples
The code below shows part of a text filter implementation. The EndReport
method gets the overlay replacement dictionary and calls a ReplaceInStream
method that scans each line in the stream and replaces any keys with the
corresponding values. For example, the total page count would be represented
by a key similar to "#pages#", which would be replaced everywhere in the stream
with the actual page count.
Copy CodeC#
public class MyTextFilter : ExportFilter { // ... override public void EndReport() { // close output stream Layout layout = _ownerReport.GetLayout(); ReplaceInStream(_exportStream, layout.OverlayReplacements); _exportStream.Close(); } } |