Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Genrepox does not work when _grx_lastpage is used
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Genrepox does not work when _grx_lastpage is used
Miscellaneous
Thread ID:
00159410
Message ID:
00159410
Views:
47
Genrepox 3.0 bug:

if _grx_lastpage is used with without abbreviation TO PRINTER or PREVIEW
clauses, genrepox causes syntax error!

Reason:
genrepox.prg contains the following lines:

IF plGRXDoLastPage && pre-run, do get the highest page-number...
lcGRXRep2Expr=UPPER(pcGRXRepExpr)
lcGRXRep2Expr=STRT(lcGRXRep2Expr,"TO PRIN","")
lcGRXRep2Expr=STRT(lcGRXRep2Expr,"TO PRINTER","")
lcGRXRep2Expr=STRT(lcGRXRep2Expr,"PREV","")
lcGRXRep2Expr=STRT(lcGRXRep2Expr,"PREVIEW","")

assume that pcGRXRepExpr contains ... PREVIEW ... clause.
THe code above causes first preview STRT() to be executed, so PREVIEW
is translated to

.. IEW ...

line.

Solution: change the order of lines to

lcGRXRep2Expr=STRT(lcGRXRep2Expr,"TO PRINTER","")
lcGRXRep2Expr=STRT(lcGRXRep2Expr,"TO PRIN","")
lcGRXRep2Expr=STRT(lcGRXRep2Expr,"PREVIEW","")
lcGRXRep2Expr=STRT(lcGRXRep2Expr,"PREV","")
Andrus
Reply
Map
View

Click here to load this message in the networking platform