Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of Pages
Message
 
To
08/07/2002 16:04:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00676335
Message ID:
00676536
Views:
28
Hello Silvio

I agree mostly but with the time it can take, what I do with the
exception of memos in reports is do the math and lay some code (here
you go)

first I do all reports to a local table via sql i.e. (or do a count on the records)
select * ;
from table ;
into table (addbs(gc_loc))+'local.dbf' && stored local pc path the 
temp or personal temp dir

DO CASE
CASE BETWEEN(_TALLY,1,23) && total length of first page i.e. 
one page
PNTotalP = 1
OTHERWISE
PNTotalP = (_TALLY-23)/27 && total length - first 
page / number on other pages
PNTotalP = STR(PNTotalP,5,5)
IF AT('.',PNTotalP) <> 0 && deal with decimal
ln_odec = AT('.',PNTotalP)+1
lcRet = SUBSTR(PNTotalP,ln_odec)
lcRett = SUBSTR(PNTotalP,ln_odec+1)
IF VAL(lcRet) > 4
PNTotalP = VAL(PNTotalP)
PNTotalP = PNTotalP+1
PNTotalP = STR(PNTotalP,5,0)
ENDIF
IF VAL(lcRet) < 5
PNTotalP = VAL(PNTotalP)
PNTotalP = PNTotalP+2
PNTotalP = STR(PNTotalP,5,0)
ENDIF
ENDIF
ENDCASE
REPORT FORM (gc_pic)+"new" NOCONSOLE TO PRINT && have to vars on the report _pageno and PNTotalP
prtname=SET("printer",2)
chgprtname(prtname,"Visual FoxPro","(WEIA), Goodies") &&great dll you can get that will change the name in the windows printbox
and I know this code can be improved, please feel free and let me
have a copy, I pieced this together in the middle of the night



>Is there a way of knowing how many pages do my report has ? In a variable like _pageno, for example...
>
>Silvio
Stephen McLaughlin
"Sexy Steve Valenteno", "Blastmaster"
stephenmclaughlin@gmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform