| 1 |
/* |
| 2 |
* @progname 2ppage.ll |
| 3 |
* @version 1.0 |
| 4 |
* @author Wetmore, Manis |
| 5 |
* @category |
| 6 |
* @output Text, 80 cols |
| 7 |
* @description |
| 8 |
* |
| 9 |
* It will produce a report of all INDI's in the database, with |
| 10 |
* two records printed per page. Record 1 and 2 will be on the |
| 11 |
* first page. |
| 12 |
* |
| 13 |
* 2ppage (2 INDI's per page) |
| 14 |
* |
| 15 |
* |
| 16 |
* Code by Tom Wetmore, [email protected] |
| 17 |
* Modifications by Cliff Manis |
| 18 |
* |
| 19 |
* This report works only with the LifeLines Genealogy program |
| 20 |
* |
| 21 |
* version one of this report was written by Tom Wetmore, in 1991, |
| 22 |
* and it has been modified many times since. |
| 23 |
* |
| 24 |
* It will produce a report of all INDI's in the database, with |
| 25 |
* two records printed per page. Record 1 and 2 will be on the |
| 26 |
* first page. |
| 27 |
* |
| 28 |
* It will produce ASCII file output. |
| 29 |
|
| 30 |
This short report show how many different things may be done with |
| 31 |
the report language. |
| 32 |
|
| 33 |
These next two paragraphs were by Tom, when he sent me the following |
| 34 |
report - which we had been discussing via email. At the time I wanted |
| 35 |
this format for a book I was writing for a Mother-in-Law. |
| 36 |
|
| 37 |
This report is using the `pagemode' feature. This allows use |
| 38 |
use of the `pos' command to go to any row and column coordinate on a page. |
| 39 |
The routine `pageout' dumps the current page to the output file, and |
| 40 |
prepares for the program to compose another page. |
| 41 |
|
| 42 |
Notice how the `gettoday' function is used to get today's date to |
| 43 |
print out. Also note that the `mod' function is used to put every other |
| 44 |
person on the top half, and the other every other person on the bottom |
| 45 |
half. Also note that the variable `page' counts the page numbers. |
| 46 |
|
| 47 |
*/ |
| 48 |
|
| 49 |
proc main () |
| 50 |
{ |
| 51 |
pagemode(66,80) |
| 52 |
monthformat(4) |
| 53 |
|
| 54 |
set(tday, save(stddate(gettoday()))) |
| 55 |
|
| 56 |
set(page, 1) |
| 57 |
forindi(i, n) { |
| 58 |
if (mod(n,2)) { |
| 59 |
pos(2,1) |
| 60 |
" = = = = MANES / MANIS Family History & Genealogy = = = " tday nl() |
| 61 |
pos(65,1) |
| 62 |
" = = = Cliff Manis, PO Box 33937, San Antonio, TX 78265 = = " d(page) |
| 63 |
nl () |
| 64 |
set(page, add(page,1)) |
| 65 |
pos(4,1) |
| 66 |
call oneout(i) |
| 67 |
} else { |
| 68 |
pos(34,1) |
| 69 |
call oneout(i) |
| 70 |
pageout() |
| 71 |
} |
| 72 |
} |
| 73 |
if (mod(n,2)) { |
| 74 |
pageout() |
| 75 |
} |
| 76 |
} |
| 77 |
proc oneout (i) |
| 78 |
{ |
| 79 |
set(f, father(i)) |
| 80 |
set(m, mother(i)) |
| 81 |
|
| 82 |
" FULL NAME: " name(i) col(46) "(" key(i) ")" nl() nl() |
| 83 |
" FATHER: " name(f) col(46) "(" key(f) ")" nl() |
| 84 |
" MOTHER: " name(m) col(46) "(" key(m) ")" nl() nl() |
| 85 |
" Born: " stddate(birth(i)) " at " place(birth(i)) nl() |
| 86 |
call outmarriages(i) nl() |
| 87 |
" Died: " stddate(death(i)) " at " place(death(i)) nl() nl() |
| 88 |
call outchildren(i) |
| 89 |
} |
| 90 |
proc outmarriages (i) |
| 91 |
{ |
| 92 |
spouses(i, s, f, n) { |
| 93 |
if (eq(1, n)) { |
| 94 |
" Married: " stddate(marriage(f)) nl() |
| 95 |
" Married to: " name(s) col(46) "("key(s)")" nl() |
| 96 |
} else { |
| 97 |
" Remarried: " stddate(marriage(f)) nl() |
| 98 |
" Remarried to:" name(s) col(46) "("key(s)")" nl() |
| 99 |
} |
| 100 |
} |
| 101 |
} |
| 102 |
proc outchildren (i) |
| 103 |
{ |
| 104 |
set(j, 0) |
| 105 |
families(i, f, s, n) { |
| 106 |
set(j, add(j, nchildren(f))) |
| 107 |
} |
| 108 |
" Number of Children: " d(j) nl() |
| 109 |
set(j, 1) |
| 110 |
families(i, f, s, n) { |
| 111 |
children(f, c, m) { |
| 112 |
" " d(j) ". " name(c) col(46) "("key(c)")" |
| 113 |
col(57) "Born: " stddate(birth(c)) nl() |
| 114 |
set(j, add(j,1)) |
| 115 |
} |
| 116 |
} |
| 117 |
} |
| 118 |
|
| 119 |
|
| 120 |
/* |
| 121 |
* Sample output |
| 122 |
|
| 123 |
|
| 124 |
= = = = MANES / MANIS Family History & Genealogy = = = 15 Jan 1993 |
| 125 |
|
| 126 |
FULL NAME: Wilee "Wyley" WORWICK (3) |
| 127 |
|
| 128 |
FATHER: Wyley WORWICK (1) |
| 129 |
MOTHER: Wife of Wyley WORWICK (2) |
| 130 |
|
| 131 |
Born: 1824 at |
| 132 |
Married: 31 Oct 1844 |
| 133 |
Married to: Martha D. JOHNSON (4) |
| 134 |
|
| 135 |
Died: Nov 1874 at Union Co, TN |
| 136 |
|
| 137 |
Number of Children: 10 |
| 138 |
1. Tempia Catherine WARWICK (5) Born: 1846 |
| 139 |
2. Louisa Mahayla WARWICK (6) Born: 1848 |
| 140 |
3. Margarett WARWICK (7) Born: 1850 |
| 141 |
4. Mary WARWICK (8) Born: 1852 |
| 142 |
5. Matilda WARWICK (9) Born: 1854 |
| 143 |
6. Calaway WARWICK (10) Born: 29 Jul 1855 |
| 144 |
7. Jamima WARWICK (11) Born: 1858 |
| 145 |
8. Nancy Elizabeth WARWICK (12) Born: 1860 |
| 146 |
9. Rebecca WARWICK (13) Born: 1864 |
| 147 |
10. Martha WARWICK (14) Born: Sep 1869 |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
FULL NAME: Martha D. JOHNSON (4) |
| 157 |
|
| 158 |
FATHER: () |
| 159 |
MOTHER: () |
| 160 |
|
| 161 |
Born: 1825 at NC |
| 162 |
Married: 31 Oct 1844 |
| 163 |
Married to: Wilee "Wyley" WORWICK (3) |
| 164 |
Remarried: |
| 165 |
Remarried to:William PETREE (22) |
| 166 |
|
| 167 |
Died: at |
| 168 |
|
| 169 |
Number of Children: 10 |
| 170 |
1. Tempia Catherine WARWICK (5) Born: 1846 |
| 171 |
2. Louisa Mahayla WARWICK (6) Born: 1848 |
| 172 |
3. Margarett WARWICK (7) Born: 1850 |
| 173 |
4. Mary WARWICK (8) Born: 1852 |
| 174 |
5. Matilda WARWICK (9) Born: 1854 |
| 175 |
6. Calaway WARWICK (10) Born: 29 Jul 1855 |
| 176 |
7. Jamima WARWICK (11) Born: 1858 |
| 177 |
8. Nancy Elizabeth WARWICK (12) Born: 1860 |
| 178 |
9. Rebecca WARWICK (13) Born: 1864 |
| 179 |
10. Martha WARWICK (14) Born: Sep 1869 |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
= = = Cliff Manis, PO Box 33937, San Antonio, TX 78265 = = 2 |
| 188 |
|
| 189 |
- end of report - |
| 190 |
|
| 191 |
*/ |