At 10:42 PM 9/12/2010, TOM HART wrote:

The following is 3 examples of my code.
Case 1&2 do not work(computer freezes).  Case 3 works fine.
Also Case 2&3 are on same form with 2 different buttons. I
just cannot figure it out. I am going to try Mikes suggestion
and recreate the a report from scratch. So far I have found a
total of 3 reports that don't print(they all have where clauses)
and 3 that do work(no where clauses). As stated before these
work fine under 7.6 but not 9.0.

Case1 saverow
prnsetup .vprinter1
print CashDrawerRec where DrCompID = .vCashDrID option .vprnscrn
return

Case2 prnsetup .vprinter1
print TempSalesVoid where transnum = .vnextrans option .vprnscrn
return

Case 3 prnsetup .vprinter1
print TempSalesRec option .vprnscrn
return


Tom,

Have you verified/traced the existence and data types of ".vCashDrID"
and ".vNextTrans" in relation to case 1 and 2?

In addition, try the following syntax for your cases 1&2 and see what
you get.

-- Case 1
PRNSETUP .vPrinter1
SET VAR vCommand TEXT = NULL
SET VAR vCommand = ('PRINT CashDrawerRec WHERE DrCompID ='&.vCashDrID&'OPTION'&.vPrnscrn)
&vCommand
CLEAR VARIABLE vCommand
RETURN

-- Case 2
PRNSETUP .vPrinter1
SET VAR vCommand TEXT = NULL
SET VAR vCommand = ('PRINT TempSalesVoid WHERE TransNum ='&.vNextTrans&'OPTION'&.vPrnscrn)
&vCommand
CLEAR VARIABLE vCommand
RETURN

Very Best R:egards,

Razzak.


Reply via email to