Hi Diana, The simplest alternative is using a multiple however multiples in download reports is a bit of a pain. You would need to line check out the first line of the multiple in the event that there is no "sec.job.counter"
LC=sec.job.counter (ON THE FIRST LINE OF THE MULTIPLE) Assuming you were Magic 5.5 the segment that this secondary job code is found in is pp.empl.sec.jobs (sec.jobs) [employee, sec.job.counter] *JY[jy]SJ[jySC] Field Name Len Dat Typ J DPM Offset/Local/VAL sec.job.counter 2 INT R jySC sec.job 10 FREE L PP.JOB *JY[jy]SJ[jySC]|0 sec.job.contract 8 FREE L PP.CONTRACT *JY[jy]SJ[jySC]|4 sec.job.dept 15 FREE L MIS.GL.DEPT *JY[jy]SJ[jySC]|2 sec.job.hrs.percent 6 DEC3 R *JY[jy]SJ[jySC]|5 sec.job.pos.number 18 FREE L PP.POS *JY[jy]SJ[jySC]|6 sec.job.rate 8 RATE R *JY[jy]SJ[jySC]|1 sec.job.step 2 PINT L *JY[jy]SJ[jySC]|3 A slightly more complex method would be, to build a single detail line under the existing detail line and place the following line attribute on it [EMAIL PROTECTED](sec.job.counter) ., ECE=.}, Then on the line you could add a field such as Field: xx.sec.job DAT=FREE LEN=10 [EMAIL PROTECTED] Do you see where I got this from on the data definition I pasted in above? You could pull in whatever fields you wanted. If you wanted fields from the detail line above it to repeat you would need to create them as xx.something fields so the report writer doesn't get confused about multiples. Theoretically you could use the standard field @sec.job directly on the picture but sometimes the report writer puts in code to get child information for you when it thinks you have not provided the subscript value and then the ECB/ECE would not provide the desired effect. It seems that if the field is in an xx field then the report writer doesn't bother "helping" you out. Hope that gives you enough to complete this with. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Behling, Diana Sent: Monday, November 13, 2006 1:19 PM To: L Meditech (E-mail) Subject: [MEDITECH-L] NPR-RW Dynamically generate multiple Detail lines A Question For The Brain -- Is it possible to set up a condition where a Detail line can be generated as needed without having to build all of the Detail lines in the report picture? The scenerio is thus: I'm doing a download for an employee training software system. (Net Learning if anyone is familiar with it). If a person is employed in more than one area in the hospital we need to have a separate line for each job that the employee has in the organization. Meditech allows us to put up to 6 'secondary' jobs on each employee. The detail line for each job would be the same except for the position number of the job and the department. Similar to: Name, DOB, Hire Date, position#-1, dept.....etc Name, DOB, Hire Date, position#-2, dept..... Name, DOB, Hire Date, position#-3, dept..... I'm lazy and don't want to build six different detail lines and all the necessary fields. So, can I use programming to set up a situation where the detail line prints for each employee, and then if the employee has a second, third, etc job the line will print again for that employee and change the position# and dept to the appropriate information? Any suggestions to geet me started in a direction would be appreciated. Thanks, Diana Behling Application Systems Analyst/Programmer Parkview Medical Center 719-584-4642 FAX: 719-584-4879 This e-mail contains the thoughts and opinions of the sender and does not represent official Parkview Medical Center policy. This communication is intended only for the recipient(s) named above, may be confidential and/or legally privileged; and , must be treated as such in accordance with state and federal laws. If you are not the intended recipient, you are hearby notified that any use of this communication, or any of its contents, is prohibited. If you have received this communication in error, please return to sender and delete the message from your computer system. ====================================== All messages should be posted in plain text. HTML will be converted to attachments. The meditech-l web site is MTUsers.com ______________________________________ meditech-l mailing list [email protected] http://mtusers.com/mailman/listinfo/meditech-l ====================================== All messages should be posted in plain text. HTML will be converted to attachments. The meditech-l web site is MTUsers.com ______________________________________ meditech-l mailing list [email protected] http://mtusers.com/mailman/listinfo/meditech-l
