Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page length problem
Message
From
16/04/2002 14:04:54
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00645336
Message ID:
00645595
Views:
11
>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:
*... create cursor with print info
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
*No Record means, report only viewed not printed
 REPORT FORM IndexReport ...
ENDIF &&RECCOUNT()>0

USE
...
the code for AddIndex
PARAMETERS;
 tcItem,;
 tnPage

*Test if we realy print, not for preview
IF !WEXIST('Printing...') THEN
 RETURN
ENDIF &&!WEXIST('Printing...')

LOCAL;
 lcAlias
*Store report's alias
lcAlias = ALIAS()
SELECT (THISFORM.gcCur_Index)
APPEND BLANK
REPLACE;
 cItem WITH tcItem,;
 iPage WITH tnPage
*back to Report's alias
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.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform