FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oBrw:report() still need help..
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

oBrw:report() still need help..

Posted: Thu Sep 18, 2008 12:16 AM

Harvey,

I think I mentioned before (in another thread) that you should consider moving your filter data to a database so you don't have to recompile your program to change them.

It appears that you have three groups of data (three filters). I assume that you have an accounts file, so you should be able to add a field to that file that contains the filter group. Then you can tag each account with the group that it belongs to. Of course, the tags could be changed in a data entry screen so you don't have to hard code them and they could be changed at any time.

This is just an example--I would have to know more about your filter groups to propose a good solution.

This is probably not something you want to get into now (during your conversion) but it is something to think about for the future.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

oBrw:report() still need help..

Posted: Thu Sep 18, 2008 01:04 AM
Antonio,

There is a bug in xbrowse. When you have a filter set and oBrw:refresh() is called, it crashes with the error below. This is the line where it is crashing. I don't know why it thinks eval() is a method.

            if ! ( ::cAlias )->( Eval( bFilter ) )


James

  Error description: Error BASE/1004  No exported method: EVAL
   Args:
     [   1] = L   .T.

Stack Calls
===========
   Called from:  => EVAL(0)
   Called from: xbrowse.prg => TXBROWSE:DELREPOS(873)
   Called from: xbrowse.prg => TXBROWSE:REFRESH(836)
   Called from: xbrowse.prg => TXBROWSE:REPORT(4530)
   Called from: Test08.prg => (b)MAIN(22)
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

oBrw:report() still need help..

Posted: Thu Sep 18, 2008 01:50 AM
Antonio,

OK, I think I have a solution. bFilter was not actually a codeblock. This is from the method DelRepos().

Regards,
James

elseif ! Empty( cFilter := ( ::cAlias )->( dbFilter() ) )
            //bFilter  :=  ( ::cAlias )->( &cFilter )
            cFilter  :=  ( ::cAlias )->( &cFilter )
            if ! eval( {|| cFilter } ) //( ::cAlias )->( Eval( bFilter ) )
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

oBrw:report() still need help..

Posted: Thu Sep 18, 2008 07:11 AM

Thanks to James problem solved.

I'm sure he'll be making some recommendations on xbrowse.

He has been a gem in his help.... :D

Thank you

Harvey

Continue the discussion