Questions? Feedback?powered byOlark live chat software
Bug 3203

Printing a large window 18 October, 2019

Igor G
18 August, 2019
Product: PowerBuilder Category: Controls & UI
Version: 2019 Publishing: Public
Status: Closed Priority: P3
Classification: Resolution: FIXED
Chris Pollach 18 October, 2019
Hi Igor;

  Thanks ... will do!

Regards ... Chris
Igor G 18 October, 2019
I guess you can close this ticket - I'll work with you in the other one. Thanks!
Chris Pollach 09 October, 2019
Hi Igor;

    We have not heard back from you in a while. Were you able to either resolve or work around this issue?

Regards ... Chris
Igor G 15 September, 2019

Can a "composite datawindow" contain UPDATABLE data windows, not just reports?

If so, -

1) Any way to get rid of the blue line (presumably printing border)?
2) I cannot get to the "bottom" of the composite data window, with even a small DW inside. No matter how much I stretch it down, I cannot get to the bottom border (of the blue line).
3) Are any items in the header of a DW (any DW) updatable?

Thank you,
- Igor
Chris Pollach 28 August, 2019
Hi Igor;

  I am not sure how you would incorporate a Window & its controls into a hidden DWO - other than getting a screen capture of the Window and then inserting this into the DWO as an image (picture). That would probably work but very tricky to program.

Regards ... Chris
Igor G 27 August, 2019
Many thanks Chris. Some workaround is already better than nothing.

What about placing everything in the window in a (hidden) DW and then printing that?
Chris Pollach 27 August, 2019
Hi Igor;

  Ken is correct, PowerServer web does not support the low level Print() command for either a Control or a Window in a web application.

  However, I developed a workaround for PS "Web" Apps in my framework. This implementation works by calling an external PB App that "overlays" the printing area of the PS Web App to get its co-ordinates. Once the co-ordinates are known, the external PB App uses the low level Print() command to perform the work.


  The above work-around requires you to have the external PB App available to the Web App(s). My thought here was that you could place the external PB App on a "server" for a one time deployment. The framework uses an INI file entry to control the location of where to find the external PB Print Window EXE. So that INI entry could just point to the server location of the EXE.

  I am not sure if this approach might work for your application needs.

Regards ... Chris
Igor G 26 August, 2019
Please transfer my ticket to Chris Pollach. I'd like to deal with him.
Ken Guo 26 August, 2019
Hi Igor,

Sorry but there is no other better workaround for the time being. I think only the datawindow printing is better.

Igor G 23 August, 2019

Besides for the datawindow printing, is there any workaround? Printing a rectangular area in a window?

- Igor
Ken Guo 23 August, 2019
Powerserver Toolkit UFA

Hi Igor,

For PowerServer, I consulted the development team and they said that the Print function in window is not supported. You can refer to the Unsupported Feature Analysis Report in Toolkit for more details (see the attachment):
Currently we still don’t have a plan to support the Print function in window in PowerServer.
If it is possible, please try to use the Print function in datawindow to replace it. 

Igor G 22 August, 2019
Hello Ken,

Please update me on the PowerServer issue, fixes, workarounds, patches, et al. We really need this working.

I'll check your test case for PB.

- Igor
Ken Guo 22 August, 2019
Appeon Test Case

Hi Igor,

I created a small case based on the information you provided but it can print successfully in PB. Attached you can find my test case.
Due to that I can’t reproduce it on my end, I need you to provide a small case for me.

As for the issue when printing from PowerServer, the result is blank, I can reproduce it and have submitted this web issue as a bug to our development team.

Igor G 21 August, 2019
I provided you enough required information. You are answering once a day. This issue is becoming a priority. Please test it and provide solutions.
Ken Guo 21 August, 2019
Hi Igor,

Please confirm whether the window name is correct.
I suggest you provide us a complete small case which includes PBL/PBT. This will help us better analyze this ticket.
I hope you can understand.

Igor G 20 August, 2019
null_pointer.png (7KB)

This causes a null pointer exception. See screenshot.

In addition, when printing from the web app / PowerServer, the result is blank in both your proposed case, and the original case.
Ken Guo 20 August, 2019
Hi Igor,

Please try to run this code:
readonly_report_window.print (jb, 250, 250, 6098, 3000)

Igor G 19 August, 2019

I did use a virtual printer to print to a PDF. Printing landscape.

Window dimensions are 6098x3000

long jb


jb = PrintOpen()

// 1/4" margins
readonly_report_window.print (jb, 250, 250)

Ken Guo 19 August, 2019
Hi Igor,

If you use a virtual printer to print the window as an oxps or a pdf file, does it work?
It would be better if you could provide a small case for us so that we can know the related code and the information of the window size, etc. 

Igor G 18 August, 2019
I am trying to print a large window (windowname.print).

Unfortunately it doesn't fit even in landscape mode. Part of the window is cut out.

Is there a way/hack to print part of a window? Or shrink it before printing?

Thank you,
- Igor
Windows Server 2016 
Database Type:
Database Version: