How do I ...

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
John_Pasternack_(Guest)
Posts: 4
Joined: Tue Oct 10, 2017 12:44 pm

How do I ...

Post by John_Pasternack_(Guest) » Thu Oct 24, 2002 9:48 pm

I have a dbf that scans into another. DBF1 -> scans DBF2. DBF1 contains contact information. DBF2 contains address and phone records for each contact. Each record in DBF2 has a TYPE field that indicates whether it^s an ^A^ddress or ^P^hone record. Addresses in DBF2 are stored in memo fields. DEFAULT is a logical field in DBF2 that is used to identify the contact^s default address -- he can have several.____Here^s what I want to do. As I scan DBF2, I want pick the default address for the contact and then print it after scanning has completed. I do this by defining a few fields in the report:__new_rec --> key <> previous(key)__isDefAddr --> type=^A^.and. default__addr --> iif( isdefaddr, contact->ADDRESS, IIF( new_rec, "", Addr))____The problem is in the second IIF, if it^s a new record I need to clear out the value from the previous record. But, because ADDRESS is a memo field, I can^t assign a blank string (i.e. "").____Is there a way to assign an empty value to the field?__

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: How do I ...

Post by kfleming » Fri Oct 25, 2002 7:55 am

Maybe you could attach a text memo file and create a empty memo field whose value you could return as the blank?____Kathleen__R&R Support

John_Pasternack_(Guest)
Posts: 4
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: How do I ...

Post by John_Pasternack_(Guest) » Fri Oct 25, 2002 11:33 am

Kathleen, ____Not a bad idea but I^ve taken a different route. I setup a new field "print_addr" and used it to condition the line. Essentially, it works the same as the addr field, except I can initialize it to false on a new record without an address (i.e. iif(isaddrrec,.T.,iif(new_rec,.F.,print_addr))) It works fine and thanks for your timely reply.____John__

Post Reply