1. Luca Paschetto
  2. PowerBuilder
  3. Thursday, 14 September 2023 08:19 AM UTC

Good morning,
in our application we need to print in the background and the datawindow used contains colored text objects.
Until Release PowerBuilder 2022 with runtime 22.0.0.1900 everything worked perfectly.
Now we have moved on to Release PowerBuilder 2022 R2 with runtime 22.1.0.2819 the product print is only in black and white using datastore.
Attach code example:

datastore ds_report

ds_report = Create datastore

ds_report.DataObject = 'datawindow_name'
ds_report.SetTransObject(sqlca)

ds_report.retrieve()
if ds_report.RowCount() > 0 then
  ds_report.Modify("DataWindow.Print.Color=1")
  ds_report.Print( False )
end if

destroy ds_report

 

Can anyone help me, thanks

René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 14 September 2023 11:45 AM UTC
  2. PowerBuilder
  3. # 1

If it worked with 2022 and doesn't work with 2022 R2 I guess it is a bug. You should open a support ticket.

https://www.appeon.com/standardsupport/search

 

Comment
  1. Luca Paschetto
  2. Thursday, 14 September 2023 12:16 PM UTC
I just did it, thanks
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 14 September 2023 14:45 PM UTC
  2. PowerBuilder
  3. # 2

Hi Luca;

   I created a test case on your reported ticket for this issue ( # 10874 ). However in my test case that I also attached to this ticket, the DS prints in colour with no issues. The following are Example DS output to my Epson Colour printer ....

Graph

FreeForm

So I think that the problem might be related to your environment.  HTH

Regards ... Chris

Comment
  1. Luca Paschetto
  2. Friday, 15 September 2023 09:24 AM UTC
Hi Chris,



if you use a graph on a datastore it works, but if you try with a Freeform datawindow with a colored label/text you will see that the color is not printed.



This only happens to me now that I've switched to the new R2 runtime.







Regards
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 15 September 2023 14:22 PM UTC
Hi Luca;

I have amended my example DS print post with a Freeform DWO test. As you can see above, this also prints 100% in colour.

I have tried numerous DWO formats but they also all print OK in colour from a DS.

So I am still guessing that it's something happening on your system(s). HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
Luca Paschetto Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 09:07 AM UTC
  2. PowerBuilder
  3. # 3

Hi Chris,

if you use a graph on a datastore it works, but if you try with a Freeform datawindow with a colored label/text you will see that the color is not printed.

This only happens to me now that I've switched to the new R2 runtime.

 

Regards

Comment
  1. Miguel Leeuwe
  2. Friday, 15 September 2023 09:18 AM UTC
Could it have something to do with your default printer setting in windows? Try with a default printer like CutePFD ?
  1. Helpful
  1. Luca Paschetto
  2. Friday, 15 September 2023 09:26 AM UTC
no Miguel, nothing has changed ... same system, same printer and same project.

I only changed the runtime used.
  1. Helpful
There are no comments made yet.
John Raghanti Accepted Answer Pending Moderation
  1. Thursday, 14 September 2023 11:27 AM UTC
  2. PowerBuilder
  3. # 4

Hi, it could be because datastores are non-visual datawindows.

https://docs.appeon.com/pb2021/datawindow_programmers_guide/ch01s04.html#XREF_40574_About_DataStores

You may need to create a hidden datawindow object and print that rather than the datastore.

Comment
There are no comments made yet.
Luca Paschetto Accepted Answer Pending Moderation
  1. Tuesday, 19 September 2023 07:18 AM UTC
  2. PowerBuilder
  3. # 5

Hi Chris,

I tried with your project and it works.

I created a simple empty project and it also works with my datawindow.

After checking what particular happens in my project I discovered that the problem appears after applying the themes.

 

ApplyTheme (".\Themes\Flat Design Blue")

 

However, the same application with the previous runtime did not give me these problems.

 

What happen ?

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 19 September 2023 16:41 PM UTC
Hi Luca;

I have now replicated this problem from the two open tickets - one for a DW Control and one for a DataStore.

That was the Ha, Ha moment .. everything worked well until a Theme was active!!! :-(

I have now sent both DC / DS tickets over to Engineering!

Regards ... Chris
  1. Helpful 1
There are no comments made yet.
Thierry Del Fiore Accepted Answer Pending Moderation
  1. Tuesday, 19 September 2023 10:11 AM UTC
  2. PowerBuilder
  3. # 6

Hi,

we have the same issue with text color/backcolor, checkboxes in datawindow print and PDF (ghostscript, microsoft print to pdf)

check : https://community.appeon.com/index.php/qna/q-a/pdf-generation-downgrade-in-pb2022r2-with-ghostscript-or-microsoft-print-to-pdf

Seems to be linked the dw_1.dataobject code

I've filled a bug report

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.