IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

January Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardObjectPAL Topic   Print This     

Make workload list for each employee

Make workload list for each employee in ObjectPAL topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: workload   employee   Make workload   Make workload list   each employee  
harrymossman
Sacramento, CA USA
I have been using Paradox for quite a while but I've never worked much with loops.

I've been asked to take a Paradox workload table and create individual workload reports in Excel.

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.
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 Excel spreadsheet 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
 Posted 17 years ago (Thread Starter)
Comment Quote
About harrymossman -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #11203, 6 replies
Thread Started 8/29/2005 11:29:00 AM
View Counter=3116
Last Reply Posted 9/2/2005 9:22:00 AM)
Location=Sacramento, CA USA 
Joined=22 years ago   MB Posts=83  
harrymossman
Sacramento, CA USA
Thanks. I'll give it a try.
 Posted 17 years ago (Thread Starter)
Comment Quote
About harrymossman -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #11207 (Level 1.1)  Reply to 11203
Thread Started 8/30/2005 7:38:00 AM
View Counter=2
Location=Sacramento, CA USA 
Joined=22 years ago   MB Posts=83  
harrymossman
Sacramento, CA USA
Here's what I have so far. It always uses me as the employee, which isn't right. It makes a speadsheet file name of :WORK:Reports\logMossman, Harry.xls, which it then, of course, says isn't valid.
method pushButton(var eventInfo Event)
var
Q1 query
tc1 tcursor
assigned string
endVar
tc1.open("log.DB")
tc1.edit()
Scan tc1:
assigned = tc1.("assigned to")
Q1 = Query
ANSWER: :PRIV:ANSWER.DB
:LOG:log.db |Date Received|Year|Number|Branch|
|Check as recd|Check|Check as lognum|Check|
:LOG:log.db|Project Name|Assigned To|Date Completed|
|Check|~assigned Check|Blank|
EndQuery
If not(executeQBE(Q1)) then
errorShow()
msginfo("Error","Unable to run query")
endIf
spreadSheetName = ":WORK:Reports\\log" + assigned + ".xls"
exportSpreadsheet ( ":PRIV:ANSWER.db", spreadSheetName, True )
endScan
endMethod
 Posted 17 years ago (Thread Starter)
Comment Quote
About harrymossman -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #11210 (Level 1.2)  Reply to 11203
Reply Posted 9/1/2005 3:44:00 PM
Location=Sacramento, CA USA 
Joined=22 years ago   MB Posts=83  
harrymossman
Sacramento, CA USA
Thanks. I am making progress. The code is making spreadsheets but they are blank.

I think the problem has to do with getting the query variable, qAssigned, right.

Unfortunately, we don't have employee numbers in the workload database. So I have to go with a lastname,firstname field.

We have a separate, make-your-own-workload-report form that has the following code. I can't seem to figure out how to adapt it to this application.
qSelected = Assigned_to.value

qSelected.breakApart(qArray, " ,")

qAssigned = ".." + qArray[1] + ".." + qArray[2] + ".."
Here's the code that works except that it comes up blank:
method pushButton(var eventInfo Event)
var
Q1 query
tc1 tcursor
qAssigned string
spreadSheetName string
endVar
tc1.open("log.DB")
Scan tc1:
qAssigned = tc1.("assigned to")
Q1 = Query
ANSWER: :PRIV:ANSWER.DB
:LOG:log.db | Date Received | Year | Number | Branch |
| Check as recd | Check | Check as Lognum | Check |

:LOG:log.db | Project Name | Assigned To | Date Completed |
| Check | Check ~qAssigned | Blank |
EndQuery
If not(executeQBE(Q1)) then
errorShow()
msginfo("Error","Unable to run query")
endIf
spreadSheetName = ":WORK:WorkLoad_" + qAssigned + ".xls"
exportSpreadsheet ( ":PRIV:ANSWER.db", spreadSheetName, True )
endScan
endMethod
 Posted 17 years ago (Thread Starter)
Comment Quote
About harrymossman -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #11213 (Level 1.3)  Reply to 11203
Reply Posted 9/2/2005 8:17:00 AM
Location=Sacramento, CA USA 
Joined=22 years ago   MB Posts=83  
Most Recent Post
harrymossman
Sacramento, CA USA
Thanks. The following works:

method pushButton(var eventInfo Event)
var
q1 query
tc1 tcursor
qAssigned string
spreadSheetName string
endVar

tc1.open("log.DB")
Scan tc1:

qAssigned= "\"" + tc1."assigned to" + "\""
spreadSheetName = "WorkLoad_" + tc1."assigned to" + ".xls"

Q1 = Query
ANSWER: :PRIV:ANSWER.DB
:LOG:log.db | Date Received | Year | Number |
| Check as recd | Check | Check as Lognum |
:LOG:log.db | Branch | Assigned To |
| Check | ~qAssigned |
:LOG:log.db | Project Name | Date Completed |
| Check | blank |
EndQuery

If not(executeQBE(Q1)) then
errorShow()
msginfo("Error","Unable to run query")
endIf

exportSpreadsheet ( ":PRIV:ANSWER.db", spreadSheetName, True )

endScan
endMethod
 Posted 17 years ago (Thread Starter)
Comment Quote
About harrymossman -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #11215 (Level 1.4)  Reply to 11203
Reply Posted 9/2/2005 9:22:00 AM
Location=Sacramento, CA USA 
Joined=22 years ago   MB Posts=83  
Tony M
 (Inactive)
Reverse the '~assigned check' in the 'assigned to' field.

Don't put the tcursor into edit; at least not just prior to executing your query. Edit later, if need be, or edit-make change-endedit prior to query.
 Posted 17 years ago
Comment Quote
About Tony M -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.

Post ID #11212 (Level 1.5)  Reply to 11203
Reply Posted 9/2/2005 7:01:00 AM
Location= 
Joined=20 years ago   MB Posts=410   KB Comments=1  
Tony M
 (Inactive)
Quote the qAssigned variable.

With a comma in there (Mossman, Harry), Paradox thinks you are asking for 2 distinct things.

qAssigned= "\"" + tc1."assigned to" + "\""
 Posted 17 years ago
Comment Quote
About Tony M -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.

Post ID #11214 (Level 1.6)  Reply to 11203
Reply Posted 9/2/2005 8:24:00 AM
Location= 
Joined=20 years ago   MB Posts=410   KB Comments=1  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1183A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #11203 Counter
3116
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2022 Prestwood IT Solutions.   [Security & Privacy]