SAP Knowledge Base Article - Public

1319085 - Print Progress Dialog minimizes MDI Child window in Microsoft Visual C++ 6

Symptom

When printing a Crystal Reports to a printer when the print progress dialog closes the MDI Child window minimizes causing the application to look like it has either crashed or stopped responding.

Reproducing the Issue

  • Microsoft Visual C++ 6 MDI project
  • Crystal Reports XI R2 report designer component (RDC)

 

Cause

The cause of this is not known though it seems to be unique with Microsoft Visual C++. The same behaviour does not occour if using another development tool such as Microsoft Visual Basic or Delphi 7.

Resolution

A work around to this behaviour can be implemented through code by using some Windows API code to enable and reshow the MDI child window. Some sample C++ pseudo code for this:

// Get MDI Child's RECT info 
CRect rect;
this->GetWindowRect((LPRECT)&rect);
this->EnableWindow(FALSE);
//
// RDC Print Code goes here 
//
//Reenable the window
this->EnableWindow(TRUE);
this->SetWindowPos(&CWnd::wndBottom,rect.left, rect.top, rect.Width(), rect.Height(),SWP_SHOWWINDOW);

Keywords

KBA , BI , Business intelligence solutions , Problem

Product

SAP Crystal Reports XI R2