Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing multipage text slabs
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01036224
Message ID:
01036874
Views:
9
It will shows Page 1, because when the expression is evaluated the _pageno = 1 :o( no metter how many pages are involed after that.


>Hello Bo,
>
>I tried your suggestion but it didn't work. It still keeps showing page one for all the index entries even though the report goes over 3 pages. For example, the following entry is in the memo field but appears on page two of the report: James LANHAM<> (The backslash is there to separate the first and last names)
>
>To try and get this working, my Report Expression was
>
>TEXTMERGE(memo)
>
>where 'memo' is the name of the memo field.
>
>The eIndex Function has
>
>FUNCTION eIndex(lcName)
>
>   lcFName = LEFT(lcName,AT("/",lcName)-1)
>   lcLName = SUBSTR(lcName,AT("/",lcName)+1)
>
>   APPEND BLANK IN decindex
>   REPLACE name WITH lcLName + "," + lcFName IN decindex
>   REPLACE page WITH ALLTRIM(STR(_pageno)) IN decindex
>   REPLACE fname WITH lcFName IN decindex
>   REPLACE lname WITH lcLName IN decindex
>
>   RETURN ""
>ENDFUNC
>
>
>Does using a table field name cause a problem? Will this only work with a character variable?
>
>Regards...Rex
>
>>Rex,
>>
>>Look at the TEXTMERGE function. It should do what you want:
>>
>>Put the expression "TEXTMERGE(cText)" in your report field and...
>>
>>
>>cText = "...in the house where John Smith <<index('John Smith')>> grew up there is..."
>>
>>FUNCTION Index(cName)
>>   ? cName, _PAGENO
>>   RETURN ""
>>ENDFUNC
>>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform