Filtering a report.

Filtering a report.

Postby HunterEC » Wed May 11, 2016 6:21 am

Guys:

I have a report in which one column is based on calculations:
Code: Select all  Expand view
        COLUMN TITLE 'Sales'              ;
            DATA ( nTotal := GetSales( Inv_part, adDates ) ) ;
            SIZE 13 PICTURE "9999999.99" TOTAL
 


It works perfectly. Now if I want to filter the report so I can display only records which have sales on file, like this:
Code: Select all  Expand view
     oRep:bFor   := { || nTotal >= 0 }
 


It does NOT work, none of the records are printed. If I dropped the for block, it works perfectly. Any clues ?
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Filtering a report.

Postby Antonio Linares » Wed May 11, 2016 8:04 am

Gustavo,

You may check how the nTotal variable is being modified:

oRep:bFor := { || MsgInfo( nTotal ), nTotal >= 0 }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Filtering a report.

Postby HunterEC » Wed May 11, 2016 2:14 pm

Antonio:

I just re-did that and there are records matching ( nTotal > 0 ) but report comes out empty. Thank you.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests