The Digital Man Posted May 10, 2006 Share Posted May 10, 2006 I'm at my wits end on figuring this out. My boss comes to me and says, "Hey! I can't print a job ticket". So I pull up a job and hit print job ticket and BAM! It prints out a job ticket. So I get up and go to his computer and try to print one. It doesn't work. I go to a different job and BAM! It prints the ticket just fine. I'm able to print several job tickets on various jobs no problem but when I try to print a ticket on the job he had on the screen it won't work. Actually, oddly enough there are two jobs it won't work on. 06-1386 & 06-1387. Both these jobs are for the same customer "Harris Tarkett" and they are the only two jobs that customer currently has. So I go back to my computer (The HOST) and I pull up job 06-1386 and I set the debug scripts ON and execute the script and it performs flawlessly printing the job ticket no problem. Since I don't have the PRO version loaded on the client machines I am unable to step through the script while running on their machine. But I decide to poke around and thoroughly look at all my script steps and check out each one etc. Everything looks in order. I haven't really changed anything just been looking at my database structure. The records in the pertinent tables. The layout form for the job ticket etc. I go back to job 06-1386 and it won't print a job ticket for it! So I step through the script and it seems to be failing at the "GO TO RELATED RECORD [show only related records; Match found set; from table: "Components_of_a_JB"; Using layout: "RPT_JobTicket" (Component) Step. It is giving me a 401 error which is "No Records Found". This doesn't seem possible since each job record when it is created has a corresponding component record created in the component table. I also looked in the component table and there IS a record for job 06-1386 in there. So I just don't understand why it is failing and only on these two records. Perhaps it is a gremlin that will go away when these two jobs are completed and archived but if anyone wants to take a look I am attaching a copy of the database for your review. And as always I thank you in advance! Quote Link to comment Share on other sites More sharing options...
The Digital Man Posted May 10, 2006 Author Share Posted May 10, 2006 O.K. the file is too big! I will try and make it small enough and then post it. Quote Link to comment Share on other sites More sharing options...
The Digital Man Posted May 11, 2006 Author Share Posted May 11, 2006 O.K. I have the file ZIPPED at 560KB. It tells me when I go to upload that I have exceeded my quota by 455.9 KB! So I guess I need an administrator to help me out here. This is my first adventure into uploading and I think perhaps I am missing something or my account is not set up right. It says I have upload privileges. Thanks. Quote Link to comment Share on other sites More sharing options...
The Digital Man Posted May 17, 2006 Author Share Posted May 17, 2006 O.K. if anyone can clue me in to how I might upload an example I'm all ears. However, at this point I think perhaps my problem is with how I have things structured. Perhaps I can briefly explain and someone can point out the error of my ways. TABLES (There are more than 3 but these 3 are all that is used in this task) JOB table (Holds job records) COMPONENT table (Holds children records belonging to JOB records) PREFERENCE table (Holds a bunch of public variables that I use for various things) FIELDS (Pertinent Fields that are used in this task) JB_ID - Job Record ID field JC_ID - Job Component Record ID field JC_JB_ID - Job ID field in the Job Component Record PF_JB_ID - Job ID field in the Preference Table. This field is loaded with the current Job Record ID that is being worked on. RELATIONSHIPS (Used in this task) I have a relationship set up between the TO "Components_of_a_JB" (Components Table) and "Preferences" (Preferences Table) where PF_JB_ID = JC_JB_ID. O.K. so the user is sitting on a JOB record. He decides to print a job ticket. He clicks on the PRINT JOB TICKET button. A script is executed. It goes like this... #Print Job Ticket Script Set Field [Preference::PF_JB_ID; Job::JB_ID] Go to Related Record [show only related records; Match found set; From table: "Components_of_a_JB"; Using layout: "RPT_JobTicket" (Components_of_a_JB)] Print Setup [Restore; No dialog] Print [Restore] Go to layout [Preference::PF_TemporaryScreenName] Now sometimes when the above script is executed it goes to the RPT_JobTicket form and displays the correct Job with the correct Job Components and prints a correct Job Ticket. Sometimes it goes to the RPT_JobTicket form and displays an incorrect job, generally the first job in the table. Usually it displays the correct components that belong to this job. Sometimes it drops through the GO TO RELATED RECORD statement and offers to print a screen shot of the Job Record they are viewing on screen. Does not go to the RPT_JobTicket form. I must have things set up wrong. How obvious is it? Thanks in advance. Randy Quote Link to comment Share on other sites More sharing options...
The Digital Man Posted May 17, 2006 Author Share Posted May 17, 2006 O.K. maybe it just took writing it out and then again maybe I don't understand everything properly but I decided rather than trying to execute a GO TO RELATED statement I would just simply go to the components table and execute a FIND for all the component records that matched the job record they were looking to print. It seems to work fine and I am just going to leave it at that for now. Randy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.