mdohrn Posted September 8, 2010 Posted September 8, 2010 I'm developing a job to process and imprint full-sheet business checks as well as their stubs. My data file is in alphabetical order by creditor's name. Some creditors have multiple entries. I am to write only one check to a given creditor, but to break out what leads to the total payment on the stub below. To achieve this, I'm trying to use a rule involving a global "multi" (contains number of entries for that creditor, provided by client) variable and ComposeThisRecord in an OnRecordStart rule. If multi > 0, ComposeThisRecord = false. This part is working fine, but it leads me to my question. I'm now trying to populate the table on the stub below. Is there a way to read values from a non-current record? The way I see it going is that I'll have FP do all the work when it gets the first entry for a multi creditor, building the table and writing the check, and then skip the remaining records. However, in order to do this, I need to be able to read records forward of my current position in the data file. Am I using a bad approach that will lead me only to tears and alcoholism, or is there a way to read ahead in the data file that I'm not aware of? Thanks in advance for your help, and please contact me if you have any follow-up questions!
mdohrn Posted September 8, 2010 Author Posted September 8, 2010 Well, I think I got my answers. No, it doesn't seem that I can read ahead in the data file. So, as a workaround, I made a second data file which I de-duplicated. This, I made my primary data source, and made the un-deduped one my secondary data source. Before de-duping the file, I added a unique sequential ID to each record in the data file. This ID was retained after de-duping, so in the deduped file there was a nearly-sequential list with gaps in that ID field. I used this ID to find the right record in the secondary data file once all the dupes were removed. Phew! It's been 13 years since I did any meaningful programming, and it is NOT coming back very quickly!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.