CREATE CURSOR PgCnt (caseno C(9),PageCnt INT(4)) && accumulates page count by grouping SELECT Groups && drives the report REPORT FORM CaseSum0 TO FILE oApp.gcTempPath+'casesum.txt'In the application, the above Report command is not only slow, it causes the application to hang. (That's when I observed that someting was being sent to the printer immediately after casesum.txt was created yesterday. But I can't duplicate that now because of the error it causes.) I don't think the problem has anything to do with the report, the UDF or the data. I can duplicate the issue from the command window with the simplest of reports based on a single table. Here's what I found:
SET REPORTBEHAVIOR 90 REPORT FORM Test TO FILE myfile.txt && Error loading printer driver REPORT FORM Test TO FILE myfile.txt ASCII && Error loading printer driver REPORT FORM Test TO PRINTER && works properly REPORT FORM Test PREVIEW && works properly SET REPORTBEHAVIOR 80 REPORT FORM Test TO FILE myfile.txt && Error loading printer driver REPORT FORM Test TO FILE myfile.txt ASCII && works properly REPORT FORM Test TO PRINTER && works properly REPORT FORM Test PREVIEW && works properlyPerhaps the above results were common knowledge but they were a surprise to me. Obviously I need to Set Reportbehavior 80 and use the ASCII clause when printing to file to prevent the application from hanging on the error when it tries to load the printer driver. This is occuring with SP1. It would be interesting to run the same code with SP2....