1. Sivaprakash BKR
  2. PowerBuilder
  3. Saturday, 19 June 2021 06:43 AM UTC

Hello,

PB 2019 R3 with theme

Got 60 entry screens and around 100 report datawindow(s) in one project.   Need to show white background in all report datawindows.  The report is shown on a tab page of a window.  

Need to set white background for tab_1.tabpage_2.dw_report datawindow in w_rep_veh_sales_monthwise window.  Tried with customer theme

Created one theme-reports.json file with the following contents

{
"meta-info":
{
"version":"190"
},
"w_rep_veh_sales_monthwise.tab_1.tabpage_1.dw_report":
{
"drawing":true,
"background-color-enabled":true,
"background-color":"#FFFFFF",
}
}

No effect of any change in the datawindow.

Also tried with "drawing":false settings by setting the colour in the background property of the datawindow.  

Any suggestion on how to set white background colour for all report datawindows?

Happiness Always
BKR Sivaprakash

 Note:  Theme is applied with  applytheme(GetCurrentDirectory( ) + '\' + ls_dir + "\" + ls_theme) command in the application open event.

Accepted Answer
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 30 June 2021 07:57 AM UTC
  2. PowerBuilder
  3. # Permalink

Hello,

I submitted a bug report and the support team has given me a solution, which works great.  Link below:

https://www.appeon.com/standardsupport/track/view?id=6821

Happiness Always
BKR Sivaprakash

 

Comment
  1. John Fauss
  2. Wednesday, 30 June 2021 20:32 PM UTC
The bug report/solution id=6821 is not public and therefore cannot be viewed. Is it possible for you to copy/paste here the solution the support team gave you? Thank you!
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 1 July 2021 17:40 PM UTC
Here is the solution:



1. Create a new json file ( I created theme-reports.json)



2. For cross tab datawindow, json like below [ dw_1 is cross tab report ]



"w_window.dw_1":

{

"drawing":true,

"background-color-enabled":true,

"background-color":"#FFFFFF",

"cross-style":

{

"drawing":true,

"head-band":

{

"background-color":"#FFFFFF",

"dwo-text-font":{"color":"#000000"}

}

}

}



2. For tabular datawindow, json be like this [ dw_2 is tabular datawindow ]



"w_window.dw_2":

{

"drawing":true,

"background-color-enabled":true,

"background-color":"#FFFFFF"

}







Full contents of the theme-reports.json file



{

"meta-info":

{

"version":"190"

},

"w_window.dw_1":

{

"drawing":true,

"background-color-enabled":true,

"background-color":"#FFFFFF",

"cross-style":

{

"drawing":true,

"head-band":

{

"background-color":"#FFFFFF",

"dwo-text-font":{"color":"#000000"}

}

}

},

"w_window.dw_2":

{

"drawing":true,

"background-color-enabled":true,

"background-color":"#FFFFFF"

}

}
  1. Helpful
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Thursday, 1 July 2021 08:53 AM UTC
  2. PowerBuilder
  3. # 1

John,

Here is what they have given.

1.  Create a new json file ( I created theme-reports.json)

2.  For cross tab datawindow,  json like below  [ dw_1 is cross tab report ]

"w_window.dw_1":
{
"drawing":true,
"background-color-enabled":true,
"background-color":"#FFFFFF",
"cross-style":
{
"drawing":true,
"head-band":
{
"background-color":"#FFFFFF",
"dwo-text-font":{"color":"#000000"}
}
}
}

2.  For tabular datawindow, json be like this [ dw_2 is tabular datawindow ]

"w_window.dw_2":
{
"drawing":true,
"background-color-enabled":true,
"background-color":"#FFFFFF"
}

 

Full contents of the theme-reports.json file

{
"meta-info":
{
"version":"190"
},
"w_window.dw_1":
{
"drawing":true,
"background-color-enabled":true,
"background-color":"#FFFFFF",
"cross-style":
{
"drawing":true,
"head-band":
{
"background-color":"#FFFFFF",
"dwo-text-font":{"color":"#000000"}
}
}
},
"w_window.dw_2":
{
"drawing":true,
"background-color-enabled":true,
"background-color":"#FFFFFF"
}
}

It's working in my place perfectly.   Still to check it at client places.

 

Comment
  1. John Fauss
  2. Thursday, 1 July 2021 12:44 PM UTC
Thank you for sharing the solution, Sivaprakash!
  1. Helpful
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Tuesday, 22 June 2021 11:02 AM UTC
  2. PowerBuilder
  3. # 2

Thanks Ken,

It was a typo, my original file didn't have the comma.  Nevertheless I'm sending the json file here.  Tried with various combo that came to my mind.   Blue colour in the cross tab datawindow didn't go off. 

1.  Background color expression for header band set to white
2.  All fields' background color (in datawindow expression) set to white.
3.  Background color expression for datawindow is also set to white

Anything that I'm missing or doing what should not be done...

Happiness Always
BKR Sivaprakash

Note:  As I could not upload the json file, here is the content

{
"meta-info":
{
"version":"190"
},
"w_rep_veh_sales_monthwise.tab_1.tabpage_1.dw_report":
{
"drawing":true,
"background-color-enabled":true,
"background-color":"#FFFFFF"
}
}

 

 

Comment
  1. Sivaprakash BKR
  2. Tuesday, 22 June 2021 12:51 PM UTC
We used to open a window as an instance, so that multiple instance(s) could be opened. Tried to open the window directly ... no success. Not sure how the instance of an window could get matched with the window name given in the json file.

  1. Helpful
  1. Ken Guo @Appeon
  2. Thursday, 24 June 2021 09:14 AM UTC
Hi Sivaprakash,



You have submitted Bug 6821 in the Support system and provided a case there. We’ve analyzed your case and made some modifications and now the issue is fixed.



Note: We’ve mainly made the following changes to your case:

1. In theme-reports.json, added the header band node to crosstab style.

2. In IDE, changed the background color of dw_rep_veh_sales_monthwise to non-transparent.



Regards,

Ken
  1. Helpful
  1. Sivaprakash BKR
  2. Thursday, 24 June 2021 11:21 AM UTC
Ken,

Thanks for your support. The problem solved by following your suggestion.
  1. Helpful
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 22 June 2021 10:37 AM UTC
  2. PowerBuilder
  3. # 3

Hi Sivaprakash,

 

The theme-reports.json you used didn’t take effect because there is an extra comma at the end of "background-color":"#FFFFFF",. I suggest that you delete this comma and try again.

 

Regards,

Ken

Comment
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Monday, 21 June 2021 05:24 AM UTC
  2. PowerBuilder
  3. # 4

Tried with the following:

1.  Tried with modify expression [  Tabular datawindow ]
        tab_1.tabpage_2.dw_report.Modify("Datawindow.Color = '" + String(RGB(255,255,255)) + "'") 
        All bands Background color changed to White [ in datawindow design mode ]
        All fields Background color set to Transparant [ in datawindow design mode ]

       We have the gray color [ set in Theme file for datawindow background color ] at the bottom of the report in the last page.   Why ?   What should we do to change it to white ?

 

2.  Similar issue with Cross Tab data window.  Here we get Blue background for header band.   Don't know from where we get this color.   Similar settings that we do for Tabular, modifying every band with white and every field with transparant, done here for cross tab also.  Still we get the blue color.   How to change it to white?  

 

This issue is when the datawindow is NOT IN preview mode.   In preview mode everything looks in white.

The solution should lie either in Custom Theme file or by setting expression coloum for every band and every column.  Either of the one should work to set the color properly. IMO.

Happiness Always
BKR Sivaprakash

 

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.