52
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 153
Here is the {@
PDF_Form_Field} formula from the sample report at:
www.milletsoftware.com/Download/Visual_CUT_9_PDF_Form_Tag.rpt
// Make the font size small (even 1 point). Text must stay in formula boundaries in SINGLE line!
// Turn the font color to White to make the formula invisible. Or, if PDF_Tags_Delete_Default in
// DataLink_Viewer.ini is True, tag text is removed automatically after processing.
// Location (top left corner) of the rendered formula instance control location of pdf form field.
// The formula always starts with "#Form_Tag::" and ends with "#"
"#Form_Tag::" +
"350;50" + "||" + // field boundaries in points: width;height (or shift_x;shift_y;width;height)
{Product_Type.Product Type Name} + "_Comments" + "||" + // UNIQUE title of form field
"TEXT" + "||" + // type of form field: TEXT/DropDown/CheckBox/Submit_Button
"0" + "||" + // max number of allowed characters. Set to "0" if no restriction.
"NotComb" + "||" + // "Comb" or "NotComb" field (if Comb, specify max number of characters
// above to create an equally spaced "comb" field effect)
"Left" + "||" +
// alignment: "Left", "Center" or "Right"
"1;Inset;0;0" + "||" + // Field Border: line width;style (Solid, Dashed, Beveled, or Inset);
// length of dash;length of dash space
"230;230;230" + "||" +
// Border color using RGB (0;0;128 = Navy Blue)
"255;255;255" + "||" + // Background Color ("255;248;220" = cornsilk1, "255;255;255" = White)
"0;0;0" + "||" +
// Text Color ((0;0;0 = Black)
// Possible font types
: Courier, CourierBold, CourierBoldItalic, CourierItalic
// Helvetica, HelveticaBold, HelveticaBoldItalic, HelveticaItalic
// TimesRoman, TimesBold, TimesItalic, TimesBoldItalic
"CourierBold;10" + "||" + // Font type and size
// Initial Field Text Value (Use "" to specify an empty field)
iif({Product_Type.Product Type Name} in ["Saddles", "Locks"], "", "Comments on the
information for " + {Product_Type.Product Type Name} + ": ") + "||" +
"NoScroll" + "||" + // Scroll or NoScroll
"MultiLine" + "||" + // SingleLine or MultiLine
"SpellCheck" + "||" + // SpellCheck or NoSpellCheck
// --- new options in 6.2002: ---
// tool tip shown when hovering over field. Use "Same_As_Text" to display Field Text value
"Product Type Comments [Mandatory if Action is 'Meeting' or 'Conference Call']" + "||" +
"False" + "||" + // Read Only status. If True, user can see but not change the value
"False" + // Hide Field? Useful when user should not see a submitted value
"#" // The formula always ends with "#"
VC removes pdf processing tags from the pdf file (after processing) if PDF_Tags_Delete_Default
under the [Options] section of DataLink_Viewer.ini is left as True. To ensure all tags are removed,
use Replace() to change double quotes into single. For example, the form field title can be:
Replace({Product_Type.Product Type Name},"""","'") + "_Comments"
To accommodate more text in the tag, you may embed references to fields/formulas in it.
To specify child form fields, specify a title of Parent_Field_title.Child_Field_Title.