Jun 4, 2002 #1 JCooL Programmer Oct 21, 2001 89 US Hi guys... i try to do this... *Crystal 8.5 Sum(IIf({MODELO_REPARACIONES.garantia}='1',1,0)).. and show me the message ... Thanx
Hi guys... i try to do this... *Crystal 8.5 Sum(IIf({MODELO_REPARACIONES.garantia}='1',1,0)).. and show me the message ... Thanx
Jun 4, 2002 #2 Ngolem Programmer Aug 23, 2001 2,724 CA Is this the whole formula??? or just a part of it? I have never tried to use IIF() in a summary function...If it worked that would be neat....but perhaps that cannot be done. I can see nothing wrong if IIF is allowed, Also assuming that there is nothing missing in a formula ..... for example: this error commonly occurs when there is a missing semicolon ( at the end of a statement. A work around is to use a 3-formula sum @initialization (suppressed in the header) WhilePrintingRecords; if not in repeatedgroupheader then numbervar total := 0; @CalcSum (suppressed in the details) WhilePrintingRecords; numbervar total ; if {MODELO_REPARACIONES.garantia} = '1' then total := total + 1; @DisplayTotal (placed where you want in the footer WhilePrintingRecords; numbervar total ; total ; Jim Broadbent Upvote 0 Downvote
Is this the whole formula??? or just a part of it? I have never tried to use IIF() in a summary function...If it worked that would be neat....but perhaps that cannot be done. I can see nothing wrong if IIF is allowed, Also assuming that there is nothing missing in a formula ..... for example: this error commonly occurs when there is a missing semicolon ( at the end of a statement. A work around is to use a 3-formula sum @initialization (suppressed in the header) WhilePrintingRecords; if not in repeatedgroupheader then numbervar total := 0; @CalcSum (suppressed in the details) WhilePrintingRecords; numbervar total ; if {MODELO_REPARACIONES.garantia} = '1' then total := total + 1; @DisplayTotal (placed where you want in the footer WhilePrintingRecords; numbervar total ; total ; Jim Broadbent
Jun 4, 2002 #3 synapsevampire Programmer Mar 23, 2002 20,180 US Or you might just create a formula in the detail with part of your formula as the criteria: IIf({MODELO_REPARACIONES.garantia}='1',1,0) Now just right click and use an insert summary to create whatever subtotal/total you need. -k http://www.informeddatadecisions.comkai@informeddatadecisions.com Upvote 0 Downvote
Or you might just create a formula in the detail with part of your formula as the criteria: IIf({MODELO_REPARACIONES.garantia}='1',1,0) Now just right click and use an insert summary to create whatever subtotal/total you need. -k http://www.informeddatadecisions.comkai@informeddatadecisions.com
Jun 5, 2002 Thread starter #4 JCooL Programmer Oct 21, 2001 89 US Thank Guys! I resolved the problem, its working perfectly with those ways... Upvote 0 Downvote