Cool Tip for comparing printed documents with PREVIEW

Discussion about printing issues and techniques.

Moderators: Susan Smith, admin, Gabriel

Post Reply
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Cool Tip for comparing printed documents with PREVIEW

Post by Susan Smith »

Hi all,
George gave me a little hint today which saved me HOURS of time and I wanted to pass it along in case one of you might benefit in the future.

CONFIG PRINTDIR C:\REPORTS
will redirect the Print Preview output FILES from your reports to C:\REPORTS (or pick another destination if you like) where you can access the print file for whatever purpose you may have in mind.

I'm converting an existing software system to FILEIO. To test a report to see if the changes worked, I wanted to compare the output of the original program to the modified one. If they matched, I was done.

Well, they did NOT match. I could tell this from the totals at the end of the report. But the reports were over 300 pages, so how to tell which record(s) didn't match? I wanted to use ExamDiffPro (one of the most helpful programs EVER!) to compare the reports. But I needed to have a print FILE to compare. I use BR's print PREVIEW facility so I thought if I could somehow access the preview files, I'd have it made. But how do you do that?

George said that preview files aren't accessibly unless you redirect them to a folder where they will be preserved. So the trick is to use CONFIG PRINTDIR C:\REPORTS where "C:\REPORTS" is where you want to redirect those files. After you run your report, printing to PREVIEW, it is stored in that folder, named with the name of the report program and an extension (in my case it was 100, but I'm not sure what that signifies - perhaps the WSID and a counter?)

Anyway, I executed the CONFIG statement, ran the before and after reports and loaded them into ExamDiffPro. What a dream! There were 7 records that differed between the two printouts and by examining them to see what they had in common, I could immediately locate the section in my code that dealt with that. I found the coding error in minutes! I didn't have to pour over 300+ pages on paper, comparing each line. What a great hint.

Thanks George!

-- Susan
Post Reply