* * This code will generate a report with two detail lines on the preview screen; * however, three detail lines will appear (the first one duplicated) when you send * the report to the printer after previewing it. * * I think it has something to do with creating an index with DTOC() then changing * the set Century value. * CLOSE DATABASES ALL * * Start with century on. * SET CENTURY ON * * Create Table (or cursor adapter view) with at least two records. * CREATE TABLE c:\testprog\testprog (weekending T, amount I) INSERT INTO testprog (weekending, amount) VALUES ({01/01/2004}, 100) INSERT INTO testprog (weekending, amount) VALUES ({01/07/2004}, 200) * * Apply index with DTOC function. * INDEX ON DTOC(WeekEnding) TAG RptOrder * * Turn off century. * SET CENTURY OFF * * Run report: only need two fields on report "DTOC(weekending)" and "amount" * REPORT FORM c:\testprog\testprog.frx TO PRINTER PROMPT PREVIEW NOCONSOLE IN SCREEN SET CENTURY ON USE IN SELECT("TestProg")