harrymossman
Technical User
I have been using Paradox for quite a while but I've never worked much with loops.
I've been asked to take a workload table (in Paradox) and create individual workload reports in MSWord. I.e., a separate document for each employee. Making them in Excel would be an option too.
It seems like I need to loop through the employees with open projects but I have tried various code that doesn't work at all.
I've been asked to take a workload table (in Paradox) and create individual workload reports in MSWord. I.e., a separate document for each employee. Making them in Excel would be an option too.
It seems like I need to loop through the employees with open projects but I have tried various code that doesn't work at all.
Code:
method pushButton(var eventInfo Event)
var
q query
tc tcursor
endVar
q=Query
ANSWER: :priv:Workload.DB
:LOG:log.db | Received | Year | LogNum | Branch |
| Check | Check | Check | Check |
:LOG:log.db | Project | Assigned | Date Completed |
| heck | Check | Blank |
EndQuery
if not executeQBE(q) then
errorShow()
msginfo("Error","Unable to run query")
endIf
tc.open("workload.db")
tc.edit()
scan tc:
{Here we would like to make an MS Word document for each employee (each of the "assigned") with the log info. Ideally each document would have some additonal common fields.}
endScan
tc.endEdit()
tc.close()
endMethod