>Agnes
>
>I found a quick way, I opened the frx file as a database and replaced all the supexpr field with iif(empty(supexpr),'ispage1','ispage1 and '+supexpr)
>
>I did this on both reports, grouped all the fields on each report together and then cut and pasted them onto a single report. Don't know if I should have done this but it works fine!
>
>The index I am refering to is just a report which tells the user what page number a particular product is on.
>
>Thanks
>
>Derek
Hi Derek,
nice this tables isn't it?
For your index.
I'm a little bit short. Beg your pardon for not explain to much and do the walktrough.
I'm not good in procdures, I do all in classes.
Let's say you run your report out of an form.
Your Report displays a field "cProduct"
This form own's a method
AddIndex and a property
gcCur_Index.
The code to call the record:
THISFORM.gcCur_Index = SYS(2015)
CREATE CURSOR (THISFORM.gcCur_Index);
(cItem c50, iPage I)
INDEX ON cItem+BINTOC(iPage) TAG _sorted
PUPLIC;
poForm
poForm = THISFORM
SELECT curToPrint
REPORT FORM YourReport ...
RELEASE;
poForm
SELECT (THISFORM.gcCur_Index)
IF RECCOUNT()>0 THEN
REPORT FORM IndexReport ...
ENDIF
USE
...
the code for
AddIndexPARAMETERS;
tcItem,;
tnPage
IF !WEXIST('Printing...') THEN
RETURN
ENDIF
LOCAL;
lcAlias
lcAlias = ALIAS()
SELECT (THISFORM.gcCur_Index)
APPEND BLANK
REPLACE;
cItem WITH tcItem,;
iPage WITH tnPage
SELECT (lcAlias)
This all gives us a cursor to store index in and a method to add information to this cursor.
Now we must call this method.
double click the report detail band (straight the gray area named 'Detail')
Add to the 'On start' expression (I'm not sure on the name, I use german version)
poForm.AddIndex(cProduct,_PAGENO)
All what is left is to create a report "IndexReport.frx" to display the index.
HTH
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]