3

In an application developed with Delphi XE6 and ReportBuilder (link), and deployed on Windows 7 computers, after a ReportBuilder report is displayed on screen, the user has the option to print it to a file.

A button allows the user to select the directory where the file will be saved:

 /* This source code was provided by Digital Metaphors; I cannot change it. */
 SaveDialog1: TSaveDialog;
 ...
 procedure TppPrintDialog.btnPrintToFileClick(Sender: TObject);
 begin
   if SaveDialog1.Execute then
     begin

In most of the Windows 7 computers where the application has been deployed, the report works correctly.

However, in some computers, nothing happens when SaveDialog1.Execute is executed.

I have found a StackOverflow post with a reference to an Embarcadero post that states the following:

Problem there was resolved by deleting the executable name from HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options

Unfortunately, in my case, the problem has not been solved because the application is not even listed on the mentioned registry entry.

I have already contacted Digital Metaphors and Embarcadero to no avail.

Community
  • 1
  • 1
PTM
  • 31
  • 3
  • 1
    Another commenter on the question you mentioned wrote "Thanks for the link. Checked the key and the application name was not there. Found that I had to set the compatibility of the application to Windows XP and that resolved it" Have you also tried this? – Gary Walker Jun 29 '15 at 16:54
  • 1
    My guess would be that the dialog is choosing some hidden window of the report library as its owner. Pass the window handle of the active form to the Execute method. – David Heffernan Jun 29 '15 at 17:11
  • 1
    +1 for the effort in your q. But I'm surprised Digital Metaphors haven't been able to answer this - they're normally v. good at supporting their users. – MartynA Jun 29 '15 at 21:13
  • Thank you for your comment, Gary. I completely missed that one, which ended up solving the problem. But I am still bothered by the fact that the "bug" is not consistent; some Windows 7 computers do not have the problem, while others do. – PTM Jun 29 '15 at 22:10
  • Newbie questions: 1) Is there a way to increase Gary Walker's reputation? It was a comment, not an answer, but it solved my problem. 2) How can I close the question without an answer? Thank you. – PTM Jun 29 '15 at 22:33
  • 1
    Doesn't sound like a real solution to me, XP compat mode – David Heffernan Jun 30 '15 at 03:25
  • I agree with you, David. I still need to evaluate the possible negative side effects of making the application XP compatible. After contacting Embarcadero and Digital Metaphors, no real solution was provided; let's call it a workaround then. – PTM Jun 30 '15 at 14:37

1 Answers1

-1

This happened to me when I had set environment variables for the project in the Delphi IDE. When starting in the debugger, neither the load nor the save dialogs were shown due to an OLE error that was silently ignored in the VCL. Removing these environment variables again solved the problem.

Unfortunately I don't remember which Delphi version it was.

dummzeuch
  • 10,975
  • 4
  • 51
  • 158