0
votes

I've been testing some D2006 code using Rave reports on a virtual machine and have found the app hangs when I generate a PDF report if there is no printer installed. The hang occurs here:

exception message : The application seems to be frozen.

main thread ($108):
005c5e62 +106 MyApp.exe    RpRPTF          SimpleTextWidth
006198f7 +31b MyApp.exe    RpMemo          TMemoBuf.GetLine
0061a44a +086 MyApp.exe    RpMemo          TMemoBuf.MemoLinesLeft
005cba28 +014 MyApp.exe    RpBase          TBaseReport.MemoLines
00672e8e +072 MyApp.exe    MyAppReports    PrintReportParagraph
00677f73 +acb MyApp.exe    MyAppReports    PrintSummaryReportBody
0066b208 +010 MyApp.exe    MyAppMainForm   TMainForm.RvSystemSummaryReportPrint
005c6f35 +015 MyApp.exe    RpBase          TBaseReport.PrintEvent
005c8066 +03a MyApp.exe    RpBase          TBaseReport.Execute
0060a299 +125 MyApp.exe    RpSystem        TRvSystem.GenerateReport
0060a52a +07e MyApp.exe    RpSystem        TRvSystem.Execute
0067d364 +0ac MyApp.exe    MyAppReports    DoPrintSummaryReport
0067d64d +1d5 MyApp.exe    MyAppReports    ProduceReports
0066e966 +1e6 MyApp.exe    MyAppProcessing ProcessMyAppData
0066ab9b +0d7 MyApp.exe    MyAppMainForm   TMainForm.DoProcessData

and no doubt is something to do with a page width of zero confusing the code that is calculating how many lines it can fit across the page or some such.

The thing is I'm writing a PDF - not printing - so I can't see why not having a printer should trip this code up (Acrobat Reader is installed). If I install a printer it behaves. Why do I need a printer installed (the app could be installed on a workstation without a printer installed - having an error message that says: "You can't generate a PDF report unless you install printer" seems a bit clunky) ?

1

1 Answers

1
votes

This is a long-standing bug in Rave Reports. It has to do with no default printer being installed. I'll look for links to old Borland/CodeGear forum posts (CodeNewsFast doesn't seem to be responding right now). There was a problem with it making an assumption about a printer being present. I don't know if it's been fixed in the most recent versions of Rave. (D2006 was quite a while back.)

If I remember correctly, the solution was to install the text driver to a "mock" printer. This allows Rave to continue to function.