| 36 |
|
# ReportORMObject
|
| 37 |
|
# - ORMObjectID # many may point to same
|
| 38 |
|
# - ReportID
|
| 39 |
|
# - PosX
|
| 40 |
|
# - PosY
|
| |
52 |
rt = { 'Name': 'ORM Diagram', 'TableA': 'ORMObject', 'TableB': None, 'Also': None, 'AllOrEach': 'each',
|
| |
53 |
'SuggestedColumns': ',ID;,Name' }
|
| |
54 |
ct = [
|
| |
55 |
{ 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 },
|
| |
56 |
{ 'Name': 'Name', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 },
|
| |
57 |
]
|
| |
58 |
Data.AddReportType(rt, ct)
|
| |
59 |
|
| |
60 |
|
| |
61 |
rt = { 'Name': 'ORM Objects', 'TableA': 'ORMObject', 'TableB': None, 'Also': None, 'AllOrEach': 'each',
|
| |
62 |
'SuggestedColumns': ',ID;,Name;,RefMode;,Type;,Independent;,Derived;,DerivationRule;,DateAdded' }
|
| |
63 |
ct = [
|
| |
64 |
{ 'Name': 'ProjectID', 'Label': 'Project\nID', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 50 },
|
| |
65 |
{ 'Name': 'Project/Name', 'Label': 'Project\nName', 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 100 },
|
| |
66 |
{ 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 },
|
| |
67 |
{ 'Name': 'Name', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 },
|
| |
68 |
{ 'Name': 'RefMode', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 },
|
| |
69 |
{ 'Name': 'Type', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
70 |
{ 'Name': 'Independent', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 75 },
|
| |
71 |
{ 'Name': 'Derived', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 50 },
|
| |
72 |
{ 'Name': 'DerivationRule', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 180 },
|
| |
73 |
{ 'Name': 'DateAdded', 'Label': 'Date\nAdded', 'DataType': 'd', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| |
74 |
]
|
| |
75 |
Data.AddReportType(rt, ct)
|
| 51 |
|
# ReportORMFact
|
| 52 |
|
# - ORMFactID # many may point to same
|
| 53 |
|
# - ReportID
|
| 54 |
|
# - PosX
|
| 55 |
|
# - PosY
|
| |
86 |
rt = { 'Name': 'ORM Facts', 'TableA': 'ORMFact', 'TableB': None, 'Also': None, 'AllOrEach': 'each',
|
| |
87 |
'SuggestedColumns': ',ID;,Name;,RefMode;,Type;,Independent;,Derived;,DerivationRule;,DateAdded' }
|
| |
88 |
ct = [
|
| |
89 |
{ 'Name': 'ProjectID', 'Label': 'Project\nID', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 50 },
|
| |
90 |
{ 'Name': 'Project/Name', 'Label': 'Project\nName', 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 100 },
|
| |
91 |
{ 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 },
|
| |
92 |
{ 'Name': 'Name', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 },
|
| |
93 |
{ 'Name': 'Nary', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 },
|
| |
94 |
{ 'Name': 'ReadingID', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
95 |
{ 'Name': 'ReadingAltID', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 75 },
|
| |
96 |
{ 'Name': 'Derived', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 50 },
|
| |
97 |
{ 'Name': 'DerivationRule', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 180 },
|
| |
98 |
{ 'Name': 'DateAdded', 'Label': 'Date\nAdded', 'DataType': 'd', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| |
99 |
]
|
| |
100 |
Data.AddReportType(rt, ct)
|
| 57 |
|
# ORMRole
|
| |
102 |
# ORMReading (follows the fact, but has it's own X&Y
|
| |
103 |
# - ID
|
| |
104 |
# - ProjectID (Schema)
|
| |
105 |
# - ORMFactID
|
| |
106 |
# - Reading
|
| |
107 |
|
| |
108 |
rt = { 'Name': 'ORM Reading', 'TableA': 'ORMReading', 'TableB': None, 'Also': None, 'AllOrEach': 'each',
|
| |
109 |
'SuggestedColumns': ',ID;,FactID;,Reading;,DateAdded' }
|
| |
110 |
ct = [
|
| |
111 |
{ 'Name': 'ProjectID', 'Label': 'Project\nID', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 50 },
|
| |
112 |
{ 'Name': 'Project/Name', 'Label': 'Project\nName', 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 100 },
|
| |
113 |
{ 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 },
|
| |
114 |
{ 'Name': 'FactID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 },
|
| |
115 |
{ 'Name': 'Reading', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
116 |
{ 'Name': 'DateAdded', 'Label': 'Date\nAdded', 'DataType': 'd', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| |
117 |
]
|
| |
118 |
Data.AddReportType(rt, ct)
|
| |
119 |
|
| |
120 |
# ORMRole (the role name can be positioned, but the line end points follow the entities and facts
|
| 64 |
|
# ReportORMRole
|
| 65 |
|
# - ORMRoleID # many may point to same
|
| 66 |
|
# - ReportID
|
| 67 |
|
# - ReportORMFactID # these determine where to draw the role
|
| 68 |
|
# - ReportORMObjectID #
|
| |
127 |
rt = { 'Name': 'ORM Role', 'TableA': 'ORMRole', 'TableB': None, 'Also': None, 'AllOrEach': 'each',
|
| |
128 |
'SuggestedColumns': ',ID;,FactID;,Seq;,Name;,DateAdded' }
|
| |
129 |
ct = [
|
| |
130 |
{ 'Name': 'ProjectID', 'Label': 'Project\nID', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 50 },
|
| |
131 |
{ 'Name': 'Project/Name', 'Label': 'Project\nName', 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 100 },
|
| |
132 |
{ 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 },
|
| |
133 |
{ 'Name': 'FactID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 },
|
| |
134 |
{ 'Name': 'Seq', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 },
|
| |
135 |
{ 'Name': 'Name', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
136 |
{ 'Name': 'DateAdded', 'Label': 'Date\nAdded', 'DataType': 'd', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| |
137 |
]
|
| |
138 |
Data.AddReportType(rt, ct)
|
| 79 |
|
# ReportORMConstraint
|
| 80 |
|
# - ORMConstraintID # many may point to same
|
| 81 |
|
# - ReportID
|
| 82 |
|
# - PosX
|
| 83 |
|
# - PosY
|
| |
149 |
rt = { 'Name': 'ORM Constraint', 'TableA': 'ORMConstraint', 'TableB': None, 'Also': None, 'AllOrEach': 'each',
|
| |
150 |
'SuggestedColumns': ',ID;,FactID;,Seq;,Name;,DateAdded' }
|
| |
151 |
ct = [
|
| |
152 |
{ 'Name': 'ProjectID', 'Label': 'Project\nID', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 50 },
|
| |
153 |
{ 'Name': 'Project/Name', 'Label': 'Project\nName', 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 100 },
|
| |
154 |
{ 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 },
|
| |
155 |
{ 'Name': 'Type', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
156 |
{ 'Name': 'Alethic', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
157 |
{ 'Name': 'DateAdded', 'Label': 'Date\nAdded', 'DataType': 'd', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| |
158 |
]
|
| |
159 |
Data.AddReportType(rt, ct)
|
| |
177 |
# --------------------------
|
| |
178 |
# ReportORMObject
|
| |
179 |
# - ORMObjectID # many may point to same
|
| |
180 |
# - ReportID
|
| |
181 |
# - PosX
|
| |
182 |
# - PosY
|
| |
183 |
|
| |
184 |
### instead of a report object, it might be better just to use the good old report row?
|
| |
185 |
## rt = { 'Name': 'ORM Report Objects', 'TableA': 'ORMReportObject', 'TableB': None, 'Also': None, 'AllOrEach': 'each',
|
| |
186 |
## 'SuggestedColumns': ',ReportID;,Report/Name;,ID;,ORMObjectID;,ORMObject/Name;,PosX;,PosY;,DateAdded' }
|
| |
187 |
## ct = [
|
| |
188 |
## { 'Name': 'ProjectID', 'Label': 'Project\nID', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 50 },
|
| |
189 |
## { 'Name': 'Project/Name', 'Label': 'Project\nName', 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 100 },
|
| |
190 |
## { 'Name': 'ReportID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
191 |
## { 'Name': 'Report/Name', 'Label': 'Report\nName', 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 100 },
|
| |
192 |
## { 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 },
|
| |
193 |
## { 'Name': 'ORMObjectID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| |
194 |
## { 'Name': 'ORMObject/Name', 'Label': 'ORMObject\nName', 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 100 },
|
| |
195 |
## { 'Name': 'PosX', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
196 |
## { 'Name': 'PosY', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 35 },
|
| |
197 |
## { 'Name': 'DateAdded', 'Label': 'Date\nAdded', 'DataType': 'd', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| |
198 |
## ]
|
| |
199 |
## Data.AddReportType(rt, ct)
|
| |
200 |
|
| |
201 |
# ReportORMFact
|
| |
202 |
# - ORMFactID # many may point to same
|
| |
203 |
# - ReportID
|
| |
204 |
# - PosX
|
| |
205 |
# - PosY
|
| |
206 |
|
| |
207 |
# ReportORMRole
|
| |
208 |
# - ORMRoleID # many may point to same
|
| |
209 |
# - ReportID
|
| |
210 |
# - ReportORMFactID # these determine where to draw the role
|
| |
211 |
# - ReportORMObjectID #
|
| |
212 |
|
| |
213 |
# ReportORMConstraint
|
| |
214 |
# - ORMConstraintID # many may point to same
|
| |
215 |
# - ReportID
|
| |
216 |
# - PosX
|
| |
217 |
# - PosY
|
| |
218 |
|
| 115 |
|
def DoAdd():
|
| 116 |
|
# global AddReportType, AddTable, AddRow
|
| 117 |
|
|
| 118 |
|
# Specified all required Report Types and Column Types
|
| 119 |
|
# It will either add them or update them if they already exist.
|
| 120 |
|
|
| 121 |
|
rt = { 'Name': 'Project', 'TableA': 'Project', 'TableB': None, 'Also': None, 'AllOrEach': 'all',
|
| 122 |
|
'SuggestedColumns': ',Name;,StartDate;,TargetEndDate;,Week/EffortHours,,13' }
|
| 123 |
|
ct = [
|
| 124 |
|
{ 'Name': 'ActualEndDate', 'Label': 'Actual\nEnd Date', 'DataType': 'd', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| 125 |
|
{ 'Name': 'Week/EffortHours', 'Label': 'Week/Effort', 'DataType': 'i', 'AccessType': 's', 'T': 'X', 'Edit': True, 'Width': 40 },
|
| 126 |
|
# { 'Name': 'Day/EffortHours', 'Label': 'Day/Effort', 'DataType': 'i', 'AccessType': 's', 'T': 'X', 'Edit': True, 'Width': 40 },
|
| 127 |
|
]
|
| 128 |
|
Data.AddReportType(rt, ct)
|
| 129 |
|
|
| 130 |
|
rt = { 'Name': 'Task', 'TableA': 'Task', 'TableB': None, 'Also': None, 'AllOrEach': 'both',
|
| 131 |
|
'SuggestedColumns': ',Name;,StartDate;,DurationHours;,EffortHours;,CalculatedStartDate;,ResourceNames;,Day/Gantt,,21' }
|
| 132 |
|
ct = [
|
| 133 |
|
{ 'Name': 'Project/Name', 'Label': "Project\nName", 'DataType': 'y', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 140 },
|
| 134 |
|
{ 'Name': 'EffortHours', 'Label': 'Effort', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 60 },
|
| 135 |
|
{ 'Name': 'ResourceNames', 'Label': 'Resource\nNames', 'Path': 'ID/Assignment/TaskID/ResourceID/Resource/Name', 'DataType': 't', 'AccessType': 'list', 'T': 'A', 'Edit': False, 'Width': 80 },
|
| 136 |
|
{ 'Name': 'ResourcesShortNames', 'Label': 'Resource\nShort Names', 'Path': 'ID/Assignment/TaskID/ResourceID/Resource/ShortName', 'DataType': 't', 'AccessType': 'list', 'T': 'A', 'Edit': False, 'Width': 80 },
|
| 137 |
|
{ 'Name': 'ActualEndDate', 'Label': 'Actual\nEnd Date', 'DataType': 'd', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| 138 |
|
{ 'Name': 'Week/EffortHours', 'Label': 'Week/Effort', 'DataType': 'i', 'AccessType': 's', 'T': 'X', 'Edit': True, 'Width': 40 },
|
| 139 |
|
{ 'Name': 'Day/EffortHours', 'Label': 'Day/Effort', 'DataType': 'i', 'AccessType': 's', 'T': 'X', 'Edit': True, 'Width': 40 },
|
| 140 |
|
]
|
| 141 |
|
Data.AddReportType(rt, ct)
|
| 142 |
|
|
| 143 |
|
rt = { 'Name': 'Task/Assignment', 'TableA': 'Task', 'TableB': 'Assignment', 'Also': 'Task', 'AllOrEach': 'each',
|
| 144 |
|
'SuggestedColumns': 'Task,Name;Task,DurationHours;Task,EffortHours;,Resource/Name;,Role;,EffortHours;Task,Day/EffortHours,,21' }
|
| 145 |
|
ct = [
|
| 146 |
|
{ 'Name': 'Role', 'Label': 'Role', 'DataType': 't', 'AccessType': 'd', 'T': 'B', 'Edit': True, 'Width': 80 },
|
| 147 |
|
{ 'Name': 'EffortHours', 'Label': 'Assignment\nEffort', 'DataType': 'i', 'AccessType': 'd', 'T': 'B', 'Edit': True, 'Width': 80 },
|
| 148 |
|
]
|
| 149 |
|
Data.AddReportType(rt, ct)
|
| 150 |
|
|
| 151 |
|
rt = { 'Name': 'Resource', 'TableA': 'Resource', 'TableB': None, 'Also': None,
|
| 152 |
|
'SuggestedColumns': ',Name;,Day/EffortHours,,21' }
|
| 153 |
|
ct = [
|
| 154 |
|
{ 'Name': 'Week/EffortHours', 'Label': 'Week/Effort', 'DataType': 'i', 'AccessType': 's', 'T': 'X', 'Edit': True, 'Width': 40 },
|
| 155 |
|
{ 'Name': 'Day/EffortHours', 'Label': 'Day/Effort', 'DataType': 'i', 'AccessType': 's', 'T': 'X', 'Edit': True, 'Width': 40 },
|
| 156 |
|
]
|
| 157 |
|
Data.AddReportType(rt, ct)
|
| 158 |
|
|
| 159 |
|
rt = { 'Name': 'Resource/Assignment', 'TableA': 'Resource', 'TableB': 'Assignment', 'Also': 'Resource', 'AllOrEach': 'all',
|
| 160 |
|
'SuggestedColumns': 'Resource,Name;,Task/Name;,Role;,EffortHours;Resource,Day/EffortHours,,21' }
|
| 161 |
|
ct = [
|
| 162 |
|
{ 'Name': 'Task/ProjectID', 'Label': 'Project\nID', 'DataType': 'i', 'AccessType': 'i', 'T': 'B', 'Edit': False, 'Width': 60 },
|
| 163 |
|
{ 'Name': 'EffortHours', 'Label': 'Assignment\nEffort', 'DataType': 'i', 'AccessType': 'd', 'T': 'B', 'Edit': True, 'Width': 80 },
|
| 164 |
|
]
|
| 165 |
|
Data.AddReportType(rt, ct)
|
| 166 |
|
|
| 167 |
|
# rt = { 'Name': 'ProjectResource', 'Label': 'Project Resource', 'TableA': 'ProjectResource', 'TableB': None, 'Also': None, 'AllOrEach': 'both' }
|
| 168 |
|
# ct = [
|
| 169 |
|
# { 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 40 },
|
| 170 |
|
# { 'Name': 'ProjectID', 'Label': 'Project\nID', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 80 },
|
| 171 |
|
# { 'Name': 'Project/Name', 'Label': None, 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 140 },
|
| 172 |
|
# { 'Name': 'ResourceID', 'Label': 'Resource\nID', 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| 173 |
|
# { 'Name': 'Resource/Name', 'Label': None, 'DataType': 't', 'AccessType': 'i', 'T': 'A', 'Edit': False, 'Width': 140 },
|
| 174 |
|
# { 'Name': 'HourlyRate', 'Label': 'Hourly Rate', 'DataType': 'f', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| 175 |
|
# { 'Name': 'Week/ActualEffortHours', 'Label': 'Week/ActualEffort', 'DataType': 'i', 'AccessType': 's', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| 176 |
|
# { 'Name': 'Day/ActualEffortHours', 'Label': 'Week/ActualEffort', 'DataType': 'i', 'AccessType': 's', 'T': 'A', 'Edit': True, 'Width': 80 },
|
| 177 |
|
# ]
|
| 178 |
|
# Data.AddReportType(rt, ct)
|
| 179 |
|
|