Type | Description | |||
Key as Variant | A string or a numeric expression that indicates an unique key for the extra caption being added or removed. If missing, or empty, whole extra captions are removed. | |||
Caption as Variant | A string expression that indicates the extra caption. If missing, or empty, the extra caption with the Key is removed. | |||
Position as Variant | A PositionEnum expression that indicates the position of the extra caption in the page. If missing, the exFooter value is used ( extra caption is displayed on the bottom of the page ) | |||
Alignment as Variant | A AlignmentEnum expression that indicates the alignment of the extra caption in the page. If missing, the exLeft value is used ( extra caption is displayed on the left margin ). |
The following screen shot shows where he caption mat be displayed:
Starting from the version 15.0, the Caption property and Caption parameter of ExtraCaption method supports expressions, that can defines the HTML caption of each page based on different fields such as index of the page, total number of pages, the index of the object being printed / previewed, the index of the page relative to the object being printed, and the number of relative pages. If the Caption's expression is not valid, the Caption itself is displayed as HTML, be replacing the <%page%> and <%count%> fields with the current page, and number of pages, as explained on the bottom of the this page.
The Caption property / parameter supports the following keywords:
This property/method supports predefined constants and operators/functions as described here.
For instance, Caption can be ( as a valid-expression ):
For instance, Caption can be ( as a non-expression ):
Currently, the ExtraCaption property may include the following built-in HTML tags:
or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:
Also the ExtraCaption property supports the following predefined values:
The following VB sample adds an extra caption to the bottom of the page that shows the current date:
With Print1 .ExtraCaption "Date", Date, EXPRINTLibCtl.PositionEnum.exFooter, EXPRINTLibCtl.AlignmentEnum.exLeft End With
The following VB sample adds three extra fields to the page:
With Print1 .ExtraCaption "A", "Header-Right", EXPRINTLibCtl.PositionEnum.exHeader, EXPRINTLibCtl.AlignmentEnum.exRight .ExtraCaption "B", "Header-Left", EXPRINTLibCtl.PositionEnum.exHeader, EXPRINTLibCtl.AlignmentEnum.exLeft .ExtraCaption "C", "Footer-Left", EXPRINTLibCtl.PositionEnum.exFooter, EXPRINTLibCtl.AlignmentEnum.exLeft End With
The following C++ sample adds an extra caption to the bottom of the page that shows the current date:
COleDateTime date = COleDateTime::GetCurrentTime(); COleVariant vtDate; V_VT( &vtDate ) = VT_DATE; V_DATE( &vtDate ) = date.m_dt; m_print.ExtraCaption( COleVariant("Date"), vtDate, COleVariant((long)1/*EXPRINTLibCtl.PositionEnum.exFooter*/), COleVariant((long)0/*EXPRINTLibCtl.AlignmentEnum.exLeft*/) );
The following VB.NET sample adds an extra caption to the bottom of the page that shows the current date:
With AxPrint1 .ExtraCaption("Date", DateTime.Today, EXPRINTLib.PositionEnum.exFooter, EXPRINTLib.AlignmentEnum.exLeft) End With
The following C# sample adds an extra caption to the bottom of the page that shows the current date:
axPrint1.ExtraCaption("Date", DateTime.Today, EXPRINTLib.PositionEnum.exFooter, EXPRINTLib.AlignmentEnum.exLeft);
The following VFP sample adds an extra caption to the bottom of the page that shows the current date:
with thisform.Print1 .ExtraCaption("Date",Date(),1,0) endwith