Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need string/memo editing help
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00188090
Message ID:
00188262
Views:
18
Brenda,
Sorry for being so late to respond...

First, if you must modify an FRX like this, back it up!!

Now, that said, you should be able to use STRTRAN for your task:

1)

USE report1.frx in 0
go top
SCAN FOR objtype = 8
  *- Assumes you hard-code the table alias.
  REPLACE Expr WITH STRTRAN(Expr, "tablename.", "")
ENDSCAN


2)

USE report1.frx in 0
go top
SCAN FOR objtype = 26
  *- Include 'CursorSource' in STRTRAN to make sure we get the right one.
  REPLACE Expr WITH STRTRAN(Expr, "CursorSource = \tempdbfs\xx\", ;
  "CursorSource = \tempdbfs\yy\")
ENDSCAN


Again - this is pretty risky stuff - backup your files!
Mark

>Sorry about asking for such specific help. My string manipulation and memo knowledge is very limited. I want to edit the report1.frx to accomplish 2 things.
>
>1) first I want to remove all table name references from the expr memo (believe that is the only place a table name is referenced other than the dataenvironment.).
>
>USE report1.frx in 0
>go top
>SCAN FOR objtype = 8
> ** what to put here for editting the memo?
> ** what to replace "tablename.fieldname" (if it exists) with
> ** "fieldname"
>ENDSCAN
>
>2)also want to edit the cursor path in the dataenvironment.
>
>USE report1.frx in 0
>go top
>SCAN FOR objtype = 26
> ** what to put here for editting the memo?
> ** what to replace "\tempdbfs\xx\" (xx is really a wildcard -
> ** it could be anything) with "\tempdbfs\yy"
>ENDSCAN
>
>Thanks - Brenda
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.
Previous
Reply
Map
View

Click here to load this message in the networking platform