1. Koen de Vos
  2. PowerBuilder
  3. Wednesday, 17 January 2018 13:31 PM UTC

We are migrating from PowerBuilder 12.5 (4953) to PowerBuilder 2017 (1681)
In PowerBuilder 2017 i have to following problem.

I have a datawindow with a computed field in the summary band.
If i set de redraw to false, then sort on the computed field and then set de redraw back to true i get an application error and a .NET Runtime error.
If i do the sort after the redraw is set tot true then there is no problem.

Example code:
datawindow.SetRedraw(False)

datawindow.SetSort('cf_total')
datawindow.Sort()
 
datawindow.SetRedraw(True)
 
Errors:
Naam van toepassing met fout: PB170.EXE, versie: 17.0.0.1681, tijdstempel: 0x59c46b21
Naam van module met fout: PBDWE170.dll, versie: 17.0.0.1681, tijdstempel: 0x59c46c08
Uitzonderingscode: 0xc0000005
Foutmarge: 0x00245e31
Id van proces met fout: 0x2554
Starttijd van toepassing met fout: 0x01d38f94e81d7ea2
Pad naar toepassing met fout: C:\Program Files (x86)\Appeon\PowerBuilder 17.0\PB170.EXE
Pad naar module met fout: C:\Program Files (x86)\Appeon\Shared\PowerBuilder\PBDWE170.dll
Rapport-id: 6e9c4a17-39f8-4796-8254-82d66fe931ab
Volledige pakketnaam met fout: 
Relatieve toepassings-id van pakket met fout:
 
Toepassing: PB170.EXE
Framework-versie: v4.0.30319
Beschrijving: het proces is beëindigd als gevolg van een onverwerkte uitzondering.
Uitzonderingsinformatie: uitzonderingscode c0000005, uitzonderingsadres 5BA75E31
Stack:
Miguel Leeuwee Accepted Answer Pending Moderation
  1. Tuesday, 23 January 2018 08:35 AM UTC
  2. PowerBuilder
  3. # 1

Hi Koen,

Wat bij me in gedachten komt: Wanneer SetRedraw() true gezet wordt, worden de computed columns her-berekend. Indien niet, dan kun je misschien een GroupCalc() proberen voordat je de sort() uitvoert?

---------------------------------------------------

What comes in mind is that when SetRedraw() is set to true, the computed columns are being re-calculated. If not, then maybe a GroupCalc() previous to the Sort() would help?

 

HIH,

MiguelL

Comment
There are no comments made yet.
Lars Mosegaard Accepted Answer Pending Moderation
  1. Wednesday, 17 January 2018 21:36 PM UTC
  2. PowerBuilder
  3. # 2

...setSort('cf_total')  

Aside from missing A or D  for ascending or descending sort, I am wondering if the formula in cf_total contains any aggregate functions.

The best way to check if the compute expression is valid for sorting is to enter the compute in expression in the datawindow painter:

1) Open Rows > Sort 

2) In Specify Sort Columns, Drag any column across

3) double click the column

4) in the Expression field enter or paste the expression from cf_total and click Verify

 

 

Comment
  1. Lars Mosegaard
  2. Wednesday, 17 January 2018 21:46 PM UTC
Please ignore my entry. When double checking, any valid expression seems to be a valid sort expression, even though sorting on a sum should not be possible as every row has the same result.

  1. Helpful
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 17 January 2018 16:16 PM UTC
  2. PowerBuilder
  3. # 3

Hi Koen,

 

As Chris said: please test on another computer and provide us with more details of your case.

 

If this still happens, you can open a support ticket and upload a reproducible test case so we can take a closer look into the problem.

 

 

Regards,

Comment
  1. Koen de Vos
  2. Thursday, 18 January 2018 10:04 AM UTC
I made a sample application te reproduce the problem, see support ticket: https://www.appeon.com/standardsupport/search/view?id=660

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 17 January 2018 14:43 PM UTC
  2. PowerBuilder
  3. # 4

Hi Koen;

   I emulated your SetReDraw () within a SetSort and Sort command sequence and this did not cause any Application issues what-so-ever using the same PB 2017 build as you indicated. My testing BTW was on the W10 Fall Creator Edition - 64 bit O/S, as follows ...

 

  Your issue might also be related to the way your SetSort criteria is being formulated.   Can you tell us what other factors might also be in play in your application's environment. For example, what is your Windows O/S, bitness, memory, CPU, video card, running P-Code or M-Code, running from IDE vs EXE, etc?

PS: Have you tried this App's sorting code on another PC?

Regards ... Chris

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.