THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700
rodwelch@pacbell.net


S U M M A R Y


DIARY: January 15, 2002 05:16 PM Tuesday; Rod Welch

Fix Contact report from within Contact record.

1...Summary/Objective
2...000009 Macro 1807 Fix Report Code in 000009
3...0440110 Modify Report Setup to Launch Report in Contact Record
4...06112 Stack Contact Name Below Organization Name
5...000007 Macro 120 Must Set Flag for Contacts for Internal Reports


..............
Click here to comment!

CONTACTS 

SUBJECTS
Contacts, 022A09
Reports, Enter
<Enter> for General Purpose Access,

0605 -
0605 -    ..
0606 - Summary/Objective
0607 -
060701 - Follow up ref SDS 5 0000.
060702 -
060703 - Analysis found cause of problems using Enter to load content into
060704 - files and SDS records from within Contact records.  Seem to have the
060705 - problem fixed.
060706 -
060707 -
060708 -
060709 -
060711 -  ..
0608 -
0609 -
0610 - Problem
0611 -
061101 -   1.  Report specification is not loading when Enter and double click
061102 -       are executed from within a Contact record.
061104 -        ..
061105 -       Enter and double click both have to be executed with the cursor
061106 -       on a contact name line.  If Enter is pressed when the cursor is
061107 -       not on a contact name line, then a normal Enter operation
061108 -       occurs with the cursor moved to the beginning of the next line.
061110 -        ..
061111 -       If Enter is pressed with the cursor on a contact name line, and
061112 -       the cursor is not within the line number, or if a dash has not
061113 -       been entered in column 9 in front of the surname field, then a
061114 -       normal Enter operation occurs with the cursor moved to the
061115 -       beginning of the next line.
061117 -        ..
061118 -       Enter and double clicking can only do a report on an
061119 -       organization and a contact person.  However, once the report is
061120 -       set up to execute.  The contact person's id can be removed to do
061121 -       a report on an entire organization.
061122 -
061124 -        ..
061125 -   2.  Menu option was not working for "Report".
061126 -
061127 -       This method can do a report on an organizational record only, if
061128 -       the menu is called with the cursor not located on a contact
061129 -       person's name.  If the cursor is on a contact person's name,
061130 -       then the organization and the contact are used as criteria for
061131 -       selection.
061132 -
061134 -        ..
061135 -   3.  Phone number is being entering in the address for
061136 -       correspondence.
061138 -        ..
061139 -       This was added for the sender, but should not be entered for
061140 -       the addressee.
061142 -        ..
061143 -       On 010220 worked on letter setup, so reported the work at that
061144 -       location for continuity. ref SDS 6 844M
061145 -
061146 -
061148 -  ..
0612 -
0613 -
0614 - Analysis
0615 -
061501 - Line 140, ref OF 10 RE5I, about 30 lines below -entry 163 in 000009.
061502 -
061503 -     Enter is assigned to macro 1304 at this location.
061504 -
061506 -  ..
061507 - Line 150, ref OF 10 VG6I, -entry 1304 in 000009 calls macro 1807.
061509 -  ..
061510 - Line 190, ref OF 10 RH4H, -entry 1807 in 000009
061511 -
061512 -     This is the code for Enter and double click in contact records
061513 -
061514 -
061516 -  ..
0616 -
0617 -
0618 - Develop Code
0619 -
061901 - 000009  Macro 1807 Fix Report Code in 000009
061902 -
061904 -  ..
061905 - Line 150, ref OF 10 VG6I, -entry 1304 in 000009 calls macro 1807.
061906 -
061907 -     This is where Enter and double clicking occur when a Contact
061908 -     recorfd is already opened.
061909 -
061910 -     Created new flag to establish this is occurring...
061911 -
061912 -                  setcnt 133 9996
061913 -
061914 -     ...so that the code under -entry 1807 can launch macro....
061916 -                   ..
061917 -                  c: sd 03 044011
061918 -
061919 -     ...and so that 044011 know this was launched from within a Contact
061920 -     record and a Contact Summary, per below. ref SDS 0 UT9G
061921 -
061923 -  ..
061924 - Line 220, ref OF 10 QW6L, -entry 1807 in 000009 about 40 lines below.
061925 -
061926 -     Test to see if Enter or double click occurred in line number
061927 -     field, and if so -goto rPtzz
061928 -
061929 -     If not, then move cursor to column 9 in front of data entry field
061930 -     for contact records, and see if there is a dash.
061932 -      ..
061933 -     If there is not a dash, i.e., if not char 45, -goto lRec_z
061935 -  ..
061936 - Line 240, ref OF 10 PL4L, -label rPtzz
061937 -
061938 -     Enter or double click in line number field, or there is a dash in
061939 -     column 9, indicating a report is being requested.
061941 -  ..
061942 - Line 250, ref OF 10 PL4L, -label rPtzz about 10 lines below,
061943 -
061944 -     Added call 044011 to set up 06112 for a report,
061945 -
061946 -              -if @133 = 9996 @c:\sd\03\044011
061947 -
061948 -     ....if Enter or double click was executed in the Contact record,
061949 -     based on counter 133 = 8111, per above. ref SDS 0 X2G5
061951 -      ..
061952 -     Code sets up 06112, then calls op in 06112 to complete entering
061953 -     the spec for doing the report.
061955 -  ..
061956 - Line 250, ref OF 10 EO6G, -label rPtzz about 10 lines below,
061957 -
061958 -     Move to column 2 and put char in counter 2.
061959 -     Move to column 5 and put char in counter 3.
061960 -
061961 -     Set counter 162 995
061962 -
061963 -         Establishes this is a report only for the entire organization
061964 -         and not for the organization and person's name.
061966 -      ..
061967 -     If col 2 in counter 2 is greater than 0, then this line may be a
061968 -     line with a person's name, i.e, a contact name line.
061970 -      ..
061971 -     If col 5 in counter 3 is blank, i.e. 32, then this is a 4 place
061972 -     number, which is a line that has a person's name on it.
061974 -      ..
061975 -     If col 5 in counter 3 is not a number, then the value will be
061976 -     greater than 58 which is a highlight letter which means this is a
061977 -     four place number, and so has a person's name on it.
061979 -      ..
061980 -     Set counter 162 994
061981 -
061982 -         Establishes this is a report for the organization and for a
061983 -         person's name.
061985 -  ..
061986 - Line 270, ref OF 10 L18K, -label rPtzz in 000009 about 60 lines below
061987 -
061988 -     -if @162 = 995 -goto orgRep
061989 -
061990 -         If counter 162 was not changed, then do report for entire
061991 -         recorfd.
061992 -
061994 -  ..
061995 - Line 290, ref OF 10 R34G, -label rPtzz in 000009 about 80 lines below
061996 -
061997 -     This means were are doing a report on an organization and a
061998 -     person.
061999 -
062000 -     Put the cursor on column 1 and read only 4 positions of the string
062001 -     with macro 182 beginning with counter 189 to get the line number.
062002 -
062004 -  ..
062005 - Line 300, ref OF 10 JH6F, -label rPtzz in 000009 about 90 lines below
062006 -
062007 -     Put cursor on column 15 and read first name of contact beginning
062008 -     with counter 1 and using macro 182.
062009 -
062011 -  ..
062012 - Line 330, ref OF 10 0404, -label rPtzz in 000009 about 120 lines below
062013 -
062014 -     Put cursor on column 40 and read last name of contact, avoid
062015 -     including the home phone.
062016 -
062017 -     We now have the line number, first and last name of the contact.
062018 -
062020 -  ..
062021 - Line 330, ref OF 10 B514, -label orgRep in 000009
062022 -
062023 -     Jump to top of the record and get organization ID.
062024 -
062026 -  ..
062027 - Line 340, ref OF 10 PSRY, -label orgRep in 000009 about 10 lines below
062028 -
062029 -     Read contact ID string beginning in column 10 and starting with
062030 -     counter 180, using macro 182.
062031 -
062033 -  ..
062034 - Line 390, ref OF 10 RS4R, -label orgRep in 000009 about 10 lines below
062035 -
062036 -
062037 -
062039 -  ..
062040 - 0440110  Modify Report Setup to Launch Report in Contact Record
062041 -
062042 - Line 220, ref OF 3 JV3N, -label bL_CNS
062043 -
062044 -     Added code...
062045 -
062046 -         -if @47 = 4 setgbl 133 9996
062048 -      ..
062049 -     As a new flag for macro 120 to set contact directory level.
062050 -     ref SDS 0 FX5F
062052 -  ..
062053 - Line 480, ref OF 3 GE4N, -label 78qk about 50 lines below
062054 -
062055 -     Changed....
062056 -
062057 -           -if @133 > 9996 -if @133 < 10000 -goto c&reF
062058 -
062059 -     ...to....
062060 -
062061 -           -if @133 > 9996 -if @133 < 10000 -goto c&reF
062062 -
062063 -     ...to create condition for a report started in Contact record to
062064 -     be branch to processing for contacts, per change above.
062065 -     ref SDS 0 UT9G
062067 -  ..
062068 - Line 560, ref OF 3 K27M, -label C&F_p
062069 -
062070 -     Report op is configured using 06112, called from 000009 by macro
062071 -     1807 under -label rPtzz, per above. ref SDS 0 PZ4I
062072 -
062073 -     Sets up profile, and turns colors off.
062074 -
062076 -  ..
062077 - Line 740, ref OF 3 K35M, -label sTrtD in 0440110
062078 -
062079 -     At this point 044011 called from within 000009 under macro 1807,
062080 -     has now set up the report op with...
062081 -
062082 -                      c: sd 03 06112
062084 -      ..
062085 -     Created second condition to distinguish between contact report
062086 -     started from within a Contact Summary and when the report is
062087 -     started within a Contact record.
062089 -      ..
062090 -     Counter 133 8111 set in 000009 macro 1304 when Enter or double
062091 -     click is called in a contact record to establish a report is being
062092 -     run from within a contact record, per above. ref SDS 0 X2G5
062093 -
062095 -  ..
062096 - Line 1000, ref OF 3 UE5H, -label cSumS in 0440110
062097 -
062098 -     If the report was started within a Contact record, processing in
062099 -     044011 now ends, because the Contact record is already opened, so
062100 -     do not need to execute code that returns to Summary and open the
062101 -     Contact record, so...
062102 -
062103 -                      -if @133 = 8111 -goto rfOvr
062104 -
062105 -
062107 -  ..
062108 - 06112  Stack Contact Name Below Organization Name
062109 -
062110 - Line 2000, ref OF 5 LK6O, -label conNam in 06112
062111 -
062112 -     This is where the contact person's name is identified
062113 -
062114 -     When both an organization and a person's name is shown, this can
062115 -     run on the screen, so decided to stack this today.
062117 -  ..
062118 - Line 2040, ref OF 5 WH4M, -label conNam in 06112
062119 -
062120 -     When a report is launched from within a Contact record 133 9996 is
062121 -     set, so change 133 9996 to 133 9997 so the thing will process
062122 -     correctly below. ref OF 5 XF4O
062124 -  ..
062125 - Line 2060, ref OF 5 G87L, -label 4711r1 in 06112
062126 -
062127 -     Global 128 is evaluated to determine whether to use I- or O- to
062128 -     distinguish individual from organizational contact records.
062129 -
062130 -
062132 -  ..
062133 - Line 2210, ref OF 5 GE6G, -label orgZR1 in 06112 about 50 lines below
062134 -
062135 -     Change format for showing organization and contact person's name,
062136 -     so the name is stacked below the organization; otherwise when the
062137 -     organization name is long, and the person's name is long, it runs
062138 -     off the screen.
062139 -
062140 -
062142 -  ..
062143 - 000007  Macro 120 Must Set Flag for Contacts for Internal Reports
062144 -
062145 - We now have everything running so that a report can be called from
062146 - within a Contact record, but macro 120 is not setting the correct data
062147 - base directory for Contacts, so this means there is a flag it needs to
062148 - have set somewhere.
062150 -  ..
062151 - Line 230, ref OF 5 6612, -label xyz8 in 06112
062152 -
062153 -     This calls macro 120 in 000007 to create the selection selection
062154 -     operation that gets the list from the data base.
062156 -  ..
062157 - Line 1200, ref OF 8 SK5K, -entry 120 in 000007
062158 -
062159 -     This is the main processor for the SDS report operation.
062161 -  ..
062162 - Line 1530, ref OF 8 X54F, -entry 1205 in 000007 about 20 lines below
062163 -
062164 -     This is where the directory level is set for selection pointer
062165 -     types.
062166 -
062167 -     Right now the code shows...
062168 -
062169 -           -if @47 != 13 ins_text /05/
062170 -           -if @47 = 13 ins_text /03/
062171 -           -if @133 = 9999 ins_text /03/
062172 -           -if @47 = 12 ins_text /01/
062174 -      ..
062175 -     So, this means the setup op in 044011 needs to make 47 = 11 in .
062176 -     This already occurring, but since 133 = 8111, the code is not
062177 -     branching to contact processing, and so 47 is being reset to 12.
062178 -     Fixed this per above. ref SDS 0 UT9G
062179 -
062180 -
062181 -
062182 -
062183 -
062184 -
062185 -
0622 -