FILTER clause in ARRAY browser
FILTER clause in ARRAY browser
Roger,
I have a program that manages customer's orders using ARRAY BROWSER. Some of orders (rows) are marked (during browsing) to be filtered out and not shown at the moment.
1. during browsing array with FILTER clause there is a problem: when last array row is marked to be filtered out, a runtime error is generated.
2. Or situation that before entering the browser all rows are filtered out (so no rows to be shown) : an error is generated.
Is there a simple way to avoid this situation?
BR JAnko
I have a program that manages customer's orders using ARRAY BROWSER. Some of orders (rows) are marked (during browsing) to be filtered out and not shown at the moment.
1. during browsing array with FILTER clause there is a problem: when last array row is marked to be filtered out, a runtime error is generated.
2. Or situation that before entering the browser all rows are filtered out (so no rows to be shown) : an error is generated.
Is there a simple way to avoid this situation?
BR JAnko
Re: FILTER clause in ARRAY browser
Janko -
I don't know what version of eXpress++ you are using so I can't tell you what lines of code to change in _DCXBROW.PRG. So here is what I suggest.
Look for the following code in the function DC_SkipArray():
Change it to this:
Then rebuild DCLIPX.DLL by running BUILD19_SL1.BAT
This fix will be in the next release.
I don't know what version of eXpress++ you are using so I can't tell you what lines of code to change in _DCXBROW.PRG. So here is what I suggest.
Look for the following code in the function DC_SkipArray():
Code: Select all
DO WHILE !Eval(oBrowse:filter,oBrowse:dataSource[nPointer])
nPointer --
ENDDO
EXIT
Code: Select all
DO WHILE nPointer > 0 .AND. !Eval(oBrowse:filter,oBrowse:dataSource[nPointer])
nPointer --
ENDDO
EXIT
This fix will be in the next release.
The eXpress train is coming - and it has more cars.
Re: FILTER clause in ARRAY browser
Roger,
I've applied the ammendment. Now, browser shows empty lines (as expected) but
1. moving mousewheel or pressing 'PgUp' or 'PgDown' generates 'Error in array index'
2. COLOR clause in DCBROWSECOL - COLOR {|| if(dc_getColArray(11,oNaroc),{GRA_CLR_WHITE, GRA_CLR_RED},)} is generating error
3. refreshing of the browser after changes in the number of 'filtered in' records is not correct (leaving blank line on top)
My eXpress version is 258, the line I've changed is 3260.
I hope this corrections will not be very time consuming.
Kind regards
Janko
I've applied the ammendment. Now, browser shows empty lines (as expected) but
1. moving mousewheel or pressing 'PgUp' or 'PgDown' generates 'Error in array index'
2. COLOR clause in DCBROWSECOL - COLOR {|| if(dc_getColArray(11,oNaroc),{GRA_CLR_WHITE, GRA_CLR_RED},)} is generating error
3. refreshing of the browser after changes in the number of 'filtered in' records is not correct (leaving blank line on top)
My eXpress version is 258, the line I've changed is 3260.
I hope this corrections will not be very time consuming.
Kind regards
Janko
Re: FILTER clause in ARRAY browser
Give me a sample program that causes errors.
My sample works fine.
My sample works fine.
The eXpress train is coming - and it has more cars.
Re: FILTER clause in ARRAY browser
Roger,
in attachment you can find IsciN.prg, IsciN.xpj and Iscin.arr (two row array file).
In array, col 7 empty mean filter in, '*' mean filter out
Buttons: 'ON', 'OFF' turns filtering on or off
'Zamenjaj znak' changing of col 7 in array
1. step after start press ON/OFF (OFF shows 2 rows, one with '*' in col 7 one empty)
2. step press 'Zamenjaj znak' that both rows are with star in col 7
3. step press 'ON' to activate filter
4. step try mousewheel (up and down) or keyboard
5. step try to uncomment COLOR clause in line 59 and start browser with all rows filtered out.
I do really appreciate your help.
Best regards
Janko
in attachment you can find IsciN.prg, IsciN.xpj and Iscin.arr (two row array file).
In array, col 7 empty mean filter in, '*' mean filter out
Buttons: 'ON', 'OFF' turns filtering on or off
'Zamenjaj znak' changing of col 7 in array
1. step after start press ON/OFF (OFF shows 2 rows, one with '*' in col 7 one empty)
2. step press 'Zamenjaj znak' that both rows are with star in col 7
3. step press 'ON' to activate filter
4. step try mousewheel (up and down) or keyboard
5. step try to uncomment COLOR clause in line 59 and start browser with all rows filtered out.
I do really appreciate your help.
Best regards
Janko
- Attachments
-
- Iscin.zip
- (1.91 KiB) Downloaded 689 times
Re: FILTER clause in ARRAY browser
Attached is an updated test program.
Give this a try.
Give this a try.
- Attachments
-
- iscin.zip
- (1.33 KiB) Downloaded 696 times
The eXpress train is coming - and it has more cars.
Re: FILTER clause in ARRAY browser
Hi Roger,
i found some anomalie in DC_SKIPARRAY in this sample
see attachmend (this is a .PDF - extract it)
i found some anomalie in DC_SKIPARRAY in this sample
see attachmend (this is a .PDF - extract it)
- Attachments
-
- Error.zip
- (107.92 KiB) Downloaded 630 times
best regards
Hans
Hans
Re: FILTER clause in ARRAY browser
Dear Roger,
one problem remains: when you filter out all rows, browser is empty (as should be) but pressing 'PgUp' or 'PgDown' generates error. As well moving mouseWheel.
Color clause is OK, refreshing is OK.
Can I ask you for this corrections to?
Best regards
JAnko
one problem remains: when you filter out all rows, browser is empty (as should be) but pressing 'PgUp' or 'PgDown' generates error. As well moving mouseWheel.
Color clause is OK, refreshing is OK.
Can I ask you for this corrections to?
Best regards
JAnko
Re: FILTER clause in ARRAY browser
Here is one more fix for you.
Look for the following code in DC_SkipArray() in _DCXBROW.PRG:
Change it to this:
Rebuild DCLIPX.DLL by running BUILD19_SL1.BAT.
This fix will be in the next build.
Look for the following code in DC_SkipArray() in _DCXBROW.PRG:
Code: Select all
DO WHILE !Eval(oBrowse:filter,oBrowse:dataSource[nPointer])
nPointer ++
ENDDO
EXIT
Code: Select all
DO WHILE nPointer < Len(oBrowse:dataSource) .AND. !Eval(oBrowse:filter,oBrowse:dataSource[nPointer])
nPointer ++
ENDDO
EXIT
This fix will be in the next build.
The eXpress train is coming - and it has more cars.
Re: FILTER clause in ARRAY browser
Hello,
another Anomalie
i dont know if it is your Lib or the testfile IsciN.prg
when you start the exe, unmark all rows (with the Zamerjaj znak Button)
then activate the OFF Button (the cursor go to first row)
now activate the "znak button" once
the line disappears - thats ok
now you have only one row
when you activate the "znak button" again - the line was marked but does not disappear
is there a solution proposed
another Anomalie
i dont know if it is your Lib or the testfile IsciN.prg
when you start the exe, unmark all rows (with the Zamerjaj znak Button)
then activate the OFF Button (the cursor go to first row)
now activate the "znak button" once
the line disappears - thats ok
now you have only one row
when you activate the "znak button" again - the line was marked but does not disappear
is there a solution proposed
best regards
Hans
Hans