View Single Post
Old 18-03-2008, 08:22   #11 (permalink)
Kellendil
Registered User
 
Join Date: Mar 2008
Posts: 1
Hi, I realise that this thread is very very old. But I was hoping someone could help me a bit with a problem.

The class Luke Redpath made works really really nice, but I want to expand a bit on it, and I'm just not sure how to do it.

What I want is to print more then just the line where I find the search term I'm looking for.

For instance, If I have a document like this:

KUNDENR........: XXXX
NAME: whatever
ADRESS: hello thar
EMAIL: myes@hi.thar

items bought:
993429349 Whatever.
995454542 Whatever2.

Now, I have a file filled with similar posts like that all under eachother (it is a long list of invoices), and I want to search for a spesific item, and print the whole post if I can find the itemnumber.

Curently if I search for 9788203186233, it will print:
Code:
filer/2007 (03) 10001-15000, line 104407: 9788203186233 FLAGGERMUSMANNEN 99,00 1 99,00 0% 99,00

But I want, for instance the 10 lines above that as well as the line with the search term.
(even more spesifically, I want to find the string: "KUNDENR........: XXXX" that precedes the search string, so I can find all the customers that has bought a spesific item)


I hope that made enough sense, if not, please ask any questions you need.

Last edited by Kellendil : 18-03-2008 at 08:34.
  Reply With Quote