- Application migrated from PowerBuilder 7 to PowerBuilder 2017.
- The application is using the PowerBuilder Foundation Class (PFC) and Cornerstone.
- When trying to print, the print dialog window appears, but the print range selection is disabled and you cannot specify a print range anymore.
- PowerBuilder Foundation Class (PFC)
Reproducing the Issue
- Migrate the PB 7 peat example and pfc libraries from the pb7 to pb2017.
- Run report and login.
- Select Report/Project Analyzer
- Click on the Print cb and the print current page or range of pages is greyed out.
The print functionality in the PowerBuilder 7 pfc libraries calls an external function pfc_printdlg(ulong hwnd, ref s_printdlgattrib printstruct) from the pfccom32.dll.
When migrating an application from PowerBuilder 7 to PowerBuilder 2017, that includes the PFC libraries, it is recommended to use the latest PFC libraries that are available for download at: www.appeon.com instead of migrating the existing PFC libraries. The reason is the latest PFC library contains the latest product features and changes.
In this case, the customer decided to continue using the PFC libraries from PowerBuilder 7. The <dw_control>.pfc_print() command was
calling the pfc_printdlg(ulong hwnd, ref s_printdlgattrib printstruct) from the pfccom32.dll. The pfccom32.dll is no longer compatible with PowerBuilder. Customer commented out the <dw_control>.pfc_print() line and used the <dw_control>.print(true,true).