dbTalk Databases Forums  

Calculate Field in Report Variables

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss Calculate Field in Report Variables in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Monica J. Braverman
 
Posts: n/a

Default Calculate Field in Report Variables - 04-18-2004 , 10:12 AM






My query is run to cursor and then report populated from cursor. I
pass in fields SFAMOUNT (numeric) and SFPD (date). I need the SUM of
SFAMOUNT where SFPD is null and also SUM of SFAMOUNT where SFPD is not
null. How can I state that in a report variable? Should be easy, but
I'm saying something wrong.

Thanks.

Monica

Reply With Quote
  #2  
Old   
Rick Bean
 
Posts: n/a

Default Re: Calculate Field in Report Variables - 04-19-2004 , 09:18 AM






Monicate,
Is the Date field really null or simply "empty"?
One expression: sum(iif(isnull(SFPD),0,SFAMOUNT))
The other: sum(iif(isnull(SFPD),SFAMOUNT,0))
OR
One expression: sum(iif(empty(SFPD),0,SFAMOUNT))
The other: sum(iif(empty(SFPD),SFAMOUNT,0))

Rick

"Monica J. Braverman" <monica (AT) datashark (DOT) net> wrote

Quote:
My query is run to cursor and then report populated from cursor. I
pass in fields SFAMOUNT (numeric) and SFPD (date). I need the SUM of
SFAMOUNT where SFPD is null and also SUM of SFAMOUNT where SFPD is not
null. How can I state that in a report variable? Should be easy, but
I'm saying something wrong.

Thanks.

Monica

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.