home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Super Store 3.0 / TESTDRIVE_3.ISO / jetform / examples.txt < prev    next >
Encoding:
Text File  |  1994-02-24  |  12.2 KB  |  356 lines

  1. INTRODUCTION
  2. ============
  3.  
  4. The examples included with JetForm Design are intended 
  5. to help forms designers and applications developers 
  6. explore the possibilities available in JetForm forms. 
  7. This file explains some of the main items presented in
  8. the examples.
  9.  
  10. EXAMPLES
  11. ========
  12.  
  13. E 1. FILLER  - EX_E_1 - E-mail Example - DBFetch / 
  14. Responses / Routing
  15.  
  16. F 1. FILLER  - EX_F_1 - Calculations using functions
  17. for Date Arithmetic.
  18.  
  19. F 2. FILLER  - EX_F_2 - Complex Calculations - Expense 
  20. Form
  21.  
  22. F 3. FILLER  - EX_F_3 - Complex Calculations - 
  23. Demonstration Form
  24.  
  25. THE JFMERGE PRODUCT does not come with JetForm Design. 
  26. It is sold separately and runs on many platforms. It is 
  27. used to integrate JetForm Electronic Forms Printing 
  28. with existing applications. These examples require 
  29. JFMERGE.
  30.  
  31. M 1. JFMERGE - EX_M_1 - Field Mode / Comma Delimited 
  32. Mode / Record Mode
  33.  
  34. M 2. JFMERGE - EX_M_2 - Subforms - Field Mode
  35.  
  36. M 3. JFMERGE - EX_M_3 - Subforms - Field / Record Mode
  37.  
  38.  
  39. IMPORTANT NOTE:
  40.  
  41. For all of these examples you can benefit from opening 
  42. the source form file (.ifd) from within JetForm Design and 
  43. looking at the drawing objects, especially the field 
  44. attributes. If you select the File Menu and choose the 
  45. REPORT ON FIELDS, JetForm will produce an informative 
  46. report and invoke the Windows Note Pad program where 
  47. you can browse the information or print it.
  48.  
  49. JetForm also provides a utility program - JFINFO - as 
  50. part of the JetForm Design product. This program can be run 
  51. from DOS. Invoking this program without  parameters 
  52. will display all of the command line options. Run this 
  53. program providing it the name of an [.mdf] file with 
  54. the -RF option will produce good information about the 
  55. fields and pages of a form. For example:
  56.  
  57.     JFINFO EX_*.MDF -RF
  58.  
  59.  
  60. Details:
  61.  
  62. E 1. E-MAIL   - EX_E_1 - Email Example - DBFetch / 
  63.                          Responses / Routing
  64.  
  65. PURCHASE REQUEST
  66.  
  67. TO INVOKE:  In Windows, select Filler
  68.             On the File Menu, select Open Form
  69.             From the list box, select -> EX_E_11
  70.  
  71. This example is used in the JetForm Filler Getting
  72. Started Manual.
  73.  
  74.  
  75. F 1. JetForm Filler [Graphical User Interface] -> 
  76.                      EX_F_1.MDF
  77.  
  78. TO INVOKE:  In Windows, select Filler
  79.             On the File Menu, select Open Form
  80.             From the list box, select -> EX_F_1
  81.  
  82. The top of this example is a simple form that computes 
  83. the average of 2 years salary increases and 
  84. extrapolates a salary 10 years from now based on the 
  85. 'trend'. This shows these functions:
  86.  
  87. - arithmetic operators - ( * multiplication, / 
  88.   division, + addition, - subtraction )
  89. - AVG - Average
  90. - EXP - Exponentiation
  91. - Field output Pictures - $zzz,zzz
  92.  
  93. The middle section of the form shows date arithmetic 
  94. and the retrieval of the system date. Today's date is 
  95. displayed and then the date 1000 days from today then 
  96. the date 2000 days from today. Functions used:
  97.  
  98.    - Today()
  99.    - DateArith()
  100.  
  101. The main body of the form prompts for names and date of 
  102. birth. The date is expected in the format 'mm/dd/yy'. 
  103. The form then calculates the person's age in days ; 
  104. then computes the day of the week for this year's 
  105. birthday and next year's birthday. The functions used:
  106.  
  107.    - Today()
  108.    - Date2Num() - for valid date checking
  109.    - If()
  110.    - CDow() - day of week
  111.  
  112. To calculate 'Days Old' - the algorithm is
  113.  
  114.    IF the date of birth is a valid date THEN
  115.       date subtract DateOfBirth from Today's Date
  116.    ENDIF
  117.  
  118. To calculate the Day of the Week for 'This Year's 
  119. Birthday' ->
  120.  
  121.    IF the date of birth is a valid date THEN
  122.       Take the month and day portion of DateOfBirth
  123.       combined with the year portion of Today
  124.       Use the CDow function with this new date
  125.    ENDIF
  126.  
  127. To calculate the Day of the Week for 'Next Year's 
  128. Birthday' ->
  129.  
  130.    IF the date of birth is a valid date THEN
  131.       Take the month and day portion of DateOfBirth
  132.       combined with (the year portion of Today) + 1
  133.       Use the CDow function with this new date
  134.    ENDIF
  135.  
  136. F 2. JetForm Filler [Graphical User Interface] -> 
  137.                     EX_F_2.MDF
  138.  
  139. TO INVOKE:  In Windows, select Filler
  140.             On the File Menu, select Open Form
  141.             From the list box, select -> EX_F_2
  142.  
  143. This example is an EXPENSE REPORT. There are many 
  144. techniques shown on this form.
  145.  
  146. F 2.1    Use of the GetProfile() function to retrieve 
  147. User specific (static) information from an (.ini) file 
  148. identified in the calculation. The Company name and 
  149. address are actually retrieved by 'identifier' from a 
  150. file in the Windows directory called JF_EXMPL.INI.
  151.  
  152. We encourage you to edit the JF_EXMPL.INI file (in the 
  153. windows directory) and use your own company name and 
  154. address on the form. This technique can be employed to 
  155. help populate a form with work station specific / user 
  156. specific / installation specific values.
  157.  
  158. F 2.2    Use of off-page WORK fields to selectively SUM 
  159. up values based on expense category. These off-page 
  160. fields will not be seen by the person filling the form.
  161.  
  162. The expense category field has a 'Typical Response 
  163. File' associated with it. This is a list of potential 
  164. values for the field. By hitting the F3 function key 
  165. you will be presented with the list - now you can 
  166. choose a response by double clicking the left mouse 
  167. button. The idea with this form is that you enter all 
  168. of the line items for a particular expense category 
  169. like - Travel. When all of the line items for Travel 
  170. have been entered, choose the category 'TOTAL'. The 
  171. form will calculate the subtotal for that category. 
  172. Now you would enter line items for the next category. 
  173. The form is also capable of calculating domestic 
  174. dollar values for foreign currency amounts.
  175.  
  176. F 2.3    Use of the ACCESS function to retrieve a 
  177. value from  a previous page (record). This enables the 
  178. generation of a grand total should your report span 
  179. more than one page.
  180.  
  181. F 3. JetForm Filler [Graphical User Interface] -> 
  182.                     EX_F_3.MDF
  183.  
  184. TO INVOKE:  In Windows, select Filler
  185.             On the File Menu, select Open Form
  186.             From the list box, select -> EX_F_3
  187.  
  188. This example is a DEMONSTRATION FORM (no useful 
  189. purpose).
  190.  
  191. There are many techniques shown on this form
  192.  
  193. F 3.1    Use of the GetProfile() function to retrieve 
  194. the location of the dBASE files. This is kept in the 
  195. JFILLER.INI file in the working directory. The 
  196. variable retrieved is "OpenDataFile" from the section 
  197. called "Paths". The result of the GetProfile is stored 
  198. in an off-page Invisible, NoPrint field - DBPATH_PROF. 
  199. Five unnecessary characters are removed from the 
  200. contents of DBPATH_PROF using the SUBSTR() function. 
  201. The result is stored in an off-page Invisible, NoPrint 
  202. field called DBPATH.
  203.  
  204. F 3.2    Use of field picture to upshift all characters 
  205. field -> KEY - picture -> !!!!!!!!!!.
  206.  
  207. F 3.3    Use of Field Help [F2] and Typical Response 
  208. Files [F3] - list boxes.
  209.  
  210. F 3.4    Use of DBFetch and DBField functions to 
  211. retrieve a database record and populate form fields 
  212. with data from that record.
  213.  
  214. F 3.5    Use of on-page WORK fields to count up the 
  215. number of check boxes that are checked.
  216.  
  217. F 3.6    Use of Check Boxes and Radio Buttons and 
  218. calculating field contents based on their values.
  219.  
  220. F 3.7    Use of Dynamic Tabbing based on field 
  221. content.
  222.  
  223. F 3.8    Use of Electronic Authorization with field 
  224. locking. A field [GRAPH] is also populated with a 
  225. command that forces filler to retrieve a [.PCX] file 
  226. and display it on the screen. This example takes 
  227. advantage of the Signature Authorization Files 
  228. included as part of example EX_E_1 -> [EX_E_11.saf 
  229. password sam and EX_E_12.saf with password baz]. 
  230. All that the form tests for here is that 
  231. the Additional Information data stored with the .SAF 
  232. starts with "Sam" or "Bar". When you set up Electronic 
  233. Authorization (Signatures) using JFAUTH supplied with 
  234. JFDesign; you associate with each Authorized User 3 
  235. pieces of information -> UNIQUE ID, SIGNATURE, 
  236. ADDITIONAL INFORMATION. When you place a Signature 
  237. field on a form at Design time, the form's designer 
  238. has the option to show on the form any 1 of those 
  239. fields, as well as associating a list of form field 
  240. names that are to be LOCKED when the field is 
  241. SIGNED. The ADDITIONAL INFORMATION value appears in 
  242. a field called SIGN1. The validation calculation 
  243. associated with field SIGN1, checked that the signer 
  244. is "Sam" if the COMPUTED COST field has a 
  245. value>$500. 
  246.  
  247. F 3.9    Use of E-Mail Oriented fields and simple 
  248. Routing Calculations. When the form was designed the 
  249. "Routing" function selected from the Tools menu was 
  250. used to compute where the form is to be sent. The 
  251. system fields -> SEND_INDEX, TO, and CC are used. The 
  252. calculations for these fields make use of the 
  253. GetProfile() function once again to demonstrate that 
  254. the values used to populate the fields may be 
  255. specific to a work station or a work group but yet 
  256. not hard coded on the form.
  257.  
  258. M 1. JFMerge Example 1 -> EX_M_1.MDF
  259.  
  260. This set of merge examples uses a form with  many 
  261. single line fields, columns that are made of single 
  262. line fields with unique names, a multi-line field, 
  263. and global fields (fields on the form with duplicate 
  264. names that the data stream will identify as global)
  265.  
  266.  
  267. Data Stream Example 1 -> EX_M_11.DAT
  268.  
  269. Field Named data format (field nominated)
  270.  
  271. Each field is named using the ^field command followed 
  272. by a <CR><LF> followed by the value for the field
  273.  
  274. The data file begins identifying those fields that are 
  275. to be treated as global and the current value for 
  276. those globals.
  277.  
  278. Data Stream Example 2 -> EX_M_12.DAT
  279.  
  280. Comma delimited format - note use of ~ (tilde) and 
  281. ` (back quote). There are 10 single line text fields 
  282. set up on this form as well as 10 noprint fields 
  283. required by other examples, so the data stream 
  284. contains the necessary extra ~ and ` characters to 
  285. properly skip over the redundant fields [tilde = skip]
  286.  
  287. Invocation:
  288.     jfmerge EX_M_1 EX_M_12.dat -d
  289.  
  290.  
  291. Data Stream Example 3 -> EX_M_13.DAT
  292.  
  293. Record Mode format file - global fields - page full 
  294. condition
  295.  
  296. Please read the data file - EX_M_13.dat for further 
  297. information.
  298.  
  299. Invocation:
  300.     jfmerge EX_M_1 EX_M_13.dat
  301.  
  302. M 2. JFMerge - Example 2 -> EX_M_2 - Subforms - 
  303.                             Field Mode
  304.  
  305. This example uses a form that is designed using the 
  306. "SUBFORM"  architecture. The document is pieced 
  307. together using sections or subforms to grow the 
  308. necessary form. In design you would create a base page 
  309. (or pages), then design the subforms or sections as 
  310. distinct "pages" (1 subform = 1 page) with the 
  311. 'Compile As Subform' switched on in the format page 
  312. dialogue box. Each subform is referenced by its page 
  313. number in the .MDF file.
  314.  
  315. When Merge activates a page, it brings into memory all 
  316. of the fields that reside on that page. These are the 
  317. only fields it knows about at any given moment. When 
  318. merge is instructed to activate a subform it drops the 
  319. current field list, and inherits the field list from 
  320. the newly activated subform "page". The subform 
  321. template (boiler plate) is placed on the active page 
  322. with its upper left hand corner being placed at the 
  323. current pen position. Prior to activating a subform it 
  324. is always wise to position the pen to a field (in the 
  325. current list) that allows you to be precise for 
  326. subform placement. All subforms in these examples 
  327. contain a 'dummy' field called "POSITION" that is only 
  328. used for pen placement prior to activating (laying 
  329. down on paper) the next subform. In effect - subforms 
  330. are chained together.
  331.  
  332. Please read the data files for these examples. They 
  333. contain further information.
  334.  
  335. M 3. JFMerge - Example 3 -> EX_M_3 - Subforms - Field 
  336.                             Mode / Record Mode
  337. [REQUIRES JFMERGE 3.0 G2 OR NEWER TO POPULATE GLOBAL 
  338. FIELDS]
  339.  
  340. This subform example puts together an insurance policy 
  341. form with sections determined by the data stream.
  342.  
  343. EX_M_31.dat -> gives a tedious yet straight forward 
  344. Field named format file.
  345.  
  346. EX_M_32.dat -> provides an example with some merge 
  347. commands interspersed with record buffers.
  348.  
  349. EX_M_33.dat -> this complex example is the most terse 
  350. and most interesting. It uses Record mode data 
  351. formatting with 'keyed' record structures to determine 
  352. pagination and subform invocation.
  353.  
  354. The data streams contain further information.
  355.  
  356.