I'm trying to run a report from a form for a single record. I've created a parameterized view and when I run it from a test program It works fine, but when I run it from my form it does not work, it pulls up 0 records in .03 seconds. The variables have valid data and in theroy it should pull up find one record.
I'm new to fairly new Visual Foxpro and any help would be greatly appreciated.
Here is code for the print (click) event:
PRIVATE lnCheckNum, lnInt_Id
SELECT checks
TABLEUPDATE()
* Get and increment Checknumber
SELECT accounts
lnCheckNum = accounts.NextCkNum
REPLACE accounts.NextCkNum WITH accounts.NextCkNum + 1
SELECT checks
REPLACE checknum WITH lnCheckNum
REPLACE int_id WITH accounts.int_id
lnInt_Id = accounts.int_id
* lvPrnCheck View uses lnCheckNum and lnInt_Id as parameters
REPORT FORM MicrCheck PREVIEW
thisform.release()
Here is the SQL code created for the parameterized view:
SELECT Accounts.name, Accounts.add1, Accounts.add2, Accounts.add3,;
Accounts.add4, Accounts.phone, Accounts.acctnum, Accounts.routingnum,;
Accounts.fraction1, Accounts.fraction2, Accounts.bankname,;
Accounts.bankaddrr, Accounts.bankcsz, Accounts.siglines2,;
Accounts.sigmessage, Accounts.logofile, Accounts.sigfile,;
Accounts.int_id, Checks.payee1, Checks.payee2, Checks.payee3,;
Checks.payee4, Checks.checknum, Checks.amount, Checks.date, Checks.memo;
FROM micrchk!accounts INNER JOIN micrchk!checks ;
ON Accounts.int_id = Checks.int_id;
WHERE Checks.int_id = ?lnInt_id;
AND Checks.checknum = ?lnChecknum