1. Chee Boon Ang
  2. PowerBuilder
  3. Thursday, 12 October 2017 11:08 AM UTC

Hi Community,

 

this is my first time working on datawindow crosstab. I encountered that the datawindow will lost all the formatting after editing on the data source.

Is there anyway, i can prevent the format getting reset after inserting additional columns to "row" 

 

Marco Meoni Accepted Answer Pending Moderation
  1. Thursday, 12 October 2017 19:57 PM UTC
  2. PowerBuilder
  3. # 1

I am afraid the only possibility is to make changes in "edit source" mode (right click on a DW, than select "edit source").

Cheers,

Marco

Comment
  1. Brad Mettee
  2. Friday, 13 October 2017 13:22 PM UTC
If you do edit in source mode, you'll also need to create the new column objects to hold the data for the new columns you place in the sql. These objectes are ABOVE the sql source statement and look like this:





column=(type=datetime updatewhereclause=yes name=dttmentered dbname="alerts.dttmentered" )





Where:





type matches a PB datatype: char(n), long, char(32766) for long varchar field, decimal(n) for numerics with decimal places. Take a look at other columns in the datawindow you're editing (or others) if you need clarity on data types.

name is a field name you can recognize later

dbname is the associated table & column that you added to the select statment. If it's a computed column, it is be column name only without an associated table. There is no table name when select is for a single table.

Crosstabs are non-updateable, the updatewhereclause is just a placeholder, but needs to be there





Aways add new columns at the end of the select statement so that ID references in the visible column objects stay the same (otherwise you'll end up with your data showing up in the wrong places).

  1. Helpful
  1. Brad Mettee
  2. Friday, 13 October 2017 13:23 PM UTC
deleted as duplicate

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 13 October 2017 13:34 PM UTC
  2. PowerBuilder
  3. # 2

Hi Chee Boon;

   Yes, this has been a handicap of the CrossTab DW in PB for quite some time. My suggestion would be to open a support ticket on this issue. Opening up a ticket is important as it will be officially recorded and after an internal review of the DW code as a bug, may then get placed on the official enhancement list if not immediately fixable.

Regards ... Chris Pollach

Appeon: Director, Developer Relations.

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.